Hi,
I’m using the Intercom Messenger SDK in a React application and I’m trying to pass contextual data onto the conversation as conversation attributes.
For example, I want to set values such as:
- workspace_name
- workspace_id
- current_url
- subscription_plan
- item_id
- item_title
- item_url
These values are specific to the conversation the user is starting, as a user may be in different workspaces or different parts of the application at different times, so storing this as user attributes is not appropriate because the values can change from conversation to conversation.
Fin suggested updating user attributes via the SDK, but that does not solve the problem for us. We need the data attached to the conversation itself, so it can be used reliably in Workflows, Inbox, and downstream connectors.
It feels like the Messenger SDK should support setting conversation attributes when opening or creating a conversation. I’d prefer not to make a separate REST API call to update the conversation after it has been created, especially when the SDK is already responsible for starting the conversation.
Is there currently any supported way to pass conversation attributes from the Messenger SDK? If not, is there another recommended approach that avoids using the REST API to update the conversation separately?