Skip to main content
Answered

Bug with presentMessageComposer(initialMessage)

  • 26 July 2024
  • 1 reply
  • 18 views

Hello, I am using presentMessageComposer to open intercom with a pre-filled message. 

I am using it like this: 

 

static async presentMessageComposer(initialMessage?: string) {

try {

await Intercom.presentMessageComposer(initialMessage);

} catch (error) {

Logger.error(error);

}

}

 

Although it opens the intercom the initial message is being ignored for android and iOS.

I am on the latest version of react native intercom.

 

Is it a known issue?

 

Thank you 

1 reply

Userlevel 4
Badge +4

Hey @Stav8 👋

To open the Intercom Messenger with a pre-filled message in a React Native application, you can use the Intercom.displayMessageComposer("Message") method. This will open the Messenger directly to the composer screen with the message field pre-populated with the text you provide in place of "Message". Here's how you can implement it:

<Intercom.displayMessageComposer("Your pre-filled message here")>

This allows you to provide users with a starting point for their conversation, which can be particularly useful for prompting specific inquiries or providing guidance on what information to include in their message.

You'll find more on this in our Developer Documentation here 📌

Reply