Context

Description

The context object provides additional details on where the app has been added (or is currently being used), what page the app is being used on, and information on the Messenger settings. This is in order for you give a fully customised experience based on the customers use case.

If the location is conversation then you will also be given a conversation_id. If you need to use details about the conversation, then you have to use the conversation_id to make a call to our Conversations API and retrieve the conversation object.

Attributes

KeyTypeLocationDescription
conversation_idintegerConversationThe id of the conversation where the app is added or being used.
locationstringConversation, Messenger Home, Message, OperatorWhere the app is added or the action took place. Can be either 'conversation', 'home', 'message', or 'operator'.
localestringConversation, Messenger Home, Message, OperatorThe default end-user language of the Messenger. Use to localise Messenger App content.
messenger_action_colourstringConversation, Messenger Home, Message, OperatorThe messengers action colour. Use in Sheets and Icons to make a Messenger App experience feel part of the host Messenger.
messenger_background_colourstringConversation, Messenger Home, Message, OperatorThe messengers background colour. Use in Sheets and Icons to make a Messenger App experience feel part of the host Messenger.
referrerstringConversation, Messenger Home, Message, OperatorThe current page URL where the app is being used.

Example Objects

{
  conversation_id: 4294967297,
  locale: "en", 
  location: "conversation",
  messenger_action_color: "#333333",
  messenger_background_color: "#333333",
  referrer: "https://intercom.com/"
}
{
  locale: "en", 
  location: "conversation",
  messenger_action_color: "#333333",
  messenger_background_color: "#333333",
  referrer: "https://intercom.com/"
}