


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>);
Views
Replies
Sign in to like this content
Total Likes
Hi,
Are you trying to call nms:delivery#SubmitDelivery via SOAP, or the code pasted below?
Is the code in a workflow?
Thanks,
-Jon
Views
Replies
Sign in to like this content
Total Likes
Code pasted above in workflow using Javascript Code activity
Views
Replies
Sign in to like this content
Total Likes
Call the workflow with xtk:workflow#PostEvent, setting <variables emailCondition="@email = 'xyz@abc.com'"/>. The js should prob be tightened up to <condition expr={"@email = '" + sanitize(vars.emailCondition) + "'"} />, but will work as-is.
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
hi @kgiribabu,
I have encountered with same situation. i need to pass the variables which are calculated in query activity like targetData.currentDate which are piped in the email template. Any ideas here?
@Manoj_Kumar_ : the example you have given is not working for me passing the variables through API. Do you have any other solution for this.?
@Jonathon_wodnicki any suggestions here?
Views
Replies
Sign in to like this content
Total Likes
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>);
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
js2 Element 'stringValue' is unknown (see definition of element '/variables/var' in schema 'Deliveries (nms:delivery)').
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
@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>
Views
Replies
Sign in to like this content
Total Likes
Hi @kgiribabu
Were you able to solve this?
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes
Views
Replies
Sign in to like this content
Total Likes