function hook_engagements_handle_incoming_sms_init

7.x engagements.api.php hook_engagements_handle_incoming_sms_init(&$vars)

Called when an SMS is received by FlightPath and before any logic, queries, etc., are performed.

It is safe to assume the SMS has been validated.

Notice that $vars is passed by reference, so changes can be made if desired.

Parameters

unknown $vars:

File

modules/engagements/engagements.api.php, line 19
This file describes hooks provided by the engagements module, which other modules can take advantage of.

Code

function hook_engagements_handle_incoming_sms_init(&$vars) {

  // Example code:
  $message_sid = $vars ['MessageSid'];
  if ($message_sid == 'x12-ffg-3445') {
    // Perform special DB inserts into custom table.
  }

}