Channel framework startup tutorial - Step 8: Provide native resource links in Zendesk Support (Clickthrough)

At this point, you have a working integration between Zendesk Support and WordPress. To enhance the agent experience, you can add a clickthrough endpoint to allow agents to view the external resource natively. For example, after implementing clickthrough in the WordPress integration service, agents can click a link in the ticket to see the comment in the WordPress UI.

The WordPress link highlighted in the screenshot illustrates how a clickthrough link would show up in Zendesk Support UI.

Add this clickthrough function inside wordpress.js:

exports.clickthrough = (externalId, res) => {  res.redirect(parseExternalCommentId(externalId).link);};

This function redirects the requester to the WordPress comment location.

When the agent clicks the clickthrough link in the Zendesk Support UI, Zendesk Support sends the external id of that comment to the integration service as a parameter. This is the only data Zendesk Support sends - it does NOT send the metadata, as this would be insecure.

When our WordPress code constructs an external ID, it includes the post URL. The clickthrough code uses that portion of the external_id. Previously, we discussed an example external_id:


You can see the comment URL has no relationship to the post_id (post ID is 8, but the clickthrough URL doesn’t contain “8”.).

If you open any WordPress ticket in Zendesk Support UI, you can click the link and see the comment in WordPress.

This concludes the tutorial for integration service. To recap, you did the following:

  • Created a pull endpoint to fetch data from WordPress
  • Created a channelback endpoint to post reply to WordPress
  • Added the manifest telling Zendesk Support where the pull and post endpoints are located
  • Added an admin ui allowing Zendesk Support admin to setup the WordPress integration
  • Created a Zendesk app to register your new integration service with Zendesk Support
  • Learned how to use Zendesk Support to store the metadata and state
  • Created a clickthrough endpoint for viewing a comment natively in WordPress