send customizable email using nms.delivery.SubmitDelivery SOAP API | Community
Skip to main content
Level 2
June 29, 2020
Question

send customizable email using nms.delivery.SubmitDelivery SOAP API

  • June 29, 2020
  • 4 replies
  • 3817 views

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>);

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Jonathon_wodnicki
Community Advisor
Community Advisor
June 29, 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

kgiribabuAuthor
Level 2
June 29, 2020

Code pasted above in workflow using Javascript Code activity

_Manoj_Kumar_
Community Advisor
Community Advisor
June 30, 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>);
     Manoj     Find me on LinkedIn
kgiribabuAuthor
Level 2
June 30, 2020
I got below error when I tried this...
kgiribabuAuthor
Level 2
June 30, 2020

@_manoj_kumar_, @jonathon_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>

Sukrity_Wadhwa
Community Manager
Community Manager
July 15, 2020

Hi @kgiribabu 

Were you able to solve this?

Sukrity Wadhwa
kgiribabuAuthor
Level 2
July 28, 2020
Nope