Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Update contact date for scheduled delivery

Avatar

Level 1

Hi,

I'm looking for a way to successfully update the contact date for already scheduled delivery. The delivery is scheduled via Scheduling > Schedule delivery (automatic execution when the scheduled date is reached), the workflow with it is executed and the delivery is prepared and has status "Start pending".

What I tried is to update the contact date from js:

var deliveryId = 123;
var updatedTime = "2025-10-27T09:00:00.000Z";

var del = nms.delivery.load(deliveryId);
del.scheduling.contactDate = new Date(updatedTime);
del.save();

The script successfully updates the contact date, but the delivery is sent at original time not updated one. 
I think that there is some interim schema which also needs to be updated.

Any clues how it can be done? The setup should work in v8.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi @neeliv7

 

Updating scheduling.contactDate alone won't reschedule a "Start pending" delivery sibce the scheduler catches it at prepare time. You need to pause the delivery update the contact date and then re-run PrepareFromId() to rebuild scheduling data. After that, resume it with Play().

 

Try with the following code:

var deliveryId = 123;
var newDate = new Date("2025-10-27 09:00:00");
nms.delivery.ExecCommand(deliveryId, "pause");
var del = nms.delivery.load(deliveryId); del.scheduling.contactDate = newDate; del.save();
nms.delivery.PrepareFromId(String(deliveryId)); nms.delivery.Play(String(deliveryId));

 

Additionallly I share you some useful documentation:

PrepareFromId API 

Delivery best practices 

Delivery analysis v8 

 

I hope it helps and if you need more guidance just let me know. 

 

Best, 

Celia

 

Avatar

Level 1

Hi @ccg1706,

thank you for the response! I tried this way: the delivery is successfully paused, the contact date is updated but unfortunately the delivery fails at the starting analysis step:

PM XSV-350122 An error occurred and the process has been stopped.
SOP-330011 Error while executing the method 'PrepareTarget' of service 'nms:delivery'.
SOP-330011 Error while executing the method 'PrepareTargetImpl' of service 'nms:delivery'.
PM DLV-490002 Cannot start a new analysis of the delivery since current status ('Paused') does not allow it.

Avatar

Community Advisor

Hi @neeliv7

 

Thanks for coming back, instead of pause, try with stop this should allow the prepare step to correctly reschedule the delivery. 

 

Don't hesitate to come back if it does not work. 

Best, 

Celia

Avatar

Level 1

Hey @ccg1706,

I've tried to stop the delivery but the result and error code is the same: 
Cannot start a new analysis of the delivery since current status ('Stop') does not allow it.

 

I noticed that after running command to pause or stop the delivery, it usually takes minute or two until the delivery is actually paused (or stopped). During this time, the delivery has "Pause (stop) requested". I initially thought that that may be the reason, so I used sleep() function to allow the delivery to be paused (or stopped). However, the outcome is always the same.

 

Is it any other way I can try to solve it?

Thanks,

Dominik