Solved

Replying to a Conversation with the API doesn't auto archive when told

  • 12 January 2023
  • 3 replies
  • 67 views

Badge +2

Hey there!

Im working on a system in which I want to be able to reply to a conversation in Front, and immediately after, have it archive.

Looking at the docs at https://dev.frontapp.com/reference/post_conversations-conversation-id-messages, I should be able to get that functionality by passing "options": { "archive": true }, however it doesn't seem to be working that way.

Is there anything I'm doing wrong? Or is there a bug here?

Im hitting the endpoint at

https://myDomain.api.frontapp.com/conversations/cnv_12345/messages

With a json body of
 

{
"sender_name": "System - +123456789",
"body": "Uhhh Syncing the message??",
"options": {
"archive": true
}
}



Does this look right?

Thanks!

icon

Best answer by Support Engineering 12 January 2023, 16:39

View original

3 replies

Userlevel 1
Badge +5

Your request would have successfully updated the conversation status to archived. What you may be seeing is that your individual status for the conversation remained open, which is expected. 

 

We keep separate statuses (team / global status + individual status) so that no one who is actively interacting with the conversation will "lose" it is if gets archived by the API or another teammate. 

 

I hope this makes sense! Please let me know if you have any further questions.

 

--Jason

Badge +2

Ah gotcha! That makes sense. Thank you for the reply.

 

Is there a way to archive it for everyone? Or for a specific person?

 

Our use case is for sending automated system messages to an end user. We want to include that message in the front conversation for context, but we don't want to reactivate any currently archived conversations (or start and activate new ones) unless the recipient replies. Is there a way we can accomplish this?

Userlevel 1
Badge +5

I've seen another customer implement something similar by leveraging conversation followers.  

 

https://dev.frontapp.com/reference/get_conversations-conversation-id-followers

 

They would keep track of who was following the conversation, then remove their subscription to the conversation.  They could then send bot messages and re-add followers before receiving a customer message.  However, this doesn't work well with private inbox conversations due to the inherent owner of the private inbox seeing the message.

 

Please let me know if that helps!

 

--Evan

Reply