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

Email deliveries: Output all available variables for debugging purpose

Avatar

Avatar
Validate 1
Level 2
lorisg52723730
Level 2

Likes

6 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
lorisg52723730
Level 2

Likes

6 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
lorisg52723730
Level 2

19-12-2017

I find it pretty hard to know what are the variables (some examples: message.id, recipient.firstName, delivery.label, etc) available that can be used inside email deliveries. I was wondering if an exhaustive list existed, but can't find any in the online documentation.

Moreover, for debugging purpose, I think it could be really useful if we could use some javascript to send some test email deliveries which would output all the available variables (their key and value). It could look like how JSON or Javascript object are displayed in some dev tools, for instance :

jsonpayloadweatherdata.png

Replies

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

02-01-2018

Hi,

There is no official list in the documentation as it mainly depends on the context you're in and the schema you use, as well as on your rights.

You can also define your own variables in some cases.

Most variables come from the schema definition.

Florent

Avatar

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile

Avatar
Give Back 50
Level 10
florentlb
Level 10

Likes

237 likes

Total Posts

1,109 posts

Correct Reply

239 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 200
View profile
florentlb
Level 10

15-01-2018

I'll keep your feedback and let you know if we get this list documented.

Florent

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

15-01-2018

Hi Lorisg,

Please have a look to the NL.toDebugString() function, as described in this post of Andrey:
Re: AC6.1/7 JavaScript engine: what it is, what is can do?

Regards
J-Serge

Avatar

Avatar
Springboard
Level 6
David__Garcia
Level 6

Likes

106 likes

Total Posts

192 posts

Correct Reply

44 solutions
Top badges earned
Springboard
Establish
Validate 10
Coach
Contributor
View profile

Avatar
Springboard
Level 6
David__Garcia
Level 6

Likes

106 likes

Total Posts

192 posts

Correct Reply

44 solutions
Top badges earned
Springboard
Establish
Validate 10
Coach
Contributor
View profile
David__Garcia
Level 6

18-01-2018

Run the following js code, choose the primary key of any delivery

var d = nms.delivery.load("841925965");

for (var i in d) {

  logInfo([i]);

}

also you can log which mailparameter variables are available

var d = nms.delivery.load("841925965");

for (var i in d.mailParameters) {

  logInfo([i]);

}

1398408_pastedImage_4.png

For instance, you can dynamically generate the delivery's subject line from within the workflow's delivery activity without modifying the template. ie.

delivery.mailParameters.subject = "Daily report for "+formatDate(new Date(), "%2D%2M%4Y");

1398410_pastedImage_5.png