We are seeking to achieve ordinary two-way texting with textit and CHT outside of textit flows, is it possible to achieve corresponding back to back texting communication between a provide at the facility and the patient through rapidpro where by when the patient is communicating back to CHT he/she doesn’t have to go through a flow and POSTing the SMS via a webhook to CHT ie they just text directly to CHT .
I have achieve the provider side of the communication ie the message from to CHT to the patient
cc @diana
Hello @cliff it seems possible to do so through triggers. You still might have to do flows to handle the two-way communication - directing texts in and out. The RapidPro messaging gateway documentation is a good resource to review.
hello @kitsaousedStart a Flow after Receiving a Message that Doesn't Match Any Keywords it looked for suitable however in CHT the messages are not in the same thread as seen below .
Here when a chw send a message Hello Tom to the patient , the patient responds back with Hello CHT but the message is not in the original thread that initiated it .
Any ideas on how i can get the response from the patient in the same thread of Hello Tom
It’s a little suspicious that the heading for the first message starts with “tel:”. I would expect that to be just the phone number. If the phone number in the doc starts with “tel:” then it won’t match the phone number for Tom which may be why it’s not showing up in the thread. Look up the message in the database and check the sms_message.from field. I suspect this is an issue with the TextIt configuration.
@cliff I just noticed that’s covered in the documentation the @kitsao linked. Scroll down to the section that includes replace(urns.tel,"tel:+", "+") and apply that to your flow.
thanks @gareth for the feedback ,your right, i have looked up in the logs and i see "from":"tel:+256785579893"
I changed the payload format in the textit webhook from
@cliff An Internal Server Error means something unexpected happened on the server. If you check the API logs I expect you’ll see an error with stacktrace which will have more information about what happened and help us debug it further.
Oh! I think I just worked out what the problem is. I assumed it was a CHT issue but looking more closely at the error message I think it’s a textit issue where it’s parsing the replace command.
Please check the flow configuration and make sure it exactly matches what’s in the documentation. It looks like you’ve configured it with additional quotes around the replace(...) function, eg: "from": "replace(urns.tel,"tel:+", "+")" instead of "from": replace(urns.tel,"tel:+", "+")