In the recent times I have noticed that many businesses have implemented/integrated with IT solutions to Send and Receive orders/complaints/shipping updates on WhatsApp. So, I thought to explore on finding a simple way to achieve this from Oracle Integration Cloud. For this I found that we can leverage Twilio platform and Twilio adapter which comes as OOTB adapter with OIC.
About Twilio - Twilio is an IT platform which provides flexible and easy ways to send communications (APIs) to multiple channels i.e., Voice/SMS/WhatsApp etc. They provide user trial accounts so that one can explore before purchasing subscriptions. More details about them is available on their website - https://www.twilio.com/
Let’s see how we can achieve this –
- First, let’s create Free User trial account in Twilio.
- Open https://www.twilio.com/ in browser and Click ‘Signup’. In next page Click on Sign up for free.
- Provide necessary info and click on ‘Start your free Trial’ and complete setup.
- On the left side of home screen, we can see Phone Numbers/Messaging options listed down under Develop section.
Expand Messaging -> try it out and click on Send WhatsApp Message. - Agree and activate Sandbox.
- Send WhatsApp Message from your phone to connect your WhatsApp account with Sandbox env and within few seconds you will receive confirmation. Next, you can also Try sending One-way Messaging or Two-way Messaging from Twilio platform to see how it works.
- Copy Account SID and Auth token. We will need this to create connection in OIC.
- Create new Connection and Select Twilio Adapter.
- Provide name for this connection and under security policy provide Account SID and Auth token captured in earlier stage.
- Test and Save connection.
You will notice that we can only select Invoke Role, which means currently we cannot trigger OIC API when an event is generated in Twilio. However, we can create rest-based API in OIC and provide this API as webhook in Twilio Sandbox Configuration page to fulfill request. - Now, Create new schedule type integration
- Add Twilio adapter connection created in earlier step and configure
- Choose Send SMS or MMS in operation
- Next and Done
- Perform Map and for the time being let’s hardcode To, Body, From fields so that we don’t have to define a source. Validate and Close map.
Sample Values -
To – “whatsapp:+918095831600”. As we are using sandbox, we can only provide number which is connected to it configured in previous step.
From – “whatsapp:+14155238886” .For sandbox account only this is a valid value,
Body – “Whatsoever you want to send” - Add Business identifier, Save and Activate Integration. Finally, your Integration should look like this.
- Now let’s Test integration
- Check WhatsApp.
That’s it. Based on requirement -
- For One way communication we can develop Rest based OIC service which can be triggered from Oracle ERP, Oracle SaaS, VBCS, Oracle Apex or from other OIC service to send WhatsApp/SMS/Voice notifications
- Or, for Two way communication we can also develop Rest based API in OIC and provide it as webhook in Twilio to fulfill requests triggered by Users.
Update
Excellent post...Keep sharing such useful information
ReplyDelete