How to Use AgentForce in Salesforce using Flow

April 14, 2025


 

 

After completing this unit, you will be able to understand how AgentForce runs.

  1. AgentForce is Designed for Specific Organizations.
  2. What is AgentForce?
  3. How is it used in Salesforce?

AgentForce is Designed for Specific Organizations

AgentForce is not available for all Salesforce organizations by default. It is designed for businesses that require AI-powered automation to enhance sales, service, and marketing operations. If your organization is eligible, you can set up an AgentForce environment by following the official Salesforce Trailhead guide. Click here to learn more

What is AgentForce?

Agentforce is Salesforce's AI-powered platform that enables businesses to create and deploy autonomous agents to handle tasks across various functions, such as sales, service, marketing, and commerce. These agents can autonomously resolve customer issues, qualify sales leads, and optimize marketing campaigns, thereby enhancing operational efficiency and customer engagement.

How is it used in Salesforce?

  1. Create a flow

    Auto-Launch Flow in Salesforce. This flow will fetch the Priority field from a Case record and assign it to an output variable.

    1. Create a New Auto-Launch Flow
      1. Log in to Salesforce and go to Setup.
      2. Search for Flows in the Quick Find box.
      3. Click New Flow.
      4. Select Auto-Launch Flow (No Trigger) and click Create.
    2. Add a Get Records Element
      1. Click the "+" icon and select Get Records.
      2. Enter a label: Get Case Priority.
      3. Select Case as the object.
      4. Under Filter Case Records, set:
        • Field Id
        • Operator: Equals
        • Value: Select Input Variable (Create a new input variable: var_Priority).
      5. Under Fields to Store, select Priority.
      6. Store All Records.
      7. Click Done.

    3. Add an Assignment Element
      1. Click the "+" icon and select Assignment.
      2. Enter a label: Assign Priority to Output.
      3. Create a new output variable:
        • Variable Name: var_CasePriority
        • Data Type: Text
        • Availability: Available for Output
        • CheckBox: Allow multiple values (collection)
      4. Set the assignment:
        • var_CasePriority = Get Case Priority → Priority
      5. Click Done.

    4. Save and Activate the Flow
      1. Click Save, and give the flow a name (e.g., AgentForce Get Case Priority).
      2. Click Activate.

  2. Use flow in AgentForce

    The created flow is then used in AgentForce Actions to automate tasks, retrieve case details, and enhance workflow automation. AgentForce triggers the flow to fetch and return the required data.

    1. Setup and Search for the Agent
      1. Open AgentForce.
      2. Click on Setup in the main menu.
      3. Use the Search bar to find "Agent".
      4. Click on Agent from the results.
    2. Selecting Coral Cloud Experience Agent
      1. Locate Coral Cloud Experience Agent in the list.
      2. Click on it (it will be blank initially, meaning it’s ready for configuration).
    3. Open in Builder
      1. Click on Open in Builder to start configuring the agent.
    4. Create a New Topic
      1. Click on the New Tab button.
      2. Click Add New Topic to create a new conversation flow.
      3. Fill in the following details:
        • Label: Name of the topic.
        • Classification Description: Define what this topic is about.
        • Scope: Define the boundary or extent of this topic.
        • Instruction: Provide details about how the agent should handle this topic.
      4. Click Next and then Finish.

    5. Configure Actions for This Topic
      1. Navigate to This Topic’s Actions tab.
      2. Select Flow as the action type.
      3. Choose the relevant Flow from the list.

    6. Define Agent Instructions
      1. Fill in the following fields:
        • Agent Action Instructions: Describe what the agent should do when handling this topic.
        • Input Instructions: Define what kind of input is expected from the user.
        • Output Instructions: Define what the agent should respond with.

    7. Configure Input and Output Settings
      1. Check the box for Required Input (ensures necessary user input).
      2. Enable Show Conversation on Output (displays the conversation in the chat).

    8. Save the Configuration
      1. Click Save to finalize the setup.

Search in Chatbot for Values in AgentForce