There are some messaging use cases that have some restrictions or regulations about the delivery time and/or day. An example of this type of messages are the collections messaging.
If the enterprise has the restriction of a time frame and specific days of week, let's say at 10am on Mondays only, then Syniverse messaging platform can assist the development the enterprise system by the use of the scheduled delivery time and adding to this that the system must handle appropriately the message delivery time considering the recipient time zone.
This time zone consideration led to the need of additional information to identify the recipient time zone. In this case Syniverse take advantage of one of the address book fields that accurately provides this key information: the ZIP code.
That been said, to schedule bulk message delivery in our collection message example, we need to upload the contacts to the platform address book ensuring to include the ZIP code for each recipient.
This document provides information how to implement the collections bulk messages by time zone. As prerequisite an address book with the contacts and a contact group are required. We will provide curl examples on how to create the scheduled collections message to be send on a specific time and date.
Scheduling a 3pm local time bulk message for collections
Syniverse scheduled message functionality is managed using the following parameter:
- scheduled_delivery_time
In addition to deliver a scheduled message base on the recipient time zone
- scheduled_delivery_time_zone
Let's say we set the scheduled delivery time for: Friday, July 24 2024 at 10am recipient local time.
To use the recipient local time zone as reference the scheduled_delivery_time_zone must be set as LOCAL and the scheduled_delivery_time must be set with the date and time with no time zone, considering the date and time only for the reference, without the time zone.
The scheduled delivery time is then set by the scheduler on absolute terms to the server time: UTC in reference to each recipient local time.
In our example: July 24, 2024, the server delivery schedule will be:
July 24, 2024
at 2pm UTC (EST local time 10am) the server will deliver the EST recipients.
at 3pm UTC (CST local time 10am) the server will deliver the CST recipients.
at 4pm UTC (MST local time 10am) the server will deliver the MST recipients.
at 5pm UTC (PST local time 10am) the server will deliver the PST recipients.
To achieve this goal the parameters should be:
scheduled_delivery_time = " 2024-07-24T10:00:00.000"
scheduled_delivery_time_zone = "LOCAL"
Finally, the curl command is:
curl -X POST 'https://api.syniverse.com/scg-external-api/api/v1/messaging/message_requests' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"from":"channel:1KJPMkuHQkair_o1XXXXXX",
"to":["group:aNadckOOsG03UkcbdHy2F7"],
"body":"Test scheduled message 2024-07-24 10am "
"scheduled_delivery_time":"2024-07-24T10:00:00.000",
"scheduled_delivery_time_zone":"LOCAL"
} '
Example: data
Consider the contacts to be:
UTwMfCmlnorIaymzNLK6Y6 | Atlanta | EST |
ff41pMVUH22k1TyE5jU0F2 | Dallas | CST |
4QJAOGIRw854q8cgXfse34 | Denver | MST |
foAF34J0TL7mTE1RKiqiC1 | San Diego | PST |
In our example, the messages are scheduled as:
{
"list": [
{
…
"id": "TxmKvXSKSSiWF6QMHOoOB4",
"message_request_id": "lXecE0YIC7FtrBfIdMnfI3",
"direction": "MT",
"state": "SCHEDULED",
"scheduled_delivery_time": 1721829600412, ~ July 24, 2024 2PM UTC ~ 10AM EST
"channel_id": "1KJPMkuHQkair_o1XXXXXX",
"type": "SMS",
"destination_country": "USA",
"contact_id": "UTwMfCmlnorIaymzNLK6Y6", ~ a Atlanta contact
"feature_usage_list": [
"SCG_BULK_MESSAGES",
"SCG_SCHEDULED_BULK_MESSAGE"
]
},
{
…
"id": "OATpuRO6TvWEvpawAcqvV4",
"message_request_id": "lXecE0YIC7FtrBfIdMnfI3",
"direction": "MT",
"state": "SCHEDULED",
"scheduled_delivery_time": 1721833200366, ~ July 24, 2024 3PM UTC ~ 10AM CST
"channel_id": "1KJPMkuHQkair_o1XXXXXX",
"type": "SMS",
"destination_country": "USA",
"contact_id": "ff41pMVUH22k1TyE5jU0F2", ~ a Dallas contact
"feature_usage_list": [
"SCG_BULK_MESSAGES",
"SCG_SCHEDULED_BULK_MESSAGE"
]
},
{
"id": "WJjkN9oRjeFsRuSQrFoBr2",
"message_request_id": "lXecE0YIC7FtrBfIdMnfI3",
"direction": "MT",
"state": "SCHEDULED",
"scheduled_delivery_time": 1721836800411, ~ July 24, 2024 4PM UTC ~ 10AM MST
"channel_id": "1KJPMkuHQkair_o1XXXXXX",
"type": "SMS",
"destination_country": "USA",
"contact_id": "4QJAOGIRw854q8cgXfse34", ~ a Denver contact
"feature_usage_list": [
"SCG_BULK_MESSAGES",
"SCG_SCHEDULED_BULK_MESSAGE"
]
},
{
…
"id": "OT63u16LgrnBOs1kYDCjJ4",
"message_request_id": "lXecE0YIC7FtrBfIdMnfI3",
"direction": "MT",
"state": "SCHEDULED",
"scheduled_delivery_time": 1721840400108, ~ July 24, 2024 5PM UTC = 10AM PST
"channel_id": "1KJPMkuHQkair_o1XXXXXX",
"type": "SMS",
"destination_country": "USA",
"contact_id": "foAF34J0TL7mTE1RKiqiC1", ~ a San Diego contact
"feature_usage_list": [
"SCG_BULK_MESSAGES",
"SCG_SCHEDULED_BULK_MESSAGE"
]
}
]
}
For additional information follow the links
How many contacts can I have in a contact group?
Can I send messages to a group of recipients all at once with a Public channel?
0 Comments