I hope everyone is doing well.
It's no surprise that SMS delivery messages are an important communication channel for B2B and B2C customers. Customers expect to receive opted-in SMS-based notifications, as well as, email-based notifications for order tracking and delivery. Recently, I built a Groovy script to send customer-facing SMS-Based delivery notifications using the Twilio SMS API. I decided to leverage out-of-the-box Java libraries that are natively bundled with SAP Commerce instead of adding the Twilio JAR library to the client's long list of custom libraries already used in its SAP Commerce implementation.
If you are a regular reader of HybrisArchitect.com, you know that I tend to rely on Groovy for developing scheduled programming tasks. Of course, I decided to develop the SMS-based delivery notification with Groovy.
The HttpURLConnection class was used to communicate with the Twilio SMS API instead of using the Twillio JAR library. It was quite easy to connect with the Twilio API using the HttpURLConnection. That said, I had some issues sorting out the 400 Bad Request HTTP Status Codes that I continuously received from Twilio early in the integration process.
A partial screen capture of the Groovy script:
The complete Groovy script can be purchased for $8.00 USD.Buy Now to Download the Script/Code: 8.00 USD
I hope you find this file useful.
If you have any questions, please email me at: firstname.lastname@example.org