Expand my Community achievements bar.

The 5th edition of the Campaign Community Lens newsletter is out now!

Seed Removal via JS


Level 2


Trying to send an email delivery "Real Send", then run a JS script to duplicate it and then build another delivery, without seeds and without waves. I am getting this error message on the second delivery: "Error while executing the method 'PrepareMessage' of service 'nms:delivery'. The value 'insertOrUpdate' of element 'Seed (seedMember)' is not a valid reconciliation operation (document with schema 'delivery')". What do I need to add to the JS to fix this? Thanks!

Here's the JS

// query the database to find the delivery

   var send = xtk.queryDef.create(

     <queryDef schema="nms:delivery" operation="get">


         <node expr="@id"/>

         <node expr="@label"/>

         <node expr="[@operation-id]"/>

         <node expr="[@workflow-id]"/>



         <condition expr={"@FCP=0 and [@workflow-id]= " + instance.id}/>




   // create a new delivery object and initialize it by doing a copy of delivery

   var delivery = nms.delivery.create()

   delivery.Duplicate("nms:delivery|" + send.@id)

   // append 'seed' to the delivery label

   delivery.label = send.@label + " seed"


   // link the delivery to the operation to make sure it will be displayed in the campaign dashboard. This attribute needs to be set manually here since

   // the Duplicate() method has reset it to its default value => 0

   delivery.operation_id = send.@["operation-id"]

   delivery.workflow_id = send.@["workflow-id"]

   // adjust some delivery parameters to make it compatible with the "Prepare and start" option selected in the Delivery tab of this activity

   delivery.scheduling.validationMode = "manual"

   delivery.scheduling.delayed = 0

   delivery.scheduling.waves.enabled = 0

   // save the delivery in database


   // store the new delivery Id in event variables

   vars.deliveryId = delivery.id

0 Replies


Level 10

Hi Courtney,

I don't know the method to do that. Did you fin a way in the meantime?


page footer