curl --request PATCH \
--url https://platform.thena.ai/v1/csat/rules/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"name": "High Priority Ticket Survey",
"description": "Sends CSAT surveys to customers with high priority tickets",
"isActive": true,
"allFilters": {
"ticket": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
},
"account": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
},
"contact": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
}
},
"anyFilters": {
"ticket": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
},
"account": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
},
"contact": {
"standardFields": [
{
"field": "status",
"operator": "=",
"value": "open"
}
],
"customFields": [
{
"field": "custom_CFLLXQWWY4Z",
"customFieldId": "CFLLXQWWY4Z",
"operator": "=",
"value": "Value"
}
]
}
},
"triggerConfig": {
"triggerType": "always",
"randomPercentage": 10,
"triggerEvent": "ticket_resolved",
"delayMinutes": 30
},
"feedbackConfig": {
"enabled": true,
"feedbackType": "star",
"customTitle": "How was your experience?",
"customMessage": "Please rate your satisfaction with our support.",
"customThankYouMessage": "Thank you for your feedback!",
"includeCommentField": true,
"commentFieldLabel": "Additional Comments",
"commentFieldPlaceholder": "Please share any additional feedback here...",
"brandingColor": "#3366CC",
"deliveryChannel": "email"
},
"priority": 1
}'