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

How to Access javascript variable in Continuous delivery

Avatar

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Prabhu_Sathy
Level 1

26-12-2017

Hi All,

          I want to read java script variable in the continuous delivery template. please help me.

Javascript.png

Replies

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

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

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

369 likes

Total Posts

726 posts

Correct Reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

27-12-2017

Hi Prabhu,

We already have a thread which seems to cater to your requirement.

Can you please refer to Use of variable in continuous delivery, how to do ?

If you have a different requirement please elaborate more on it.

Regards,
Vipul

Avatar

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Prabhu_Sathy
Level 1

07-01-2018

Hi Vipul,

              Thanks for sharing the details. I need one help for below scenario.

We are sending mail with coupon code on monthly basis. For each month separate coupon code and content.

For this, we wrote one personalization block and then we send a mail. But in this block, we faced one issue in email client template mirror link. If the customer opens previous month mirror link, it shows current month coupon code and content (View in Browser). But in email template client it is showing the right coupon code and content.

Personalization block JavaScript

  var currentDate = new Date();

var currentMonth = (currentDate.getMonth());

var json = {"1":["Seller1", "Seller2", "Seller3", "Seller4", "Seller5", "Seller6", "Seller7", "Seller8", "Seller9", "Seller1", "Seller1", "Seller1"]}; 

var seller=json[1][currentMonth]; 

if( seller== "Seller1") {

coupon code and content

}

elseif( seller== "Seller1")

{

coupon code and content

}

Avatar

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Prabhu_Sathy
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Prabhu_Sathy
Level 1

07-01-2018

Hi Vipul,

              Thanks for sharing the details. I need one help for below scenario.

We are sending mail with coupon code on monthly basis. For each month separate coupon code and content.

For this, we wrote one personalization block and then we send a mail. But in this block, we faced one issue in email client template mirror link. If the customer opens previous month mirror link, it shows current month coupon code and content (View in Browser). But in email template client it is showing the right coupon code and content.

Personalization block JavaScript

  var currentDate = new Date();

var currentMonth = (currentDate.getMonth());

var json = {"1":["Seller1", "Seller2", "Seller3", "Seller4", "Seller5", "Seller6", "Seller7", "Seller8", "Seller9", "Seller1", "Seller1", "Seller1"]};

var seller=json[1][currentMonth];

if( seller== "Seller1") {

coupon code and content

}

elseif( seller== "Seller1")

{

coupon code and content

}

Avatar

Avatar
Springboard
Level 9
Gaurang
Level 9

Likes

140 likes

Total Posts

435 posts

Correct Reply

45 solutions
Top badges earned
Springboard
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Springboard
Level 9
Gaurang
Level 9

Likes

140 likes

Total Posts

435 posts

Correct Reply

45 solutions
Top badges earned
Springboard
Validate 100
Validate 50
Validate 25
Validate 10
View profile
Gaurang
Level 9

25-07-2018

Hi,

Were you able to find something relevant for your query here?

Gaurang