Question

How to pass custom link from treatment to section (Strategy > Treament > Section)

Good morning,

I would like to know how can I pass a custom link that comes from a strategy to a treament, then a section.

For example, let's talk about the property "ButtonLink" that comes from the Pega Marketing Strategy with the following value: "https://www.google.es/{cuStomerId}" where customerId is populated in the strategy. (This is a simple example)

Then I have a treatment called (EmailTemplate) that include a section called (TreatmentOffer01).

When I call this section, I pass the parameter in this way:

<pega:include name="TreatmentOffer01" type="Rule-HTML-Section">

<pega:param name="ButtonLink" ref=".OfferData.ButtonLink"/>

</pega:include>&nbsp;<br />

In the section TreatmentOffer01 I have a button that redirects to the link that comes from the param ButtonLink but is not working as expected because the href value is not being populated with the ButtonLink's value.

Button code in TreatmentOffer01 section:

<a data="<pega:include name='MKTEmailLink' type='Rule-HTML-Section'>
<pega:param name='SuppressHref' value='True'/>
<pega:param name='Trackable' value ='true'/>
<pega:param name='Resp' value='Accepted'/>
<pega:param name='URL' ref='<pega:reference name=Param.ButtonLink></pega:reference>'/>
<pega:param name='URLParam' value='false'/>
</pega:include>

</a>

How can I populate URL to achieve this? Thanks!

Rgds,

Jose.

Correct Answer
July 5, 2019 - 7:45am

You can directly access the OfferData properties in nested section and do not need to pass parameters from Email treatment to the embedded sections.

In the TreatmentOffer01 section, please change the code to below and see if that resolves the issue. 

<a data="<pega:include name='MKTEmailLink' type='Rule-HTML-Section'>
<pega:param name='SuppressHref' value='True'/>
<pega:param name='Trackable' value ='true'/>
<pega:param name='Resp' value='Accepted'/>
<pega:param name='URL' ref='.OfferData.ButtonLink'/>
<pega:param name='URLParam' value='false'/>
</pega:include>

Comments

Keep up to date on this post and subscribe to comments

Pega
July 5, 2019 - 7:45am

You can directly access the OfferData properties in nested section and do not need to pass parameters from Email treatment to the embedded sections.

In the TreatmentOffer01 section, please change the code to below and see if that resolves the issue. 

<a data="<pega:include name='MKTEmailLink' type='Rule-HTML-Section'>
<pega:param name='SuppressHref' value='True'/>
<pega:param name='Trackable' value ='true'/>
<pega:param name='Resp' value='Accepted'/>
<pega:param name='URL' ref='.OfferData.ButtonLink'/>
<pega:param name='URLParam' value='false'/>
</pega:include>