Skip to main content
Answered

API sent message does not refresh the Conversation in Messenger


I made an app that ends-up by posting messages within conversations... It is done with the Intercom API, but when we post a new message it appears into the agent inbox, but not into the Messenger on the visitor side… until the visitor or the agent sends a new message, then all is refreshing. Is there anything to do to make the messenger refresh when a new message comes from the API ?

Best answer by Roy

@jean-baptiste​ , Please make sure that you are posting an admin reply instead of the user one.

https://api.intercom.io/conversations/{existing_conversation_id}/reply

There two types of reply - User one - Once reply send by the user:

{
"message_type": "comment",
"type": "user",
"intercom_user_id": "536e564f316c83104c000020",
"body": "User Reply"
}

Admin Reply, once admin sents a reply:

{
"message_type": "comment",
"type": "admin",
"admin_id": "3998818",
"body": "Roy"
}

 

I just test this out, it's working fine from my end.

I think you are posting user replies instead of admin.

 

Can you just check this? or post a full request?

 

I will be happy to help

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

4 replies

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • June 29, 2021

Hi @jean-baptiste​ ,

 

May I know which API request are you posting?


  • Author
  • New Participant
  • 4 replies
  • June 29, 2021

Hi @roy s11​ I am posting to:

https://api.intercom.io/conversations/{existing_conversation_id}/reply

 


Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • June 29, 2021

@jean-baptiste​ , Please make sure that you are posting an admin reply instead of the user one.

https://api.intercom.io/conversations/{existing_conversation_id}/reply

There two types of reply - User one - Once reply send by the user:

{
"message_type": "comment",
"type": "user",
"intercom_user_id": "536e564f316c83104c000020",
"body": "User Reply"
}

Admin Reply, once admin sents a reply:

{
"message_type": "comment",
"type": "admin",
"admin_id": "3998818",
"body": "Roy"
}

 

I just test this out, it's working fine from my end.

I think you are posting user replies instead of admin.

 

Can you just check this? or post a full request?

 

I will be happy to help


  • Author
  • New Participant
  • 4 replies
  • June 30, 2021

@roy s11​ you're right, but I should have been more specific as I need to post on behalf the user… To say it short the app allows the user to record their screen, and this recording needs to be posted from our end into the conversation: that is where the API call comes in, from the user or from the admin, depending who uses the app.

We could force to post as admin but it would break the Intercom conversation logic ( who is waiting for an answer, who needs to receive a reminder, etc.).

 

To give you more context, we also used the canvas advanced feature allowing to inject the action result right into the canvas, but this leads to 2 problems: first, the exact inverse, as the admin does not sees the canvas modified in the conversation unless refreshing manually the page… second, it leads to a non-consistent experience depending on the reply context, as it works only from the messenger. So that is not an option we want to keep.


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