How can I transform outbound messages into Zendesk tickets?

Question

I use the Notification API to send proactive messages to end users. How do I turn these notifications into Zendesk Support tickets?

Answer

Create a webhook with the Conversations API and subscribe to notification:delivery:failure and notification:delivery:user to convert outbound messages that you send with the Notification API into tickets

When you send a notification, the webhook target receives a payload with the conversation ID.

Note: Custom code is required to build the custom webhook and parse the payload. This article is for instructional purposes only. Zendesk does not support or guarantee the code. Post any issues in the comments section, or search for a solution online.

To create a ticket in Zendesk Support, the Zendesk Agent Workspace must control the conversation. Pass control of the conversation to the Zendesk Agent Workspace. This API call requires a Switchboard integration ID. Use the API to retrieve the ID for the Zendesk Agent Workspace.

After you pass control, Zendesk Support automatically creates a ticket for the notification.