Hi Team,
We have our app in intercom, where we have customised component with a button of action as sheets and url given.
{
type: "button",
id: "start-survey",
label: "Let's begin",
action: {
type: "sheet",
url: "https://url",
},
}
When we use our app and send this component in a conversation, the mail is also sent. When opening our app from the mail and clicking on the button, the url is not loaded.
This used to work fine previously.
We are getting the following error.
Can we please get help regarding
Hi
The error message TypeError: Cannot read properties of undefined (reading 'header')
suggests that the code is attempting to access a property named header
on an object that is undefined.
So Intercom is missing in the email. When the button is clicked in the Intercom Messenger, it operates within a fully initialised Intercom context where the necessary objects are defined. When this component is triggered from an email, the objects are not be properly initialised so the Intercom script or context that provides these properties is unavailable.
It would be difficult to see why exactly this is happening without having more details on your implementation. So my best recommendation for you here would be to reach out to our support team via the Messenger so that they can gather details and dig deeper into this for you.
A potential workaround that you could try in the meantime would be to switch the action type from sheet
to url
. This would avoid the dependency of needing a fully initialised Intercom object by redirecting the user to the specified URL without needing Intercom's context.
Hope this helps!
Reply
Join the Intercom Community 🎉
Already have an account? Login
Login to the community
No account yet? Create an account
Intercom Customers and Employees
Log in with SSOEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.