UpdateTrigger

Changes the settings of an existing trigger.

Uses and Requirements

The TriggerCategory cannot be changed. For example, you cannot change a trigger for SMS messages into one for data usage.

Note: If you change the existing criteria for a trigger, devices that already meet the new trigger criteria will not immediately trigger an alert. The next usage that meets the criteria will trigger an alert.

Request Parameters

The request contains parameters to identify the trigger and the parameters that you want to change.

Parameter Type Description
TriggerId
required
string The unique ID of the trigger that you want to change.
TriggerName
required
string The unique name of the trigger. Use the existing name if you do not want to change it.
AccountName
required
string The Verizon billing account that the trigger belongs to. You cannot move a trigger to a different account.
DeviceGroupName
optional
string The name of a device group, if you want this trigger to only be active for devices in that group. Use the existing DeviceGroupName if you do not want to change the trigger to work with a different device group. If you do not specify a device group, the trigger will be active for all devices in the account.
TriggerCategory
required
string Must be set to the current value of the type of usage that the trigger responds to:DeviceSmsUsage, DeviceDataUsage, or DeviceSessionTime. This value cannot be changed.
CycleType
required when TriggerCategory = DeviceSmsUsage or DeviceDataUsage
string The accumulation cycle of the trigger, "Daily", "Weekly", or "Monthly". Weekly cycles start on Monday, and monthly cycles are based on the account billing cycle.
SmsTrigger
required when TriggerCategory = DeviceSmsUsage
SmsTriggerRequest The details of the DeviceSmsUsage trigger.
SmsType
required for SmsTrigger
string

The type of SMS messages that count toward the trigger criteria:

  • MO = Mobile-Originated (SMS messages sent by devices)
  • MT = Mobile-Terminated (SMS messages sent to devices)
  • MOMT = SMS messages sent by devices and to devices
Comparator
required for SmsTrigger
string

The type of comparison to be made between the number of SmsType messages and Threshold:

  • lt (less than)
  • lte (less than or equal to)
  • gt (greater than)
  • gte (greater than or equal to)
Threshold required for SmsTrigger string The number of SmsType messages required to activate the trigger, based on the Comparator.
DataTrigger
required when TriggerCategory = DeviceDataUsage
DataTriggerRequest

The details of the DeviceDataUsage trigger.

Note that 4G device data usage is only recorded at the end of each session.

Threshold required for DataTriggerRequest string The amount of ThresholdUnit data required to activate the trigger, based on the Comparator.
ThresholdUnit
required for DataTriggerRequest
string

Units to be used for counting data usage:

  • MB = Megabytes
  • KB = Kilobytes
  • GB = Gigabytes
Comparator
required for DataTriggerRequest
string

The type of comparison to be made between actual data usage and Threshold:

  • lt (less than)
  • lte (less than or equal to)
  • gt (greater than)
  • gte (greater than or equal to)
SessionTrigger
required when TriggerCategory = DeviceSessionTime
SessionTriggerRequest The details of the DeviceSessionTime trigger.
Comparator
required for SessionTriggerRequest
string

The type of comparison to be made between actual session duration and Threshold:

  • lt (less than)
  • gt (greater than)
Threshold
required for SessionTriggerRequest
string

The number of seconds of session time required to activate the trigger, based on the Comparator.

Response Parameters

A successful response returns the trigger ID. You can use the GetTriggers request to verify the changes.

Parameter Type Description
TriggerId string The unique identifier of the trigger.

Example SOAP Request

Update a data usage trigger for when a device uses more than 5 MB of data in a week.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:v2="http://nphase.com/unifiedwebservice/v2" 
 xmlns:nph="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.TriggerService">
  <soapenv:Header>
    <token xmlns="http://nphase.com/unifiedwebservice/v2">bca5f9c5-3d0d-4c14-b9f9-7310f5879ad7</token>
  </soapenv:Header>
  <soapenv:Body>
    <v2:UpdateTrigger>
      <v2:Input>
        <nph:TriggerId>2b3123d1-ba3c-4040-9272-a88cdf4650c9</nph:TriggerId>
        <nph:TriggerName>Data Usage</nph:TriggerName>
        <nph:AccountName>0242078698-00001</nph:AccountName>
        <nph:DeviceGroupName>NCW Devices</nph:DeviceGroupName>
        <nph:TriggerCategory>DeviceDataUsage</nph:TriggerCategory>
        <nph:CycleType>weekly</nph:CycleType>
        <nph:DataTrigger>
          <nph:Comparator>gt</nph:Comparator>
          <nph:Threshold>5</nph:Threshold>
          <nph:ThresholdUnit>MB</nph:ThresholdUnit>
        </nph:DataTrigger>
      </v2:Input>
    </v2:UpdateTrigger>
  </soapenv:Body>
</soapenv:Envelope>

Example SOAP Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <UpdateTriggerResponse xmlns="http://nphase.com/unifiedwebservice/v2">
      <Output xmlns:a="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.TriggerService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <a:TriggerId>3E22E96B-F888-4889-A2D7-7119496A0C5F</a:TriggerId>
      </Output>
    </UpdateTriggerResponse>
  </s:Body>
</s:Envelope>

Request Schema Diagram

Response Schema Diagram