Update contact date for scheduled delivery | Community
Skip to main content
October 27, 2025
Solved

Update contact date for scheduled delivery

  • October 27, 2025
  • 1 reply
  • 325 views

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.

Best answer by ccg1706

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

 

1 reply

ccg1706
Community Advisor
ccg1706Community AdvisorAccepted solution
Community Advisor
October 30, 2025

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

 

neeliv7Author
October 31, 2025

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.

ccg1706
Community Advisor
Community Advisor
November 1, 2025

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