Over a million developers have joined DZone.

How Low-Code App Platforms Bring Value to Your Business

What do you do when one service does not exist yet or you need to integrate with a third party? See how easy this can be achieved using the power of Rollbase Trigger.

· Integration Zone

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

We saw how easy it is to create a complete responsive application using point and click, drag, and drop methodologies in this blog, and we saw that we get a lot of built-in services in this blog. But you may ask, “what do you do when one service does not exist yet or you need to integrate with a third party?”

In this blog post, we will see how easy this can be achieved using the power of Rollbase Trigger.  To make the blog more interesting, let’s take the case where in our travels app, we want to send an SMS message to alert us when a user enters a star rating below three for a destination. To make this even more useful, we will illustrate this by showing the code for sending SMS from Rollbase using Twilio.

First, obtain your Account SID and Auth Token from your Twilio account.

Second, go into the object definition of the destination object and create a new trigger of type "Object Script". We need to specify the following:

  1. Under which condition we want to send the SMS. In our case, we will specify "on any update of the Rating field".
  2. We code some JavaScript in order to:
    1. Limit sending an SMS for rating less or equal to two.
    2. Call Twilio Rest API.
if ( {!Rating} <= 2 )  {

               rbv_api.println("rating is low - sending sms");

var url="https://<yourAccoundSID>:<yourAuthToken>@api.twilio.com/2010-04-01/Accounts/<yourAccountSID>/SMS/Messages";

var params= {"Body":"Low rating on {!city}", "To":"+<countryCode><phoneNumber1>","From":"+<countryCode><phoneNumber2>"};

var finalResponse = rbv_api.sendHttpPost(url, params, null);



Note how the SMS text will contain the city name of the destination ("Low rating on {!city}"). The key point here is that we have access to all the data of the Destination object and its related objects.

In conclusion, integrating with additional services and a third party is a breeze. It’s programmed using JavaScript making the solution standard and portable; there is no vendor lock-in.

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

integration ,sms ,api ,rollbase trigger

Published at DZone with permission of Thierry Ciot, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}