Context

The context object describes where an action has taken place, and includes any relevant information you may need to customise what appears on the card.

You will receive a context object as part of a request from Intercom, but depending on the webhook and the location where it is triggered, not all of this context information is available.

Webhooks can be hit from Messenger Web context, Messenger SDK context, Inbox context, or Messages context:

KeyTypeDescription
locationstringThis can be either 'conversation', 'home', or 'message', depending on where the action took place.
localestringThe default end-user language of the Messenger. Use to localise Messenger App content.
conversation_idintegerOnly present if the app was added to a conversation.
messenger_action_colourstringThe messengers action colour. Use in Sheets and Icons to make a Messenger App experience feel part of the host Messenger.
messenger_background_colourstringThe messengers background colour. Use in Sheets and Icons to make a Messenger App experience feel part of the host Messenger.
referrerstringThe current page URL of the end-user.
{
  conversation_id: 4294967297,
  locale: 'en', 
  location: 'conversation',
  messenger_action_color: '#333333',
  messenger_background_color: '#333333',
  referrer: 'https://intercom.com/'
}
{
  locale: 'en', 
  location: 'home',
  messenger_action_color: '#333333',
  messenger_background_color: '#333333',
  referrer: 'https://intercom.com/'
}
{
  "locale": 'en',
  "location": 'message',
  "messenger_action_color": '#f06192',
  "messenger_background_color": '#00acc1'
}