Expand my Community achievements bar.

SOLVED

How to change XML-data in a workflow

Avatar

Level 4

Hello,

I need to replace a link in a CTA-button and a couple of words in some delivery templates. I'm wondering if it is possible to do it doing either a mass update in the XML memo or through a workflow and update data. I don't know how to though.

 

I want to keep the same XML structure and all the code in it, just replace a couple of words and the link. 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @A_B_SE ,

 

As it is a couple of words Updation in the CTA Url Link, it would be better if this change is done manually to all the Delivery Templates.

 

Could you Please let know how many delivery templates are to be Updated?

 

Also, if you are using same html code in all the Delivery Templates, it would be advisable to use personalization Blocks instead of html, as the Updating can be done in single personalization Block instead of all the Delivery Templates.

 

Regards,

Pravallika.

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @A_B_SE ,

 

As it is a couple of words Updation in the CTA Url Link, it would be better if this change is done manually to all the Delivery Templates.

 

Could you Please let know how many delivery templates are to be Updated?

 

Also, if you are using same html code in all the Delivery Templates, it would be advisable to use personalization Blocks instead of html, as the Updating can be done in single personalization Block instead of all the Delivery Templates.

 

Regards,

Pravallika.

Avatar

Level 4

Hello,

 

This time it's maybe 30+ deliveries (we are a big organisation) so yeah I could do it manually but I would like to know how to do it automatically because from time to time I have this need.

I'm not using Blocks since it's not always the same html code unfortunately.

Avatar

Community Advisor

Hi @A_B_SE ,

 

Is the CTA Link same for all of your Delivery Templates?

 

If yes, you can store that Link in an option variable and use it in your Delivery Templates...so that each time you can modify the option Value, it gets reflected in your Delivery Templates.

 

You can create an Option Variable under Path "/Administration/Platform/Options/" and call it in your Templates.

JS Code to be used in your WF would be as shown below:

Steps to be followed for doing this are:

1) creating one option under /Administration/Platform/Options/ for each Delivery Template,

2) creating vars and call getOption in JS

3) store in vars

4) add the variable in targetData(Additional data in WF)

5) call The variable in delivery. 

vars.CTAUrl = getOption ("CTAUrlValueOption");

<a href="<%=vars.CTAUrl%>" target="_blank" rel="noopener">CTA Button</a>

 

Even though, if the Values are different for each of the CTA Url's , you can create 30+ options and then change the Option Values each time when required for each Delivery Template...may be a bit time consuming for first time, but it makes no html changes are required from the next time.

 

Regards,

Pravallika.

 

 

 

Avatar

Level 4

Hello,

 

Thanks, I'll think about that for future activities.

Avatar

Community Advisor

Hi @A_B_SE ,

For this time, you have to do manual changes for All the templates.

(Updating those particular link alone via Workflow or by selecting all templates and by 'mass update' it won't work.)

 

But as you mention from time to time you need to make this changes automatically, you can follow below steps,

To Change CTA button's link:

If you have more deliveries which use same link in CTA button, and in future if you want to change the link and should reflect in all delivery templates which uses this CTA button,

Step1: create a personalization block (/Resources/Campaign Management/Personalization blocks/)

Here just give the CTA button's link alone. (Not the HTML code, as each template has different script)

ParthaSarathy_0-1696513357867.png

Step2: Delivery template

While configuring links for each CTA button, instead of providing link in href, call this personalized block,

href="<%@ include view='internalName_of_personalizedBlock' %>"

Example:

<a href="<%@ include view='newsletterRegisterCtaButton' %>" target="_blank" rel="noopener">CTA Button</a>

 

So whenever you want to change the link, you can directly edit in personalized block instead of editing in all templates.

Same applies for other scenarios as well, where you mentioned 'other couple of words' which you need to modify time to time.