Answered

How can I post a message as Operator

  • 29 June 2021
  • 6 replies
  • 134 views

I made an app that post messages into conversations using the Intercom API, and I want those messages to come from a bot/operator, not from the contact nor the admin.

Here is a screenshot of an app that posted such a message, but I cannot find how to achieve this in the API docs… Thanks for your help!

 

Custom bot posting

icon

Best answer by Roy 30 June 2021, 00:21

View original

6 replies

Userlevel 1
Badge

Hello @jean-baptiste​ ,

 

Actually, it's not possible to send a notification to users via the operator's name that's why you couldn't find it in Intercom's API doc.

 

Only Task-bot, custom-bot, resolution bots can use Operator name during sending.

 

Quick Workaround, you can add a new team member in Intercom and call them "Operator".

 

I hope this will be helpful.

 

Thank you for this answer @roy s11​ ,

 

Then how do they end-up with this result?

In my screenshot as you can see there is an operator icon, so it might come from the operator...

Would it be possible to setup such a task-bot or resolution-bot from a 3rd-party app while installing or with the API after installation... without our confirmation?

Userlevel 1
Badge

@jean-baptiste​ ,

 

Appears it's possible to post replies via operator name.

All you need to do is use Operator ID as an admin_id = )

 

To find Operator ID, go to Inbox -> See More -> Operator:

operatorid 

You can use this ID to send replies or create new conversations:

https://api.intercom.io/conversations/ID/reply/code>

Request:

{
"message_type": "comment",
"type": "admin",
"admin_id": "4369026", //Operator ID here
"body": "Roy"
}

I hope this will be helpful, good catch BTW 🙂 Thanks for posting.

 

Userlevel 1
Badge

To create a new conversation from the Operators name:

$ curl https://api.intercom.io/messages/code>

 

Request:

{
"message_type": "inapp",
"body": "Roy =)",
"from": {
"type": "admin",
"id": "4369026" // Operator ID
},
"to": {
"type": "user",
"id": "608abc58d22d157f02cf709f" // User ID
}
}

 

 

 

@roy s11​ 🙌 you found it! That is the ultimate trick. Hopefully this will keep working in the future.

Congrats for finding this tiny detail!! And thank you a lot for your time on this 🙏

Userlevel 1
Badge

@jean-baptiste​ , 🙌 Always happy to help, Have a nice day 🙏

Reply