Using Email X-Headers to Populate Case and Customer Data

Last Updated -

Desk.com offers the ability to populate customer, case, and interaction details by using email x-header data.

This can be used to:

  • Add outbound messages, such as system notifications or newsletter to the history of a customer.
  • Capture additional information on an email form from your website. (This can also be done with a Desk.com Email Widget)

Here are the fields that can be set through x-headers:
 
Customer Fields
  • Email: x-desk-customer-email1
  • Custom Fields: x-desk-customer-custom-[custom field key]
 
Case Fields
  • Labels: x-desk-case-labels (comma delimited)
  • Status: x-desk-case-status
  • External ID: x-desk-case-external-id2
  • Custom Fields: x-desk-case-custom-[custom field key]3
  • Case Language: x-desk-case-language (ex: "ES")
 
Interaction Fields
  • direction: x-desk-interaction-direction4
  • ip address: x-desk-interaction-ip-address
  • latitude: x-desk-interaction-lat
  • longitude: x-desk-interaction-lng
  • city: x-desk-interaction-city
  • region: x-desk-interaction-region
  • country code: x-desk-interaction-country-code
  • user agent: x-desk-interaction-user-agent

1The customer email can contain 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 By using the external id x-header, you can link multiple emails to a single case. For example, if three emails come into our system all with the same external id, they will all be part of the same single case rather than creating individual cases.
3The custom field key cannot contain underscores (i.e. "request_type"). You must update your custom field key and remove underscores (i.e. "requesttype").
4The interaction direction sets whether the email is treated as an inbound or outbound communication for reporting. Valid values are "in" or "out".