How to Integrate Zendesk with ContextSmith Opportunity

(You have to have Admin role)

Want to see your Zendesk tickets in an Opportunity, right next to your other customer interactions? ContextSmith has a webhook for that. Here's how you set it up.

Note: This article assumes one organization in Zendesk maps to one Opportunity in ContextSmith.  If you have one organization that maps to multiple ContextSmith Opportunity, contact us and we can help customize the webhook.

1. Find your webhook URL. Go to your Settings page.  You can also open it through the dropdown menu from your user icon in the top right corner. 


Your webhook URL should be in the middle of the page. It should look like


2. Create a HTTP Target on Zendesk. In Zendesk Support, click the Admin icon () in the left sidebar, then select Settings > Extensions.


Select the Targets tab. Click Add Target. Then, select the option for HTTP Target.


Configure the target to integrate with ContextSmith. Give it a title, and use your webhook URL from step 1 for the URL. Select POST for Method and make sure the Content type is JSON. Then, select Create Target and click Submit to save the target.

3. Use the ContextSmith Target as a Trigger action in Zendesk. While still in the Admin area, navigate to Business Rules > Triggers.

Click the Add Trigger button. Configure the trigger to use the ContextSmith target you created from step 2. Set the title, add the conditions that activate the trigger and add the action. Adding any conditions for Ticket is... Created and Ticket is... Updated is recommended. For the action, select Notifications: Notify target and choose the ContextSmith target. In the JSON body text area, copy-paste the following:

{"id":"{{}}","title":"{{ticket.title}}","link":"{{}}","via":"{{ticket.via}}","status":"{{ticket.status}}","priority":"{{ticket.priority}}","ticket_type":"{{ticket.ticket_type}}","group":"{{}}","tags":"{{ticket.tags}}","account":"{{ticket.account}}","due_date":"{{ticket.due_date_with_timestamp}}","created_at":"{{ticket.created_at_with_timestamp}}","updated_at":"{{ticket.updated_at_with_timestamp}}","organization":"{{}}","comments":[{% for comment in ticket.comments reversed %}{"text":"{{comment.value}}","author":"{{}}","created_at":"{{comment.created_at_with_time}}"}{% if forloop.last != true %},{% endif %}{% endfor %}],"assignee":[{"personal":"{{}}","address":"{{}}"}],"requester":[{"personal":"{{}}","address":"{{}}"}],"current_user":{"personal":"{{}}","address":"{{}}"},"cc":[{% for cc in ticket.ccs %}{"personal":"{{}}","address":"{{}}"}{% if forloop.last != true %},{% endif %}{% endfor %}]}

When you're done, click Create Target.

That's it!  The end result looks like the following:


One side note: Currently, ticket requester's email domain is used to determine which Opportunity each ticket should go to. Whenever a ticket is created or updated in Zendesk, it will show up at the top of the Timeline for the Opportunity whose account matches the ticket requestor's organization. Accounts can be modified at any time on ContextSmith to ensure tickets go to the right place. However, customization can be done to match on specific ID or other fields from Zendesk.

Have more questions? Submit a request



Article is closed for comments.