Our Push Notification Scheduler API is a powerful automation tool that will let you schedule the delivery of a pre-created Target campaign (via our console) at a date in the future. In this way, you'll be able to let your marketers control the content and rules for the push notification while programmatically scheduling it for a date in the future via your custom app logic.
Here's a great use case: As a marketer at a hotel brand, I want to schedule the sending of a "welcome" push notification to my customer upon arrival at (or as they approach) my hotel. Upon successful room reservation, my system will make an API call to Xtify with the appropriate content ID (setup in the Xtify Console) for my hotel, dynamic content generated from the reservation transaction, the XID of the customer making the reservation and the date when my customer will arrive. I also want to use Xtify's location tracking option to create a geo-fence around our property so that I can send this message when the customer approaches (ie, when they land at the airport). The message that I send will contain rich HTML design with a welcome message from the Manager, special on-site offers and in-area partner messaging.
This document contains all of the relevant information required for scheduling the creation of a push notification through our API stack. This is a premium feature that must be enabled by Xtify staff. Contact us for details.
1.1 Scheduling a Notification
In order to schedule a notification through the scheduling API, you will first need to create and activate a Target notification with a custom identifier through the Xtify Console. Using this ID, you will call the Notification Scheduling API with the XID of the user, your application key, the time to deliver message and any additional dynamic content. The Scheduling API will return a UUID that you can then reference if you wish to unschedule this push delivery in the future. At the time of delivery, the system will look for an active notification with the custom ID you specified and send the message. If this notification configuration does not exist, or if any rules that are configured for it do not pass, the message will not be delivered.
Configuring the Content Reference ID
When configuring the notification, you will need to specify the custom identifier in the Content Reference ID field. This value must be unique across all configurations set-up for the associated applications. The example below is using "content-id-001" as the identifier. Once an identifier is specified, this configuration will only be triggered by a scheduled delivery that was sent through the notification scheduling API.
URL
https://api.xtify.com/2.0/notification/schedule
Http Method
POST
Request Content
All parameters are to be JSON encoded and included in the HTTP Entity. Parameters are optional unless otherwise indicated.
Element | Type | Description | Required |
cnId | String | Custom Notification ID to match against. Defined in Notification configuration web UI. | Yes |
| appKey | String | The application that you'd like to target with this push. | Yes |
| xid | String | The xid corresponding to device that should receive this message. | Yes |
| time | String | Time to send message in ISO8601 format. | Yes |
| dyn | Array | Key values pairs in JSON format that will be replaced in web content. To use the defined key, use ::key_name:: within the Target-based campaign content. Xtify will replace the key name with value defined in this payload. See the example payload below for more details. |
Response Content
Elements | Description |
HTTP Code: 200 OK | Request content has been validated and has been submitted for processing. |
| Response | Schedule ID. Required for unscheduling a message. |
Example Request Format
Example Response Format
1.2 Un-Scheduling a Notification
Use this API to unschedule a previously scheduled push notification.
URL
https://api.xtify.com/2.0/notification/unschedule
Http Method
POST
Request Content
All parameters are to be JSON encoded and included in the HTTP Entity. Parameters are optional unless otherwise indicated.
Element | Type | Description | Required |
sid | String | Schedule ID to attempt to unschedule | Yes |
| appKey | String | The application that you'd like to target with this push. | Yes |
| xid | String | The xid corresponding to device that should receive this message. | Yes |
Response Content
Elements | Description |
HTTP Code: 204 | Request content has been validated and has been submitted for processing. No content provided. |
