> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bevits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Satisfaction survey after support

> Send a satisfaction survey (CSAT) automatically when an inbox conversation is resolved, by an agent or by the AI.

## How it works

Every time an inbox conversation (WhatsApp, Instagram or email) is resolved, Bevits records the **Conversation resolved** event (`conversation_resolved`) in the customer's history. A flow with this trigger sends the survey a few minutes later, over WhatsApp or email, with the name of the agent and the survey link.

* **Agents and AI alike:** the conversation counts when an agent clicks **Mark as resolved** and when [AI customer service](https://docs.bevits.com/en/features/ai-customer-service.md) ends the service.
* **One survey per service:** each resolution records one event. If the customer writes again and the conversation is resolved again, a new event is recorded; marking an already resolved conversation as resolved does not record another one.
* **Only when the service is over:** the event is recorded once the conversation has stayed resolved for 10 minutes, with the time it was resolved. If the customer writes again within those minutes, no event is recorded. If the conversation reopens while the flow waits, before the survey goes out, the flow stops for that customer, and that stop does not count toward **How often a customer enters**: the survey still goes out when the conversation is resolved for good.
* **No integration needed:** Bevits records the event itself, without any call from your store. See its properties in [Events recorded by Bevits](https://docs.bevits.com/en/api-reference/recommended-events.md#events-recorded-by-bevits).

## Requirements

* Customer service through the Bevits inbox.
* Your survey link, from any form tool.
* For the WhatsApp Official API, a Meta-approved template with the survey link.

## Building the flow

**1. Choose the Conversation resolved trigger**

In **Flows**, create a flow and choose the **Events API → Custom event** trigger. In **Event name**, choose `conversation_resolved` (Conversation resolved). It shows up in the list even before the first conversation is resolved.

Use **property filters** to choose which services to rate:

| Filter | What for |
| - | - |
| `resolved_by` equals `agent` | Only services by people on your team. Use `ai` to rate only the AI. |
| `channel` equals `whatsapp` | Only conversations on one channel. |
| `messages_count` greater than or equal to `4` | Ignores short conversations, such as a "thanks" that reopened the conversation. |

**2. Wait 10 minutes**

Add a **Wait** block of 10 minutes. The farewell arrives before the survey, and the customer never gets the survey in the middle of a new question.

**3. Send the survey**

Add a WhatsApp or email block with the survey link. The event properties are available as variables:

| Variable | Content |
| - | - |
| `{{event.agent_name \| default: "our team"}}` | The agent's name, or the fallback text when the AI resolved it. |
| `{{event.channel}}` | `whatsapp`, `instagram` or `email`. |
| `{{event.conversation_id}}` | Identifies the service. Put it in the link to know which conversation each answer is about. |

**4. Activate the flow**

The flow applies to conversations resolved after it is activated.

Example message:

```text theme={null}
Hi! This is Your Store. How was your service with {{event.agent_name | default: "our team"}}?
It takes less than a minute: https://survey.yourstore.com/csat?conversation={{event.conversation_id}}
```

> [!TIP]
>
> Using an Official WhatsApp template imported from Meta with a link button that ends in a variable, like `https://forms.example.com/{{1}}`? In the flow block, the **Buttons** section shows the fixed start of the link and asks for the end: pick a field, like `{{event.conversation_id}}`, or write the text. **Send test** asks for the same end, and the flow only activates once the link is filled in.

> [!TIP]
>
> Prefer a survey by link. If the customer replies with a score in the conversation itself, the conversation reopens and, when it is resolved again, records another `conversation_resolved`. The `messages_count` and `resolved_by` filters prevent a second survey in those cases.

> [!TIP]
>
> For customers who talk to the store several times in the same week, set the trigger's **How often a customer enters** to **at most once every 7 days**. The customer gets one survey a week, however many conversations they have. See how [reentry](https://docs.bevits.com/en/api-reference/custom-events.md#limiting-how-often-a-customer-enters) works.

## Getting the answer back as an event

The answer can come back to Bevits as an event from your store. Set up the survey tool to send, for each answer, an event such as `csat_answered` through the [events API](https://docs.bevits.com/en/api-reference/custom-events.md), with the score and the `conversation_id` from the link:

```json POST /v1/events theme={null}
{
  "name": "csat_answered",
  "customer": { "email": "ana@example.com" },
  "properties": { "conversation_id": "3f1c2a90-7b4e-4f7a-9d55-0c6a1e2b8f10", "score": 5, "comment": "Solved it quickly!" },
  "external_id": "csat_3f1c2a90-7b4e-4f7a-9d55-0c6a1e2b8f10"
}
```

With the answer recorded, you can:

* **Remind who did not answer:** after the survey, a **Wait for event** block waits up to 1 day for `csat_answered` with **Same value as the starting event** on `conversation_id`; when the time runs out, send a reminder.
* **Act on low scores:** a flow with the `csat_answered` trigger and the filter `score` less than or equal to `2` alerts your team or offers an apology coupon.
* **Segment customers:** the event stays in the customer's history and can be used in segments.

## Who receives the survey

`conversation_resolved` is a **utility** event: the message reaches customers who never opted in to marketing, but never those who unsubscribed. On the WhatsApp Official API, the utility rule applies to templates approved in the `utility` category; a template approved as marketing only reaches customers who opted in to marketing. See the full rules in [Who receives the flow's messages](https://docs.bevits.com/en/api-reference/custom-events.md#who-receives-the-flows-messages).

The customer of the event is the customer linked to the conversation. Without a link, Bevits finds the customer by phone (WhatsApp) or by the sender's verified email address, and creates the customer when nobody has that contact. Instagram conversations without a linked customer do not record the event.

## Testing before you activate

In **Settings → Events**, send a test event named `conversation_resolved` with the properties from the example to check the filters and variables. Test events never send messages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.