- Print
- DarkLight
- PDF
Feature Overview
Delivery of SMS to the end user takes several hops across vendors, mobile providers, and ultimately to the end user's phone. There could be a variety of conditions along this path that might affect message delivery. To ensure maximum delivery rates and to troubleshoot issues with delivery, it becomes important to know the status at each stage.
This document discusses the ways delivery status can be determined.
API Based Queries
Customers can query Ushur statistics using infoQuery APIs to see at what point in the message delivery process the failure occurred. This will help determine if the issue was with Ushur, the gateway service provider, the mobile service provider or the end-user themselves.
infoQuery APIs are a powerful set of APIs that can be used to obtain a deep level of fine-grained Ushur statistics. Detailed specifications for the infoQuery APIs can be found at the following location:
https://api.ushur.me/docs/api/
The following API call is a basic infoQuery call with the least number of parameters. This call will result in the following output:
API Endpoint: https://{{host}}.ushur.me/infoQueryWith parameters
{
"tokenId": "{token}",
"campaignId": "InsuranceClaim",
"AppContext": "Claims",
"delivered": "true",
}
The API call will return a very verbose status of all the Ushur invocations including all modules present in the workflow and the output will look like the following:
{
"stats": {
"menu.sent": 0,
"menu.resp": 0
},
"result": [
{
"name": "",
"phone": "5085551111",
"date": "2020-08-14T17:06:53.421Z",
"sid": "db350d37-5f44-4f38-b39f-4fe2dc164f27-uxidxyz-c6d977fe-265d-4eea-878f-016de1d97d2d",
"timestamp": "2020-08-14T17:06:53.420Z",
"location": "",
"response": {
"menuId": "InsuranceClaim",
"campaignId": "InsuranceClaim",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_585935",
"dispStr": "Message Sent",
"content": "[HappyIns]:",
"origUserMsg": "[HappyIns]:null",
"UeTagStart": "UeTag_Start",
"sentOut": "no",
"delivered": "false",
"delStatus": "ToBeSentOut",
"virtualNo": "87487"
},
"requestId": "20"
},
{
"name": "",
"phone": "5085551111",
"date": "2020-08-14T17:06:53.469Z",
"sid": "db350d37-5f44-4f38-b39f-4fe2dc164f27-uxidxyz-c6d977fe-265d-4eea-878f-016de1d97d2d",
"timestamp": "2020-08-14T17:06:53.466Z",
"location": "",
"response": {
"menuId": "InsuranceClaim_child_section_c0e7d6a7-c16b-488d-9b0a-1d2f943a4dda",
"campaignId": "InsuranceClaim",
"type": "menu.routine",
"UeTag": "UeTag_197768",
"dispStr": "Ushur_Lookup",
"lookupParams": {
"key": "e_Recordid",
"value": "20"
},
"lookupResult": {
"Record_ID": "20",
"Name": "Arbaaz - Sat",
"Address": "",
"Brand": "HappyIns",
"Event_date": "08/15/2020",
"Ushurname": "InsuranceClaim",
"Event_url": "https://mypassword.HappyIns.com/AIMS/PS/Main.aspx",
"phonenumber": "5085551111",
"Ushurtrigger": "Yes",
"Customercare": "5679",
"Eventtime": "6:00 PM",
"Seminari_d": "003",
"SendDate": "08/11/2020 8:00 AM",
"EventDateTime": "08/15/2020 6:00 PM",
"TimeZone": ""
},
"moduleType": "lookupchoice"
},
"requestId": "20"
}
<< Truncated for brevity >>
}
}
],
"counts": 50,
"lastRecordId": "5f3b8de2b34d5724873a28e0",
"totalRecords": 552
}
The output can be filtered based on specific module(s) that generate a text message to the end-user, such as the Welcome, Message, or Invisible App modules. Also, any module that solicits users’ responses, such as Open Response, Multiple Choice, Texting, and Image Upload can be filtered.
In the API call, add the Ue_Tag ID of the module that is being filtered. For example, if a query is being made for a Message module, and that module has a UeTag of UeTag_123456, the query can be updated as follows:
{
"tokenId": "{token}",
"campaignId": "InsuranceClaim",
"AppContext": "Claims",
"UeTag": "UeTag_123456"
}
Refer to the Ushur API documentation at the following URL for a complete set of possible filters:
https://api.ushur.me/docs/api/
{
"name": "",
"phone": "5085551111",
"date": "2020-08-14T17:06:53.548Z",
"sid": "db350d37-5f44-4f38-b39f-4fe2dc164f27-uxidxyz-c6d977fe-265d-4eea-878f-016de1d97d2d",
"timestamp": "2020-08-14T17:06:53.546Z",
"location": "",
"response":
{
"menuId": "InsuranceClaim_child_section_2ac9e40a-0657-4546-a1e2-cb3c027d77b6",
"campaignId": "InsuranceClaim",
"visual": "false",
"type": "menu.disabled.sent",
"UeTag": "UeTag_123456",
“dispStr": "Message Sent",
"assetId": "",
"content": "Hello John, This is to confirm we’ve received your insurance claim on 8/14/2020. We will keep you posted on the status. Thank you for being a valued customer!",
"sentOut": "yes",
"delivered": "true",
"delStatus": "delivered",
"moduleType": "promptmessage"
},
"requestId": "20",
"vars":
{
"_id": "db350d37-5f44-4f38-b39f-4fe2dc164f27-uxidxyz-c6d977fe-265d-4eea-878f-016de1d97d2d",
"TodayDT": "8/14/2020"
}
}
The following status flags give us the status of delivery of the message:
"sentOut": "yes",
"delivered": "true",
"delStatus": "delivered",
SentOut: This flag indicates whether the message was sent out by Ushur and handed off to the service provider such as Twilio. The value “yes” indicates a successful handoff.
Successful delivery of the message could depend on a variety of factors along the way, such as the mobile provider’s service availability, network coverage, the consumer’s mobile availability, etc. The last two flags “delivered” and “delStatus” can be used to determine what factor led to any errors along the way.
The following table summarizes the possible values of the flag and their meaning:
delivered | delStatus | Interpretation |
true | delivered | Successful delivery. |
false | sent | Phone out of service (or flight/airplane mode on). |
false | ToBeSentOut | Invalid phone number |
false | sent | Valid phone number, but not in service. |
false | Unknown external issue | Landline number |