Action statistic__set
System ID:
action_statistic__set
Also in scenario:statistic__set
Description
Stores a satisfaction survey result (NPS or quality) after a closed operator chat: updates the last chat-close statistics, the chat room CSAT, and creates a statistics record. The type is set by the type parameter.
For simply saving answers to the NPS table, see also operator_panel__nps_confirm_answer.
Events (scenario branches)
| Event | When it occurs |
|---|---|
| success | Statistics saved |
| error | Invalid type, missing score / comment, no chat-close statistics, or save failure |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type |
string | yes | nps |
Survey type: nps or quality |
User constants:
| Type | Constant | Description |
|---|---|---|
nps |
nps_answer |
NPS score (number) |
nps |
quality_comment |
Optional comment |
quality |
quality_answer |
Quality score |
quality |
quality_comment |
Optional comment |
Configuration example
{
"type": "nps"
}
Constants:
{
"nps_answer": 9,
"quality_comment": "Thank you!"
}