Set up Event Subscriptions Matching Criteria Fields

 

The SDC Event Manager Subscriptions enable you to create customized events callbacks notifications on specific topics and predefined event types as message status change or mobile originated message reception.

In these notifications you can set parameters conditioning the events that want to be notified about, setting the “Matching Criteria” field in the Topic Subscription dialog: option Event Manager / Subscriptions.

 

Picture1_.png

 

This article is as supplementary documentation for the section with the same title in the article Sending Mobile Originated SMS to multiple destinations – Syniverse Developer Community.

 

This document enlists of all Matching Criteria available fields for each Event Type when creating a subscription specifically for the SCG-Message topic.

 

The SCG-Message topic’s Event Types are:

  • message_state_request_change
  • message_state_change
  • mo_message_received

 

Available fields on SCG-Message topic to use as Matching Criteria

Event Type: message_request_state_change

Matching Criteria fields:

  • previous_state
  • mo_price
  • message_request_id
  • external_id
  • reason_description
  • application_id
  • reason_code
  • company-id
  • external_message_request_id
  • encrypted_event_fields
  • new_state
  • mt_price
  • media_urls

 

Event Type: message_state_change

Matching Criteria fields:

  • mo_price
  • external_id
  • has_attachment
  • number_type
  • carrier_id
  • reason_code
  • company-id
  • encrypted_event_fields
  • new_state
  • from_address
  • carrier_name
  • mt_price
  • attachment_ids
  • verify_sms
  • previous_state
  • message_request_id
  • message_id
  • to_address
  • reason_description
  • application_id
  • sender_id_alias
  • sender_id_id
  • external_message_request_id
  • fragments_count
  • media_urls

 

Event Type: mo_message_received

Matching Criteria fields:

  • attachment_ids
  • mo_price
  • message_request_id
  • external_id
  • message_id
  • has_attachment
  • to_address
  • application_id
  • carrier_id
  • sender_id_alias
  • company-id
  • message_body_truncated
  • sender_id_id
  • message_body
  • group_to
  • encrypted_event_fields
  • fragments_count
  • anti_virus_scan_result_details
  • from_address
  • carrier_name
  • mt_price
  • message_body_content_type
  • antivirus_scan_status

 

Matching Criteria construction

Matching Criteria can be expressed in the form:

[[criteria field] [operator] [criteria value] ]

Valid operators are:

=

<> 

>=

<=

contains

startWith

 

Valid criteria values are:

boolean values:          false / true

string values:               ‘text’

numeric values:          1.23

date values:                2022-07-19

timestamp values:       2022-07-19T12:00:00Z

 

 

Example:

Create a subscription for MO messages to a specific mobile number:

For this the Matching Criteria we must declare the condition for the “to_address” field as:

to_address =mobile number

 

Picture2.png

 

When a SMS is received this subscription will post:

{
  "topic": "SCG-Message",
  "attempt": 1,
  "event": {
    "fld-val-list": {
     "sender_id_alias": "7kXDXsEzeeVkn0MFL9XXXX",
      "mo_price": 0.0095,
     "company-id": [company_id],
     "sender_id_id": "7kXDXsEzeeVkn0XXXXXz3",
      "message_body": "Testing MO messages 10:17",
      "message_id": "PLxzY4tphc5wCrN4iydo86",
     "to_address": "1833662XXXX",
      "has_attachment": false,
      "fragments_count": 1,
     "from_address": "+1346787XXXX",
      "application_id": 11369,
      "anti_virus_scan_status": "NONE"
    },
    "evt-tp": "mo_message_received",
    "timestamp": "2022-07-19T16:17:45.623Z"
  },
  "event-id": "PY7lhc1XTpapShRmawJwGw"
}

 

Multiple Fields Matching Criteria

Multiple Fields can be added using logical operators  OR / AND

matching criteria1 [[and / or] [matching criteria n][…]]

 

Using this syntax, we can add a condition to the example:

to_address =1833662XXXX’ and from_address = ‘+1346787XXXX

 

Picture3.png

 

When an MO event that match the conditions is received the ESS subscription post the message:

{
"topic": "SCG-Message",
"attempt": 1,
"event": {
"fld-val-list": {
"sender_id_alias": "7kXDXsEzeeVkn0MFL9XXXX",
"mo_price": 0.0095,
"company-id": [company_id],
"sender_id_id": "7kXDXsEzeeVknXXXX9TXXX",
"message_body": "Testing MO messages 11:12",
"message_id": "cez2nNG4KrlpXANXajilO1",
"to_address": "1833662XXXX",
"has_attachment": false,
"fragments_count": 1,
"from_address": "+1346787XXXX",
"application_id": 11369,
"anti_virus_scan_status": "NONE"
},
"evt-tp": "mo_message_received",
"timestamp": "2022-07-19T17:13:01.484Z"
},
"event-id": "smS7d70CR1yEzOh_r6sAjw"
}

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.