Custom SMS Implementations

This forum is for programmers who have questions about the source code.
Post Reply
sp3ctre
Posts: 2
Joined: Thu Jul 11, 2019 8:18 am

Custom SMS Implementations

Post by sp3ctre » Mon Nov 18, 2019 10:10 pm

Recently we ported our phone number to Twilio. We have ran into the problem that Open Dental can no longer host our phone number as our new carrier (Twilio) is rejecting the hosting requests. I am a developer and am curious as to how I can implement Twilio with Open Dental's existing texting system.

Are confirmations handled by the EServices or is it just a text that is dealt with once it hits the database?
Can you stop texts from being sent/received by the EConnector?
How should I inject send/received texts into the database?

Thanks!

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Custom SMS Implementations

Post by cmcgehee » Tue Nov 19, 2019 7:20 am

The only way you'd be able to implement Twilio is by writing a plugin for Open Dental. These are a few hooks you would want to implement:
FormSmsTextMessaging.butReply_Click_sendSmsSingle
FormTxtMsgEdit.SendText_Start
SmsToMobiles.SendSmsSingle_start

You would not be able implement any automated texting with this manner, just manual texting. Confirmations are handled by eServices outside of the office's database, so you wouldn't be able to use that functionality. If you are not signed up for texting with Open Dental, the eConnector will not send or receive any text messages. If you go the route of inserting your own messages into the database, you would use the smstomobile and the smsfrommobile tables.
Chris McGehee
Open Dental Software
http://www.opendental.com

awadh
Posts: 23
Joined: Tue Apr 21, 2020 6:09 pm

Re: Custom SMS Implementations

Post by awadh » Sat Jun 13, 2020 12:29 am

Hi Chris,
I need to have custom SMS implementation as well and I followed you suggestion.
I noticed that function FormTxtMsgEdit.SendText mentions two hooks "FormTxtMsgEdit.SendText_Start" and "FormTxtMsgEdit.SendText_Start2".

What is the difference and which one I should implement?

Awadh

User avatar
cmcgehee
Posts: 711
Joined: Tue Aug 25, 2015 5:06 pm
Location: Salem, Oregon

Re: Custom SMS Implementations

Post by cmcgehee » Mon Jun 15, 2020 7:12 am

This only difference between those two is that one causes FormTxtMsgEdit.SendText to return false and the other causes it to return true. I actually would recommend implementing both of them. In FormTxtMsgEdit.SendText_Start, I would attempt to send the text message, and if you are successful, have the plugin method return false. If you are unsuccessful, have the plugin method return true. In FormTxtMsgEdit.SendText_Start2, I would have it always return true (you would only get to this hook if FormTxtMsgEdit.SendText_Start was successful).
Chris McGehee
Open Dental Software
http://www.opendental.com

Post Reply