Cards, suggestions and actions
Show products, orders and plans as cards in the chat, suggest follow-up questions, and let a card's button act on your website.
Answers can come with cards (a product, an order, a plan, a booking slot) and suggested follow-ups the customer can tap. A card's button can open a page or run a browser action: a function on your own website, such as adding a product to the cart.
Where cards come from
The AI never writes a card. Cards are built from data:
- Store products from a Shopify or WooCommerce store connected under Integrations. The AI finds them by meaning ("shoes for trail running"), and each card shows the photo, price, options and stock.
- Lookups with display settings (below): your API's JSON, shown as cards.
- Integrations such as Stripe (plan, invoices) or Cal.com and Calendly (open times).
- Lead forms: a short form the customer fills in under the answer.
The AI decides when to show cards and which ones, the same way it decides what to cite. A price, link or stock level always comes from your data, never from the model.
Suggested follow-ups
After an answer, the AI may suggest up to three follow-up questions the customer is likely to ask next. Tapping one sends it as the customer's message. They show only under the latest answer.
Show a lookup's results as cards
When you add or edit a lookup, turn on Show results as cards in the chat and name the fields of your JSON response, with dots for nested fields:
| Field | Example | What it is |
|---|---|---|
| List of results | orders |
The array of items. Leave empty when the response is one item. |
| Title | number |
Required. |
| Subtitle | status |
|
| Price | total_formatted |
Shown as written. |
| Image URL | image.url |
|
| Link | tracking_url |
Opens when the card's title is clicked. |
| Button | Track order |
Opens the link, or runs a browser action (below) with values from the item, e.g. order_id=id. |
Use Test to see the cards a call produces. Links must be http(s); anything else is dropped.
Browser actions
A browser action is a function on your page that a card's button can run. Register it after the chat snippet:
<script>
PandaDesk('action', 'add_to_cart', {
description: 'Add a product to the cart',
params: ['variant_id', 'quantity'],
run: async ({ variant_id, quantity }) => {
await myStore.addToCart(variant_id, quantity);
return { message: 'Added to your cart' };
},
});
</script>
- Only a click runs it. The customer clicks the button; the AI never runs an action by itself.
- Only what you registered. A button for an action this page didn't register isn't shown. Names starting with
pandadesk.are reserved for the chat's own buttons (like booking a Cal.com time) and can't be registered. - It runs in the customer's browser, with their own session and cart. PandaDesk never sees their cookies.
- Return a message to show under the button, or throw an error to show that it didn't work. The team sees "Customer clicked Add to cart" in the conversation.
Shopify themes get add_to_cart built in: the chat adds to the shopper's cart through the theme's cart API and fires cart:updated and cart:refresh events so the cart icon updates. Register your own add_to_cart to replace it.
In the inbox and elsewhere
- Inbox: the cards a customer saw show as a compact list under the AI's reply.
- Phone app and MCP: cards and suggestions show as text.
- Webhooks:
message.createdevents include the cards asblocks.