RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.55k stars 10.58k forks source link

SMS - Twlio send variable to Custom Fields #17905

Closed jersonjunior closed 4 years ago

jersonjunior commented 4 years ago

I created a chatbot with Rasa and whenever I need to forward the integration of SMS with Twilio parameters to a consumption agent.

I need to send in addition to the phone and message the CRM protocol number, it would be possible to send a new field in the SMS - Twilio request CrmID and fill a custom fields in the visitor's Omnichannel room.

Twilio payload:

{ "CrmID": "202020", "From": "5551123456789", "To": "5551987654321", "Body": "SMS message", "ToCountry": "Brazil", "ToState": "RS", "ToCity": "Porto Alegre", "ToZip": "", "FromCountry": "Brazil", "FromState": "RS", "FromCity": "Porto Alegre", "FromZip": "" }

jersonjunior commented 4 years ago

After the inclusion of Custom Fields, country, city and state in the Omnichannel part, the parameters started to be forwarded to Custom Fields:

image