Adaptive Response Format: Rich Link Response
A rich link response is a web page link with a title and image. Currently, rich link response is available for Agentforce Service Agent only.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with Foundations, or Agentforce 1 or Einstein 1 Editions |
Adaptive Response Format Details
| Mapped messaging component | Enhanced link |
| Supported channels | For supported channels, see channels associated with the Messaging connection. Rich choice responses appear as rich content in Omni Supervisor. |
Considerations
- You can’t customize the mapped messaging component in Messaging Component Builder.
- Rich link response supports these messaging component formats:
- Media for enhanced Facebook Messenger channels
- Rich link for Enhanced Chat V1, enhanced Apple Messages for Business, and enhanced LINE channels
- Text for all supported channels
- Rich link response supports PNG, JPEG, and JPG image formats.
- A rich link response can have one image and URL only. To include multiple images and URLs in responses, use Adaptive Response Format: Rich Choice Response.
- To prevent disruptions in performance, include the MIME type with each image or include an image URL with a .jpg, .jpeg, or .png file extension. If you don’t include the MIME type or a URL with a supported file extension, the image MIME type defaults to image/jpeg.
- To use rich link response with a custom client deployment that uses the Enhanced Chat REST API, the client must support the Text, Rich Link, and Media messaging component formats.
To use the rich link responses in agent responses, create a custom agent action that returns the required information. For a sample reference action, see the example Apex class.
- Link URL
- URL of the website.
- Link Title
- Text to display with the URL.
- Link Image URL
- Publicly accessible URL of the image. As a best practice, include the image file extensionin the URL. For example, www.example.com/image.jpg.
- Link Image MIME Type
- Optional. MIME Type of the image. For example, image/jpeg.
- Description Text
- Optional. Text sent immediately before the rich link. For example, 'Great choice! This item was created with the most incredible materials. Learn more about this item.'
This Apex class retrieves item details based on a list of item names. It returns a list of objects, each containing an item name, URL, title, image URL, and MIME type.
Example
public class GetItemDetailsInvocable {
// Represents input for getItemDetails.
public class ItemDetailRequest {
@InvocableVariable(label='Item Name' description='The name of the item' required=true)
public String itemName;
}
// Defines structure for output of getItemDetails.
public class ItemDetail {
public String linkURL;
public String linkTitle;
public String linkImageURL;
public String linkImageMimeType;
public String descriptionText;
}
// Represents output of getItemDetails
public class ItemDetailResponse {
@InvocableVariable(label='Item Details' description='linkURL, linkTitle, Image linkURL, MIME Type, and description for a given item name' required=true)
public List<ItemDetail> itemDetails;
public ItemDetailResponse() {
this.itemDetails = new List<ItemDetail>();
}
}
@InvocableMethod(label='Get Item Details' description='Returns linkURL, linkTitle, image linkURL, MIME Type, and description for a given item name')
public static List<ItemDetailResponse> getItemDetails(List<ItemDetailRequest> requests) {
List<ItemDetailResponse> responses = new List<ItemDetailResponse>();
for (ItemDetailRequest request : requests) {
ItemDetailResponse response = new ItemDetailResponse();
ItemDetail itemDetail = new ItemDetail();
String itemName = request.itemName.toLowerCase();
// Example item data.
if (itemName.contains('item1')) {
itemDetail.linkURL = 'https://www.example.com/item1';
itemDetail.linkTitle = 'Item 1';
itemDetail.linkImageURL = 'https://www.example.com/image1.jpg';
itemDetail.linkImageMimeType = 'image/jpeg';
itemDetail.descriptionText = 'This is an amazing item!'
} else if (itemName.contains('item2')) {
itemDetail.linkURL = 'https://www.example.com/item2';
itemDetail.linkTitle = 'Item 2';
itemDetail.linkImageURL = 'https://www.example.com/image2.png';
itemDetail.linkImageMimeType = 'image/png';
itemDetail.descriptionText = 'This is a great item!'
} else if (itemName.contains('item3')) {
itemDetail.linkURL = 'https://www.example.com/item3';
itemDetail.linkTitle = 'Item 3';
itemDetail.linkImageURL = 'https://www.example.com/image3.png';
itemDetail.linkImageMimeType = 'image/png';
itemDetail.descriptionText = 'This is a wonderful item!'
} else {
itemDetail.linkURL = 'https://www.example.com/default';
itemDetail.linkTitle = 'Unknown Item';
itemDetail.linkImageURL = 'https://www.example.com/default.jpg';
itemDetail.linkImageMimeType = 'image/jpeg';
itemDetail.descriptionText = 'This is an item!'
}
response.itemDetails.add(itemDetail);
responses.add(response);
}
return responses;
}
}
- 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.
Did this article solve your issue?
Let us know so we can improve!

