---
schema_version: "1"
id: 05117c450bdf47bd8c9221303004e00827f4c90e2a1e1504c41cbb4c9ed70410
title: "Example: Send a Rich Link Response to a Customer With a Flow"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_response_recipe_rich_link_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_response_recipe_rich_link_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9d0363a82cdd4e634d75018cefdd27090c03ed6c31adadfd991f1a67c942784f
description: In this example, you send links and images associated with menus using an autolaunched flow and rich link response.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Example: Send a Rich Link Response to a Customer With a Flow

In this example, you send links and images associated with menus using an autolaunched flow and rich link response.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d212357e80">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d212357e80 ">To build and manage Service Agents:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d212357e80 ">
              <p>Manage Agentforce Service Agents AND Manage AI Agents</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d212357e80 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d212357e80 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

Before you begin:

- [Create an Agentforce Service agent](https://help.salesforce.com/s/articleView?id=service.service_agent_setup.htm&type=5&language=en_US). If you want to use an active agent, create a version of it or deactivate it.
- [Connect the service agent to an enhanced Messaging channel](https://help.salesforce.com/s/articleView?id=service.agent_setup_channels.htm&type=5&language=en_US).
- [Turn on adaptive response formats](https://help.salesforce.com/s/articleView?id=ai.agent_response_enable.htm&language=en_US).
- If you haven’t worked in Flow Builder before, see [Automate Tasks with Flows](https://help.salesforce.com/s/articleView?id=platform.flow.htm&type=5&language=en_US).

## Create a Custom Object

To store information about different menus, create a custom object.

1. [Create a custom object](https://help.salesforce.com/s/articleView?id=platform.dev_objectcreate_task_lex.htm&language=en_US) with these properties. Give the object a descriptive name, such as Menu.
    1. Data Type: Text
    2. Optional Features: Allow Reports, Allow Activities, Track Field History, Allow in Chatter Groups
    3. Object Classification: Allow Sharing, Allow Bulk API Access, Allow Streaming API Access
    4. Search Status: Allow Search
2. In Object Manager, click **Fields & Relationships** and then create these fields on the custom object.
    1. Image MIME Type with the Text data type.
    2. Menu with the Rich Text Area data type.
    3. Menu URL with the URL data type.
    4. Description Text with the Text data type.
3. Create a few records from this object. For example, you can create a dinner menu and lunch menu. Later, your agent uses information from these records in responses.

Make sure that the agent user has access to the custom object and its fields. Also, give your agent access to URLs by adding them to your [trusted URLs](https://help.salesforce.com/s/articleView?id=xcloud.security_trusted_urls_manage.htm&&language=en_US) and [CORS allowlist](https://help.salesforce.com/s/articleView?id=xcloud.extend_code_cors.htm&language=en_US).

## Create a Flow

To retrieve details from Menu records, create an autolaunched flow. Later, you create a custom agent action based on this flow.

1. From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
2. Click **New Flow**. Select **Autolaunched** and then **Autolaunched Flow (No Trigger)**.
3. In Flow Builder, create a menuList resource with these properties.
    1. Data Type: Record. Select **Allow multiple values (collection)**.
    2. Object: Menu
    3. Availability Outside the Flow: Available for output
4. Create a recordId resource with these properties.
    1. Data Type: Text
    2. Availability Outside the Flow: Available for input
5. Create a menuRecordId resource with these properties.
    1. Data Type: Text
    2. Availability Outside the Flow: Available for output
6. Create a menuURL resource with these properties.
    1. Data Type: Text
    2. Availability Outside the Flow: Available for output
7. After the Start element, click ![add icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/resources-global/_corporate/images/flow_plus_icon.png) and then add a Get Records element with these properties.
    1. Label: Get Menu Details
    2. Get Records of This Object: Select the Salesforce Object data source. From the Object dropdown, select the Menu object that you created.
    3. Filter Product Menu Records: Select the None–Get All Menu Records condition requirement.
    4. How Many Records to Store: All Records
    5. How to Store Record Data: Choose fields and assign variables (advanced).
    6. Select Variable to Store Product Menu Records: The menuList resource that you created.
    7. Select Menu Fields to Store in Variable: Name, ImageMimeType\_\_c, Menu\_\_c, MenuURL\_\_c, DescriptionText\_\_c
8. Save and activate the flow.
    
    ![Autolaunched flow with the Get Menu Details element](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/rich_link_flow_autolaunched.png)

Make sure that the agent user has the Run flows permission.

## Create a Custom Agent Action

Create a custom agent action that uses the Get Menu Details flow as a reference action.

1. Reference Action Type: Flow
2. Reference Action: Get Menu Details
3. Agent Action Instructions: Finds and retrieves details from a menu. For each menu, retrieves its name, image, MIME type, and URL. This action is for when a user asks to see the menu.
4. Loading Details: Getting menu
5. recordId input instructions: The single ID of the Salesforce record with the menu name.
6. menuList output instructions: A list of menu URLs. Select **Show in conversation**.
7. menuURL output instructions: The URL of the menu. Select **Show in conversation**.
8. menuRecordId output instructions: The single ID of the Salesforce record with the menu name. Select **Show in conversation**.

## Create a Custom Subagent

Create a custom subagent that includes the Get Menu Details action.

1. Open your Agentforce Service agent in Agentforce Builder.
2. [Create a custom subagent](https://help.salesforce.com/s/articleView?id=ai.copilot_topics_add_custom.htm&release=264.0.0&type=5 "Create a custom subagent to specify the actions and instructions an agent needs to meet your users’ particular business needs.") with these properties.
    1. Classification Description: This subagent handles customer requests for menu information.
    2. Scope: Your job is only to provide lists of available menus and display the details for a selected menu, including names, images, and URLs. If the user asks for a task that is out of scope, should state that you cannot assist and can only provide menu information.
    3. Instructions:
        
        Use the Get\_Menu\_Details action to get menu details for a given menu.
        
        When the user says: "give me the menu", always give a list of available menus.
    4. Include the Get Menu Details agent action in the subagent.

To test your agent, activate it and then chat with it on a connected channel.