'to' and 'from' are integration names of fields in the communication log object. You don't need to use them. The point I was making was, you can have your SMS holder object with any field names. Your PHP middleware will intercept the message from Twilio and map the data from the request to the REST api 'createRecord'
You can use the REST api to create your SMS record. See [View:https://www.twilio.com/docs/api/twiml/sms/twilio_request#synchronous:550:50] and create fields in your object with integration names same as parameters mentioned here.
Edit your twilio phone number and goto Messaging section. Choose webhook option for "A message comes in" and enter rest api url for createRecord. E.g. https://www.rollbase.com/rest/api/createRecord?objName=SMS&custId=86999999&loginName=xxxxxxxx&password=xxxxxxxx
Note that i'm using this form of authentication because I could not find options to configure basic auth in Twilio, but as this is a secure location, this should be fine. Configure objName, custId, loginname and password based on your tenant and account that you want to create the records with. The key assumption here is Twilio's parameter names match the integration names for fields in your Rollbase SMS object.
I was able to send an SMS to my Twilio number and a record with the body of the SMS was created in Rollbase.
It works but there are fields from twilio that I cannot save in Rollbase since they are reserve words. I need them to save in our record to track who is the sender. Reserve words are From and To. I already have these fields in my object but because it is reserved words the Integration name of these are From_ and To_ and the Twilio does not fill out these fields since their fields are From and To only.
We have noted the limitation on the keywords for integration names and will work towards removing them, if possible.
As you have a private instance, you can put in a custom JSP that can serve as middleware for this request. The JSP, say twilioReceiver.jsp, will read all parameters from the Twilio request and map it to your set of fields on the SMS holder object, making a subsequent call into Rollbase REST to create the SMS record.
Can we use the PHP file as middleware?
Yes, you can have any middleware. You just need a place to map the Twilio parameters from the request to your record fields on the REST API.
Hi what attribute that I can enable to have a To and From integration name fields? They are reserved words and I think they used in attributes of an object.
'to' and 'from' are integration names of fields in the communication log object. You don't need to use them. The point I was making was, you can have your SMS holder object with any field names. Your PHP middleware will intercept the message from Twilio and map the data from the request to the REST api 'createRecord'