Skip to main content
Question

Potential bug, conversations created through the API does not find their way to the messenger

  • December 4, 2022
  • 1 reply
  • 61 views

I think I found a bug, maybe someone has an explaination or fix for it?

 

Upon pushing a button with a certain `component_id` my application performs a 1-2 API requests:

 

1)

 

If `params[:contact][:role]` is a visitor I'll first convert them to a user through:

POST https://api.intercom.io/visitors/convert
{
visitor: {
user_id: params[:contact][:external_id]
},
user: {
email: "john.doe@example.com"
},
type: "user"
}

2)

 

Then I'll start a conversation:

POST https://api.intercom.io/conversations
{
from: {
type: "lead",
id: lead_id
},
body: "I have a question about my order 1001. My email address is john.doe@example.com."
}

The `lead_id` is:

 

  1. - either from `params[:contact][:id]`, if the `params[:contact][:role]` was `lead`
  2. - or from the `id` included in the response body of the first request 

 

However as you see from the following demonstration it seems the created conversations never gets linked to messenger session of the user.

 

https://www.dropbox.com/s/t3epn7i46xy8l7i/intercom_bug_recording.mp4?dl=0/p>

 

Cookies and user localStorage was flushed before the recording.

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

Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • December 12, 2022

Hey @christoffer d​ Racheal from the support engineer team hereπŸ‘‹ 

 

I see you've been working with my teammate Aparna on this, but I will paste the response here for future viewers!

What happens here is when a merge is done the ID for the lead is deleted, which is why it treats that same ID as a brand new lead, there's no link made between the lead ID and the user once the merge happens. This looks like the intended behaviour.


Reply


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