Overview
Operation | Description |
---|---|
addSchedule | Schedule a delivery time for an existing Marketing Email. |
Retrieve the scheduled delivery time for an existing Marketing Email. | |
deleteSchedule | Cancel a scheduled send for a Marketing Email. |
Operation details
This section provides details on the operations.
Adding a Schedule
The addSchedule operation schedules a delivery time for an existing Marketing Email.
<sendgrid.addSchedule> <name>{$ctx:name}</name> <at>{$ctx:at}</at> <after>{$ctx:after}</after> </sendgrid.addSchedule>
Properties
name : required - Marketing Email to schedule delivery for. (If Marketing Email should be sent now, include no additional parameters.)
at: Date / Time to schedule marketing email Delivery.
after: Number of minutes until delivery should occur.
Retrieves a schedule.
The getSchedule operation retrieves the scheduled delivery time for an existing Marketing Email.
<sendgrid.getSchedule> <name>{$ctx:name}</name> </sendgrid.getSchedule>
Properties
name: Required - Retrieve the delivery time scheduled for this Marketing Email.
Delete a schedule
The deleteSchedule operation cancels a scheduled send for a Marketing Email.
<sendgrid.deleteSchedule> <name>{$ctx:name}</name> </sendgrid.deleteSchedule>
Properties
name: required - Remove the scheduled delivery time from an existing Marketing Email.
Sample configuration
Following is a sample proxy service that illustrates how to connect to SendGrid with the init
operation and use the getSchedule operation. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="sendgrid_getSchedule" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiUser" expression="json-eval($.apiUser)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="list" expression="json-eval($.list)"/> <property name="email" expression="json-eval($.email)"/> <property name="unsubscribed" expression="json-eval($.unsubscribed)"/> <sendgrid.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiUser>{$ctx:apiUser}</apiUser> <apiKey>{$ctx:apiKey}</apiKey> </sendgrid.init> <sendgrid.getSchedule> <name>{$ctx:name}</name> </sendgrid.getSchedule> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <description/> </proxy>