From 39b1df313806ccb1ff19ed3db5cfb337826cf1c5 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 3 Dec 2026 11:01:08 +1100 Subject: [PATCH] docs(zendesk): send the trigger's actions with its conditions A trigger PUT without actions is rejected with a 422. --- .claude/skills/zendesk-stuck-chat/SKILL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.claude/skills/zendesk-stuck-chat/SKILL.md b/.claude/skills/zendesk-stuck-chat/SKILL.md index 807d3d7..78d4eda 100644 --- a/.claude/skills/zendesk-stuck-chat/SKILL.md +++ b/.claude/skills/zendesk-stuck-chat/SKILL.md @@ -52,6 +52,18 @@ tr = s.request("GET", f"https://{sd}.zendesk.com/api/v2/triggers/64618370939417. print(tr["active"], tr["conditions"]) ``` +To set it, send the actions too: a PUT without them is a 422, "Trigger must contain at least one +action". + +```python +s.request("PUT", f"https://{sd}.zendesk.com/api/v2/triggers/64618370939417.json", json={"trigger": { + "active": True, + "conditions": {"all": [ + {"field": "comment_includes_word", "operator": "includes", "value": "endsession"}, + {"field": "comment_is_public", "operator": "is", "value": "false"}], "any": []}, + "actions": [{"field": "end_session", "value": "End Session"}]}}) +``` + Then add the note: ```python