Skip to main content
  1. Public practice questions
  2. AB-620 Practice Exams | AI Agent Builder Associate
  3. AB-620 Case Study Set

Question 12 — AB-620 Case Study Set

The source HR API returns categoryName and categoryCode. Paideffort uses the following Python transformation before assigning the result to Topic.AvailableLeaveTypes.

def prepare_leave_types(records):
    choices = []
    for record in records:
        choices.append({
            "name": record["categoryName"],
            "code": record["categoryCode"]
        })
    return choices

The transformed value will be bound directly to the Adaptive Card ChoiceSet used in the scenario. What should be changed? (Select one answer)

  1. Return objects with title mapped from categoryName and value mapped from categoryCode so the table matches the ChoiceSet binding expected by the topic.

  2. Return objects with label mapped from categoryName and id mapped from categoryCode so the values become Adaptive Card input identifiers.

  3. Return objects with text mapped from categoryName and number mapped from categoryCode so the ChoiceSet can infer the display and stored values.

  4. Return only categoryName strings because Paideffort doesn't need a separate value when leave categories are generated dynamically.

Correct answers

  1. Return objects with title mapped from categoryName and value mapped from categoryCode so the table matches the ChoiceSet binding expected by the topic.

Explanations

Correct Answer:

Return objects with title mapped from categoryName and value mapped from categoryCode so the table matches the ChoiceSet binding expected by the topic.

Explanation:

Paideffort's dynamic ChoiceSet binding expects the runtime table to provide title and value columns. The prototype returns name and code, so its output doesn't match the shape required by the leave form. Mapping the source API fields into title and value preserves both the employee-facing category name and the corresponding stored code.

Wrong Answers:

Return objects with label mapped from categoryName and id mapped from categoryCode so the values become Adaptive Card input identifiers.

Paideffort needs a table of selectable choices, not new input element identifiers. The card input itself already has its own ID.

Return objects with text mapped from categoryName and number mapped from categoryCode so the ChoiceSet can infer the display and stored values.

Those property names don't match the table structure Paideffort plans to bind to the ChoiceSet, so the transformation would still fail to provide the required shape.

Return only categoryName strings because Paideffort doesn't need a separate value when leave categories are generated dynamically.

The HR service provides both a display name and category code. Preserving a value allows Paideffort to submit the appropriate underlying category identifier while showing a meaningful title to the employee.