Using Email X-Headers to Add External Emails to Customer History

Last Updated -

If your own systems are generating emails that go to your customers, you could also be pushing these into Desk. Desk.com offers the ability to track newsletters and emails from external systems as part of the Desk.com customer record. You can achieve this goal with the use of email x-headers. 

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 Started

If you would like to use an external system to send email to "customer@customer.com" and your support mailbox is "support@support.com", you can take the following steps:  
  1. Set an x-header called “x-desk-customer-email” to customer@customer.com (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 <customer@customer.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.
  2. 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.
  3. 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.
  4. BCC support@support.com (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.   
  5. Send the email to customer@customer.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.