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