Solved

Question about creating a conversation for existing an contact and retrieving the conversation ID

  • 16 December 2022
  • 1 reply
  • 73 views

Badge +2

The way we are currently using Front is we create contacts beforehand using https://dev.frontapp.com/reference/post_contacts and then use https://dev.frontapp.com/reference/post_channels-channel-id-incoming-messages to create a conversation for them with one of our agents. This endpoint works for us because we can pass contact_id in the sender object but the problem is it does not return the conversation_id that we need for sending further messages within this conversation. Instead we are getting back the message_id only and have to query for the message entity to get the conversation_id from it. This makes our flow inefficient. 

 

Another way to create conversation is https://dev.frontapp.com/reference/post_channels-channel-id-messages and it does return the conversation_id but it does not accept contact_id param to create conversation for existing contact.

 

Ideally we want to be able to create conversation for existing contact_id and receive back the conversation_id in the same request. Is this possible?

icon

Best answer by Support Engineering 16 December 2022, 19:17

View original

1 reply

Userlevel 1
Badge +5

The way in which our API works when creating messages is that we quickly return the created message with it's message UID. 


The full process of creating and threading a message is a little more time consuming, so we very intentionally made the decision not to wait until the message has landed in the final conversation before returning the message with conversation ID. 


You will need to perform that message lookup by message UID to fetch the conversation ID that the message landed in. 

 

--Jason

Reply