Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Passing personalized fields to javascript API function call

Avatar

Avatar
Validate 1
Level 1
Ramaswami
Level 1

Likes

0 likes

Total Posts

100 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
Ramaswami
Level 1

Likes

0 likes

Total Posts

100 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Applaud 5
View profile
Ramaswami
Level 1

13-11-2020

Hi Guys, 

 

I have email template with the feilds in recipient table like <%= recipient.firstname%>, <%=targetData.anneversary%> 

 

Currently I am passing email field to SubmitNotification API call like below : 

 

Note: When i pass @ID instead of @email  my recipient.firstname piped correctly. But the question is how can i get a personalized feild that is "anneversary" which i calculated in additional data of query activity into email template through API. Do we have any tags for this like <targetData> etc..,, 

 

var emailCondition = "@email = 'XXX-email from tempTable of query activity-XXX'";


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

 

now how to i pass the variables firstname, anneversary to this function call so that my delivery will be populated with firstname and anneversary values.?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

507 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

507 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

17-11-2020

Hi,

 

The SubmitNotification() method documentation explains it:

"""

It is possible to explicity[sic] define the target (in reality the content of the file used as the target):

<delivery>
  <targets fromExternalSource='true'>
    <externalSource>MsgId|ClientId|Title|Name|FirstName|Mobile|Email|Market_segment|Product_propensity1|Product_propensity2|Product_propensity3|Product_propensity4|Support_Number|Amount|Threshold1|
                    000001234|M.|Martin|Peter|0650201020|pmartin@neolane.com|1|A1|A2|A3|A4|E12|120000|100000
    </externalSource>
  </targets>
</delivery>

 

Thanks,

-Jon