How to schedule a delivery from a script Activity in Campaign Classic
Hi,
We have a requirement to schedule a Delivery based on Recipient Timezone. This needs to be achieved programatically, (In a script activity) based on our existing design.
Currently, we have below code snippet which triggers the delivery.
var emailTemplate = "del001" //internal name of Delivery Template
var recipientID = "6784568"
nms.delivery.SubmitNotification(emailTemplate,
<delivery>
<targets>
<deliveryTarget>
<targetPart exclusion='false' ignoreDeleteStatus='false'>
<where>
<condition expr={'@id ='+recipientID}/>
</where>
</targetPart>
</deliveryTarget>
</targets>
</delivery>);
We have updated the XML Payload as below by adding </scheduling> and anticipated that it would schedule a delivery. But it didnt work.
var emailTemplate = "del001" //internal name of Delivery Template
var recipientID = "6784568"
nms.delivery.SubmitNotification(emailTemplate,
<delivery>
<scheduling contactDateTimeZone="Europe/London" contactDate="2021-09-02 05:05:00.000Z" delayed="1" extraction="2021-09-02 05:00:00.000Z" validationMode="auto" validityDate="2021-09-07 05:05:00.000Z" webResPurged="false">
<waves mode="0" splitDelay="86400" splitSize="20%"/>
<messagePreparation _login="" forecasted="0" priority="0"/>
</scheduling>
<targets>
<deliveryTarget>
<targetPart exclusion='false' ignoreDeleteStatus='false'>
<where>
<condition expr={'@id ='+recipientID}/>
</where>
</targetPart>
</deliveryTarget>
</targets>
</delivery>)
Let us know what would be key attributes on Delivery & Scheduling to make it perfect and how we can acheive this in Adobe Campaign Classic.
TIA!
