Use Case 7b: Rating after the dialog (CSAT / NPS)
Level: basic · Modules: Scenario Builder, Custom Data · Actions: custom_modules__set, optionally statistic__set
Required permissions and access
| What you need | Where in the menu | Why |
|---|---|---|
| Scenario Builder | Menu → Scenario Builder | CSAT section, connect with chat_closed_alias |
| Custom Data | Menu → Custom Data | Model feedback_scores, INTEGER field |
If a section is missing from the menu — check your account permissions or contact ConnectiveOne support.
Business context
After finishing a dialog with an operator (or self-service), the bot asks to rate service quality and saves the result. Typical requirement: rating only via buttons; free text must not enter an INTEGER field.
Expected result
- Entry into the CSAT section via alias after dialog close (
chat_closed/exit_*). - Customer chooses a rating with buttons 1 / 3 / 5 (or your set).
- Rating is stored in Custom Data (INTEGER field type).
- Free text instead of a button does not enter the INTEGER field (edge
erroror validation). - Optionally:
statistic__setfor platform statistics.
Flow architecture
[Connect blocks] chat_closed_alias → exit_csat
→ send-message-keyboard (1 / 3 / 5)
├─ buttons → custom_modules__set (rate: INTEGER)
├─ source-handle → Router / validation (NOT directly into __set)
└─ error on __set → “Choose a rating with a button”
→ (optional) statistic__set
→ “Thank you for the rating”
Link to other settings
The dialog-close alias (chat_closed_alias / exit_*) is set in the connect block and must match in all connect branches in the scenario. Closing the dialog triggers entry into the CSAT section — this is operator-loop + scenario behavior together.
It is recommended to have connect from Use Case 3 before configuring CSAT.
Step-by-step implementation
Step 0. Custom Data — scores model
Custom Data → New model feedback_scores:
| Field | Type | Alias |
|---|---|---|
| Score | INTEGER | rate |
| Channel | text | channel |
| Comment | text | comment (optional) |
Type INTEGER for rate is required; free-text into this field will cause a write error.
Step 1. Connect blocks — single exit alias
In every operator_panel__connect_to_operator_with_msg (and other connects, if any):
| node_params | Value | Why |
|---|---|---|
chat_closed_alias |
exit_csat |
After dialog close — enter the CSAT section |
Audit (self-check): walk all connect blocks in the scenario — alias is the same; no duplicated alias entrypoint in the CSAT section.
Step 2. Entry alias — CSAT section
- Section with entry point
exit_csat. send-message-keyboard: “Rate the service” + buttons1,3,5.
| Parameter | Why |
|---|---|
validation.type |
none only if source-handle is disconnected or protected |
| Edges on each button | → custom_modules__set with feedback_scores:rate = button value |
Critical: the source-handle edge (fallback for free text) must not go directly into custom_modules__set. Options:
- Disconnect source-handle.
- Or → Router / re-ask / validation.
Step 3. Action — custom_modules__set
| node_params | Value |
|---|---|
module_name |
feedback_scores |
set_to |
feedback |
| constants | feedback_scores:rate from the button, feedback_scores:channel = {{channel}} |
Edges: success → thank-you · error → “Could not save the rating” + check field type.
Step 4 (optional). statistic__set
If the instance uses platform CSAT statistics — add the action after a successful CD write per the actions reference.
Step 5. Channels without keyboard
Check supportedMessengers on the keyboard node: for email / channels without buttons — a separate branch (text rating with validation or skip CSAT).
Acceptance criteria (self-check Runs)
Common mistakes
| Symptom | Cause | What to do |
|---|---|---|
| INTEGER type error | Free-text in rate |
Protect source-handle, validation |
| CSAT does not start | Different chat_closed_alias values |
Audit all connect blocks |
| Duplicate entry | Two exit_csat in sections |
Keep one entrypoint |
| Write OK, statistics empty | No statistic__set |
Add optionally per docs |