The object instance representing the recipient of the message. This can, however, be any object containing a mobile number field and does not need to be a role.
The attribute on this object representing the mobile number of the recipient.
The key of a lang file entry that contains the message content. In this case the lang file entry simply references a function scoped variable.
Represents SMS results that are duplicated in the app schema for easy access to app developers. Records belonging to this object can be queried using the standard selectors.
Used to annotate a function that will be used as a callback function by Helium when there is any update on sms results. The annotation cannot be used in conjunction with other function annotations and the function must take exactly one parameter of type __sms_result__.
Note that duplicating the data from the __sms_result__ object in the above code snippet is done purely for demonstration purposes. Records from this object can be queried directly without needing to duplicate the data into a custom object.
Receiving SMS Messages
The @ReceiveSms function annotiation indicates that a function can receive an SMS.
Note that in the second example above, the aggregator fields represents the exact values that are sent to Helium by the SMS aggregator before any processing is done. At the time of writing the functionality to populate that parameter has only been implemented for the "Africa's Talking" inbound SMS driver.
Add Comment