Skip to main content

Test with and Without Authentication

Private Topic/Action Results

The final step is to test the authentication for the private topic within the conversation preview panel. The preview panel is where you can test your creation as though you’re a customer. Test it by asking about a case status and see if you get prompted to verify first.

  1. While still in the Agentforce Builder, click Refresh (circular arrow) in the top right corner of the Conversation Preview.
  2. Click in the conversation preview panel and enter this prompt: Please show me all my open cases and press enter/return.
  3. When the agent prompts you for an email address, enter: my email is will.johnson@run.com press enter/return.
  4. Click the expand panel icon expand panel icon to open the plan canvas.
  5. Find the Action Launched: Send Email with Verification Code section and scroll to the bottom of the Output window.
  6. Copy the verification code (no quotation marks, just the six numbers).

Verification code from the plan canvas.

Note: Your verification code is not the same as the one pictured above. Also, keep in mind that your verification code updates every time you refresh the agent.

  1. Paste your unique verification code into the conversation preview panel and press enter/return.

Note: If the agent struggles to verify your six digit code, refresh your browser page and try asking about your open case again. Make sure there are no quotation marks or parentheses around your six digit number.

  1. Once the verification is successful, the agent sends you a confirmation that you’re verified.

verification code entered.

  1. Enter: Show me all my open cases and press enter/return.
  2. Enter this prompt after the agent gives you the case details to add a comment to this case record: Add a comment to this case: Please email the contact owner an update on this case. and press enter/return.

The agent now has access to all the actions under the Case Management topic and can now present case information.

Public Topic/Action Results

Linda is curious… What happens if a customer asks about cancelling an order instead of a case? You have a filter for the Case Management topic, but not for Order Inquiry. The customer shouldn’t be asked to authenticate if they ask about order cancellation since no authentication is required for this topic. Time to test if customers are authenticated only when it’s required.

  1. From the conversation preview panel, click the refresh button twice to start a new session.
  2. Enter this in the chat: Hello, I would like to cancel an order but I do not know my order # and press enter/return.
  3. When asked for the email, enter: my email is will.johnson@run.com and press enter/return.

Note: If the agent tries to authenticate your identity, refresh your browser page and enter the cancel order prompt once again.

  1. The agent should ask which order you want to cancel. Enter: Please cancel order 1234 and press enter/return.

Note: Make sure testing like this is always done in a sandbox as this interaction (even in the Conversation Preview with the agent deactivated) will still manipulate data in the org.

  1. The agent successfully cancels the order.

Since you didn’t add authentication to order cancellation, the agent didn’t prompt you for authentication when you inquired about it. Note: This might go without saying, but when a customer inquires about cancelling an order, authentication should always be required.

A more common public topic/action that wouldn’t require authentication is asking a general question that can be answered with Knowledge, such as “What is the return policy?”, “What are the store locations?”, “How can I start a return?”, and so forth.

Add Security to Private Actions

Linda has now added authentication for the Case Management topic for Cloud Kicks. Customers who ask about their case are asked to verify through the one-time code before an agent can relay case information. Meanwhile, customers who want to cancel an order do not require authentication.

The Cloud Kicks Loyalty Program Manager wants to encourage customer survey feedback with store gift cards. Gift cards can only be given once the survey is complete. Linda has added a new topic, Customer Survey Participation, along with two actions, Collect User Survey and Get Gift Card. Linda needs to ensure that the Get Gift Card action can only be unlocked if Collect User Survey is completed first. Linda needs to create a filter and apply it to the action.

  1. Click the Customer Survey Participation topic.

Note: If you don’t see the list of topics, click <— Topic Details to return to the list of topics.

  1. Click the This Topic’s Actions tab.
  2. From the list of actions, click Collect User Survey.
  3. Within the Collect User Survey action, scroll down to the 1 FeedbackCollected output (green) box.
  4. Click in the Map to Variable input.
  5. Select + New Custom Variable.
  6. Leave everything as is and click Save.
  7. From the sidebar, click the Context icon to create a new filter.
  8. Click the Filters tab.
  9. Click New.
  10. Enter these details:
    • Name: Feedback Collected
    • Ensure API Name is Feedback_Collected
    • Select All Conditions Are Met (AND)
    • Resource: FeedbackCollected
    • Operator: Equal
    • Value: True
  11. Click Save.
  12. Click the Topics icon.
  13. Click the <— View Action and then click the <— Topic Details to return to the list of topics.
  14. From the list of topics, click Customer Survey Participation.
  15. Click the This Topic’s Actions tab.
  16. From the list of actions, click Get Gift Card.
  17. Click the Add filters icon in the upper right. Topic Filter icon highlighted.
  18. click in the Assign Filters input and select the Feedback Collected filter.
  19. Click Save.

See the Authentication in Action

Now, test to make sure customers fill out a survey before they get the gift card. Enter the prompts outlined below. Note: No actual survey is sent or completed; you just mock the data for testing purposes.

  1. From the conversation preview panel, click the refresh button twice to start a new session.
  2. Ask the following: Hello, I would like the gift card. Can you send me the survey? and press enter/return.
  3. The agent may ask if you are interested in participating in the survey. Respond with Yes. Otherwise, proceed to the next step.
  4. The agent will send survey instructions and ask for the survey code. Enter the following: The survey code is 12345 and press enter/return.

Note: If the agent tries to authenticate your identity, refresh your browser page and enter the gift card prompt once again.

  1. The agent will now issue the gift card code.

Further Customizations

The Agentforce for Service template includes sample topics and actions with fully customizable flows to fit your business needs. You can add more actions to the Customer Verification topic, but keep each action focused on a specific step in the process. To avoid errors, make sure every action produces a valid output—empty outputs can cause issues if the agent tries to use them before the process is complete. Learn more about verification by visiting the Verify Customers with the Customer Verification or Service Customer Verification Topics help article.

Agent Authentication in Review

It's been verified—you did a lot in a short amount of time. You created several custom variables, and applied those variables to agent topics and actions. You even used those variables to apply filters. Not only did you set it all up correctly, you experienced the difference in how an agent handles private versus public topics/actions. Linda from Cloud Kicks appreciates your help.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈