Skip to content

Instantly share code, notes, and snippets.

@rruhlen
Last active July 4, 2017 02:14
Show Gist options
  • Save rruhlen/a1ee8857bc822f425541be5de55ee19c to your computer and use it in GitHub Desktop.
Save rruhlen/a1ee8857bc822f425541be5de55ee19c to your computer and use it in GitHub Desktop.
Custom Action to create a new email case. POST to /api/v2/customers/{{case.customer.id}}/cases.
{
"type": "email",
"subject": "Follow up for case {{case.id}}",
"priority": "{{case.priority}}",
"status": "open",
"labels": [
"Demo Followup"
],
"custom_fields": {
"case_id": "{{case.id}}"
},
"_links": {
"customer": {
"href": "/api/v2/customers/{{case.customer.id}}",
"class": "customer"
},
"assigned_user": {
"href": "/api/v2/users/{{case.current_user.id}}",
"class": "user"
}
},
"message": {
"direction": "out",
"status": "pending",
"from": "support@zzzricky.desk-mail.com",
"to": "{{case.customer.email}}",
"subject": "Follow up for case {{case.id}}",
"body": "{{case.phones_and_notes.last.summary}}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment