Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

#Trailhead Challenges2,460 discussing

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.
4 answers
  1. Dec 3, 2024, 4:34 PM

    can you please share the successful code here for them to understand and learn?

0/9000
6 answers
  1. Sep 18, 2024, 5:01 AM

    Hello @Artee Rawat,

     

    Follow the below steps:

    Create a Custom Agent Action with a Prompt

     

    1. In the Setup Quick Find, search for and select Agent Actions.
    2. Click +New Agent Action to create a new Action.Hello , Follow the below steps:Create a Custom Agent Action with a Prompt In the Setup Quick Find, search for and select Agent Actions.Click +New Agent Action to create a new Action.
    3.  Select Prompt Template as the Reference Action Type.
    4. Select Generate Personalized Schedule as the Reference Action.Agent-Actions-Salesforce (3).png
    5. Leave the other options as is and click Next.
    6. Configure the instructions as follows: Field: "Agent Action Instructions", Value: "Generate a personalized schedule that includes the time and location of resort experiences that are available today, and that match the guest's interests.", Field: "Contact Input Instructions", Value: "Contact for which the personalized schedule should be generated. Must be a valid JSON representing the contact info, chained from having executed the QueryRecords action."
    7. For the Prompt Response Output, check Show in conversation.
    8. Click Finish.Agent-Actions-Salesforce (4).png

    Create a Custom Agent Action with Flow

    1. Create another new Action by clicking +New Agent Action.
    2. Select Flow as the Reference Action Type.
    3. Select Create Experience Session Booking.
    4. Leave the other options as is, and click Next.Agent-Actions-Salesforce (5).png
    5. For Contact_Id, check Require Input.
    6. For Guests, check Require Input and Collect data from user.
    7. For Session_Id, check Require Input.
    8. For Booking output, check Show in conversation.
    9. For Output_Message output, check Show in conversation.Agent-Actions-Salesforce (6).png
    10. Click Finish.

    Assign the Custom Actions to the Agent

    1. In the Setup Quick Find, search for and select Agents.
    2. Select Coral Cloud Agent.Agents-Salesforce (3).png
    3. Click Open in Builder.Agents-Salesforce (4).png
    4. Click the Experience Management topic.Agent-Builder.png
    5. Click the This Topic’s Actions subtab.
    6. Click the Add Action Icon (plus sign).Agent-Builder (1).png
    7. Add a check to the Create Experience Session Booking Action and the Generate Personalized Schedule Action.
    8. Click Finish.Agent-Builder (2).png
    9. Click the Topic Configuration subtab.
    10. Click New Instruction.
    11. Configure the new Instruction element as follows:
      1. Instruction: When a customer requests a list of recommended experience sessions, first retrieve their contact record. Pass this record into the "Generate Personalized Schedule" action's contact input to return a list of relevant experiences available for booking.
    12. Click New Instruction again.
    13. Configure the new Instruction element as follows:
      1. Instruction: When a customer requests to book an experience, first locate a Session__c record that corresponds to the desired date and Experience__c they wish to book. Then, use the "Create Experience Session Booking" action to complete the booking, ensuring that you pass the Session__c Id, not the Experience__c Id.
    14. Note: There should now be a total of three instructions.
    15. Click Save.
    16. Click Refresh (circular arrow) in the top right corner of the Conversation Preview.
0/9000