Using Email X-Headers to Add External Emails to Customer History
Last Updated -
Important Note: X Headers are something that your tech team would setup on the emails that your system is generating. As long as your system sends the email to Desk, they will be interpreted correctly by our system.
Getting StartedIf you would like to use an external system to send email to "firstname.lastname@example.org" and your support mailbox is "email@example.com", you can take the following steps:
- Set an x-header called “x-desk-customer-email” to firstname.lastname@example.org (switch to your customer's email address) - this can be the complete "email To" syntax, including the first and last names, followed by the email address: “Joe Customer <email@example.com>” - if this email address does not yet exist, Desk.com will create the customer record and will also set the first and last name by parsing this field.
- Set an x-header called “x-desk-interaction-direction” to “out”. This will tell our system that this is actually an outbound request. This can be used for reporting purposes.
- Set an x-header called “x-desk-case-status” to any of our case statuses, but most likely to either “resolved” or “closed” so that we can immediately remove this item from common filters as it likely does not need any agent action.
- BCC firstname.lastname@example.org (switch to your real support mailbox address) when you send the message. This will send a copy of the email into your Desk.com system.
- Send the email to email@example.com (switch to your customer email address) as you normally would.
Once the emails comes into the Desk.com system, you should see that it will be attributed to the appropriate customer and will be a part of their history.
In addition, you can also tie these emails to an external case ID by using the x-header, “x-desk-case-external-id”. If three emails come into our system all with the same value for this header, they will be part of a single case rather than being individual cases.
For information on additional fields that can be set using X-Headers, see the FAQ, Using Email X-Headers to Populate Case and Customer Data.