Skip to main content
Answered

Bug with presentMessageComposer(initialMessage)

  • July 26, 2024
  • 1 reply
  • 80 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 

Best answer by bernice

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 📌

View original
Did this topic help you find an answer to your question?

1 reply

bernice
Intercom Team
Forum|alt.badge.img+5
  • Intercom Team
  • 230 replies
  • Answer
  • August 12, 2024

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 📌


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings