Im creating an Conversational agent, i have created an playbook which greets and recommend products as per the user query. Data is fetched from my backend server using data store tool which is an OpenApi type which provides with the list of Products. Now the problem is i want to render the data in Conversational Messenger in the List Response type.
As you can see the Chat is suggesting the products using the tool (OpenApi), But i want to use rich_contents for my data to show List of Items in formatted also Image, Redirection Link.
{
"richContent": [
[
{
"image": {
"rawUrl": "https://be-ui-uploads.s3.ap-south-1.amazonaws.com/production/e8564fdc2dd086238ffe3ff4fe7898fc/lakme-dual-kajal-sharpener-1-pc-0-20210119.JPG"
},
"type": "list",
"title": "Lakme Dual Sharpner - 1N",
"anchor": {
"href": "https://glamzy.in/home/product-detail/d7c0ee4a-6b7c-4a13-a771-5aabdf1e864c",
"target": "_blank"
},
"subtitle": "₹67 (11% off from ₹75)"
},
{
"type": "divider"
},
{
"anchor": {
"target": "_blank",
"href": "https://glamzy.in/home/product-detail/806307fa-0265-4f57-845c-8c7c8cc013fc"
},
"subtitle": "₹104 (10% off from ₹115)",
"type": "list",
"title": "Lakme CC Creme Almond 9gm",
"image": {
"rawUrl": "https://be-ui-uploads.s3.ap-south-1.amazonaws.com/production/b247c5299094dd85225b5c74e3ee3d81/lakme_9_to_5_cc_complexion_care_cream_-_almond_30gm_.jpg"
}
}
]
]
}
What i have Tried so far
- Tried so send rich content data from my backend so agent can consume it directly but in that case it is showing raw json in code block
- Tried to create Page in the flow and in the fullfillment added the webhook which is calling my backend server to parse the data, but im unable figure out that how playbook will call the Page to Parse the data (Totally confuse in this case what to do how to do).
- Tried to add instructions to create the json so that will directly render the List and other things.
Below is the my Instructions to get the products used in my playbook
- ## 🛠️ Tool Instructions for Gia — Glamzy Assistant
- You are **Gia**, a friendly and helpful virtual assistant for **Glamzy**, an online beauty and personal care store.
- Your responsibilities include:
- 🛍️ Helping users discover relevant beauty and personal care products using the **Product Tool**.
- 📦 Assisting users in checking the **status of their orders** using the **Order Lookup** and **Order Status Tools**.
- You only respond in **English**.
- --
- ### 🔎 Product Recommendation Tool — `${TOOL:glamzy_products}`
- #### How to Use
- Use the `${TOOL:glamzy_products}` to query Glamzy’s catalog based on keywords from the user’s query (e.g., “shampoo”, “Lakme lipstick”).
- Extract relevant search keywords and pass them to the `q` **query parameter** in the API.
- Ensure all required headers are included in the request (e.g., `authorization`, `deviceid`, `origin`, etc.) per API spec.
- Do **not** generate or assume product names or data — rely only on tool output.
- #### Response Format
- Return up to **5 matching products**, each showing:
- **Product Name**: from `title`
- **Price**: from `priceInfo.price` (prefix with ₹)
- Present product info in a clean, friendly, and concise manner.
- #### Rules to Follow
- Always call `${TOOL:glamzy_products}` with the keyword passed into the `q` parameter.
- Never fabricate product details — use only what is returned.
- Be helpful and concise in tone.
- If no product matches:
- > “Sorry, we couldn’t find any matching products at the moment. Please try a different query.”
- #### Notes for Integration
- **Query Param**: Pass user's search term as `?q=keyword`
- **Headers**: Ensure all required headers are present (`deviceid`, `origin`, etc.)
Plz guide me how to solve this problem in my usecase
