1. Home
  2. Developers
  3. 3rd Party Integration
  4. Integrating Desk with Apptentive

Integrating Desk with Apptentive

Synchronize and manage conversations with Desk.com

In this documentation, [[APP_ID]] has been put in place of your Apptentive App ID, of which each app has one. This can be found in the URL of each Apptentive app: https://be.apptentive.com/apps/4eec2417687b69000100 where 4eec2417687b69000100 is the App ID. For example: /apps/[[APP_ID]]/integrations/desk would translate to /apps/4eec2417687b69000100/integrations/desk.

The Apptentive Desk Integration automatically opens tickets in Desk and keeps them in sync when your customers provide feedback in-app. When you reply via Desk, the feedback is automatically routed back to the customer and displayed within your app in Message Center.

Because Apptentive provides a single conversation for a given customer, only one active case in Desk.com will receive the messages a customer sends via Message Center. If there’s no currently active case in Desk.com for the customer, a new one will be created. Likewise, if a case is closed in Desk, making it read-only, we will archive the Conversation in Apptentive, and the next message to come in from a customer will open a new ticket in Desk.

Note: For each Apptentive app you would like to integrate with Desk, you will need to activate the Desk integration located under Settings –> Integration. On Apptentive’s side, we require the Subdomain, Consumer Key, Consumer Secret, OAuth Token, and OAuth Token Secret associated with the Desk account. You will only need to set up your configuration on Desk.com once.

Please also note that Desk.com locks cases while you’re viewing them, and while the lock is in place we are unable to update the case with new messages. When this occurs, we will retry updating the case every 3 minutes until the case is unlocked.

To get started, you’ll need to configure settings in Desk.com:

  1. Go to: “Admin,” “Apps,” “Browse Apps,” find “Custom Action” and click “Install,” then on the following page, select “Install Custom Action.”
  2. Set “Name” to “Apptentive.”
  3. Set “Authentication Method” to “None.”
  4. Set “URL” to https://notify.apptentive.com
  5. Click “Create.”
  6. Click “Add Action.”
  7. Set “Name” to “Notify.”
  8. Set “Action Type” to “POST a string to a URL” (default).
  9. Set “Appended URL path” to /apps/[[APP_ID]]/integrations/desk
  10. Set “Message to POST” to the following block:
    { "ticket": { "id": {{case.id}}, "status": "{{case.status.name | downcase}}", "subject": "{{case.subject | escape}}", "created_by": { "name": "{{case.customer.name}}", "email": "{{case.customer.email}}" } }, "message": { "id": "{{case.id}}-{{case.emails.last.created_at | date: '%s'}}", "created_at": "{{case.emails.last.created_at}}", "sender": { {% if case.emails.last.agent %} "name": "{{case.emails.last.agent.name}}", "email": "{{case.emails.last.agent.email}}" {% else %} "name": "{{case.emails.last.from_customer.name}}", "email": "{{case.emails.last.from_customer.email}}"{% endif %} }, "body": "{{case.emails.last.new_text | escape}}" } }
  11. Check the radio button to the left of “Notify” to enable the action.
  12. Go to “Cases,” “Rules.”
  13. Go to “Inbound Interaction” and click “Add Rule.”
  14. Set “Name” to “Notify Apptentive (inbound) [[APP_ID]]”.
  15. Under “Interaction Types” select “Email,” and click “Add.”
  16. Under “Rule Actions” click “Add Action,” then select “Trigger an App Action” and “Apptentive: Notify” (or whatever App and Action names you used above).
  17. Set “Enabled” to “Yes”, then click “Update”.
  18. Go to “Outbound Interaction” and click “Add Rule”.
  19. Set “Name” to “Notify Apptentive (outbound) [[APP_ID]]”.
  20. Under “Interaction Types” select “Email,” and click “Add.”
  21. In the next view under “Rule Actions,” click “Add Action” then select “Trigger an App Action” and “Apptentive: Notify” (or whatever App and Action names you used above).
  22. Check the radio button next to “Enabled,” then click “Update.”
  23. In the left menu, navigate to “Case Closed” and click “Add Rule.”
  24. Set “Name” to “Notify Apptentive (closed) [[APP_ID]]” and click “Add.”
  25. In the next view under “Rule Actions” click “Add Action,” then select “Trigger an App Action” and “Apptentive: Notify” (or whatever App and Action names you used above).
  26. Check the radio button next to “Enabled,” then click “Update.”

Once this is complete, enter your Consumer Key, Consumer Secret, OAuth Token, and OAuth Token Secret into the form located on the Apptentive dashboard under Settings –> Integrations, along with the subdomain you use to access Desk.com.

Updated on October 13, 2016

Was this article helpful?

Related Articles