Pass text from an input into the chat

Hi there! I’m hoping to collect a user’s message in another text field, then pass that text to Intercom.

User enters their message → clicks start a chat → that messages gets passed into Intercom → user hits send in Intercom.

I’m doing this so I can run it through Algolia first.

Are you saying the place they enter the chat isn’t the intercom messenger? Or do you want it to go through the messenger, then you run it through algoria and send result back to conversation?

1 Like

The later - so the place they enter the message is not the intercom messenger.

Algolia will do it’s thing before the message ever gets to Intercom. The goal is actually that the user can solve their problem via seach before they message us

And does Algolia provide the front end search component? or do you need to build that custom? Either way, Intercom has all the APIs you’d need to accomplish this, what’s the blocker?

1 Like

I should have clarified in my original Q - I’m just wondering if it’s possible. My trying to do a bit of research before pitching the idea to the dev team.

Can you point me in the right direction?

sure, so if I were gonna do this, this is how:

  • On user message i’d send a payload to a service (doesn’t sound like the UX you’re after is a “search” per se, but rather a “chat” that uses your search platform: Algolia)
    ** With the payload to your service, run this and return intercom user id with the payload
  • Use the conversations API and the user id you got back to create a conversation on behalf of the user. You’ll likely need to have logic to convert them from a visitor (anonymous) to a contact (known) if they are not yet one in Intercom. When you create the conversation, use their input as the body
  • Your service then calls Algolia API and receives payload of results back which you format however you’d like it to appear in the Intercom message back to the user
1 Like