send customizable email using nms.delivery.SubmitDelivery SOAP API

kgiribabu

29-06-2020

I have created a Delivery Template with variables and used those variables in the Delivery Template email. How to pass values to those variables using nms.delivery.SubmitDelivery SOAP API Call...

 

var emailCondition = "@email = 'xyz@abc.com'";


var deliveryId = nms.delivery.SubmitDelivery("gEmail",
<delivery>
<targets >
<deliveryTarget >
<targetPart exclusion='false' ignoreDeleteStatus='false'>
<where>
<condition expr={emailCondition} />
</where>
</targetPart>
</deliveryTarget>
</targets>
</delivery>);

Accepted Solutions (0)

Answers (4)

Answers (4)

Sukrity_Wadhwa

Employee

15-07-2020

Hi @kgiribabu 

Were you able to solve this?

kgiribabu

30-06-2020

@_Manoj_Kumar, @wodnicki I tried below combination and all of them giving similar error : 'see definition of element '/variables/var' in schema 'Deliveries (nms:delivery)'.. How to access this schema definition ?

 

<variables>
<var><value>ASDF</value></var>
</variables>

 

<variables>
<var><stringValue>ASDF</stringValue></var>
</variables>

 

<variables>
<var stringValue='ASDF'/>
</variables>

 

<variables>
<var value='ASDF'/>
</variables>

_Manoj_Kumar

MVP

30-06-2020

Hello @kgiribabu 

 

You can try this.

var emailCondition = "@email = 'xyz@abc.com'";


var deliveryId = nms.delivery.SubmitDelivery("gEmail",
<delivery>
<targets >
<deliveryTarget >
<targetPart exclusion='false' ignoreDeleteStatus='false'>
<where>
<condition expr={emailCondition} />
</where>
</targetPart>
</deliveryTarget>
</targets>
<variables>
<var><stringValue>VALUE_1_HERE</stringValue></var>
<var><stringValue>VALUE_2_HERE</stringValue></var>
</variables>
</delivery>);

wodnicki

MVP

29-06-2020

Hi,

 

Are you trying to call nms:delivery#SubmitDelivery via SOAP, or the code pasted below?

Is the code in a workflow?

 

Thanks,

-Jon