Appearance
Exercise 3: Verify Customers with Hybrid Reasoning
In this exercise, you’ll prepare Order Issues & Refunds with the actions it needs to support customer case lookups and refunds. In the next exercise, you’ll add customer verification guardrails using variables and conditional logic.
Step 1: Create the Get Customer Profile action
Next, create an Apex-based action that retrieves customer details from an email address.
In Agentforce Builder go to Order Issues & Refunds in the explorer.
Click on the + sign besides Actions, and select Create new action.
Enter
Get Customer Profileas action name and click Create and Open.Enter the following information:
Field Value Agent Action Label Get Customer ProfileAgent Action API Name Get_Customer_ProfileDescription Retrieves a customer profile based on their email address.Reference Action Type ApexReference Action Get Customer ProfileLeave the default input and output settings.
Click Save.
Step 2: Create the related cases action
Next, create an action that retrieves a customer’s related cases with basic case information.
In Agentforce Builder go to the Order Issues topic in the explorer.
Click on the + sign besides Actions, and select Create new action.
Enter
Get Related Casesas action name and click Create and Open.Enter the following information:
Field Value Agent Action Label Get Related CasesAgent Action API Name Get_Related_CasesDescription Retrieves a customer’s related cases (basic details) based on the requested case status.Reference Action Type ApexReference Action Get Related CasesInputs - Case Status Select checkbox Require Input to execute actionInputs - Verified Customer Id Select checkbox Require Input to execute actionOutputs - Cases Select checkbox Show in conversationClick Save.
Step 3: Create the order refund action
Next, create an action that issues refunds using Flow.
In Agentforce Builder, stay in the Order Issues & Refunds topic.
Click on the + sign besides Actions, and select Create new action.
Enter
Handle Order Refundsas action name and click Create and Open.Enter the following information:
Field Value Agent Action Label Handle Order RefundsAgent Action API Name Handle_Order_RefundsDescription Submits and executes order refundsReference Action Type FlowReference Action Issue RefundInputs - refundAmount Select checkbox Require Input to execute actionInputs - refundReason Select checkbox Require Input to execute actionInputs - verifiedContactId Select checkbox Require Input to execute actionOutputs - returnedRefunds Select checkbox Show in conversationClick Save.
Step 4: Add actions to the Order Issues & Refunds topic
Next, attach the actions to the topic so the agent can use them during conversations.
In the explorer, open the Order Issues & Refunds topic.
Click on the arrow besides Select action, and select Get Customer Profile.
Click on the arrow besides Select action, and select Get Related Cases.
Click on the arrow besides Select action, and select Handle Order Refunds.
Click Save.
Add the following basic instructions to the topic:
txtWhen a user asks about their order or requests a refund, ask for their email address. Run Get Customer Profile using the customer’s email address. Then either: - run Get Related Cases to check for existing cases and provide status, or - run Handle Order Refunds to process a refund when appropriate.Click Save.
Step 5: Test the agent
Next, test that the agent can ask for an email address, retrieve a customer profile, and show the customer’s open cases.
Click Preview.
Enter the following prompt:
txtCan you show me my open cases?Press Enter on your keyboard.
When the agent asks for an email address, enter:
txtalex.morgan@example.comPress Enter on your keyboard.
In Interaction Details, confirm the agent runs Get Customer Profile and then Get Related Cases, and that it shows the case results in the conversation.
Summary
You have created the core actions your agent will use for customer support workflows, added them to Order Issues & Refunds with baseline instructions, and tested that the agent can retrieve and display open cases.