Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Alias in enrichment activities

Avatar

Level 1

Do aliases in enrichment activities need to start with "@" for example...

 

"@segmentcode"

or can I just alias it "segmentcode"?

 


 
Updating Media

 

 

Thanks!

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @KristenCo4 ,

 

It's not required to start with @. It's just a best practice in naming convention.

 

Thanks,

David



David Kangni

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @KristenCo4 ,

 

It's not required to start with @. It's just a best practice in naming convention.

 

Thanks,

David



David Kangni

Avatar

Level 1

@DavidKangni one follow up question- when you do use an alias like @segment, is this how it needs to be referenced if using this field to populate a delivery template? <% targetdata.@segment %> for example? for this type of personalization + use of target data to populate values in a delivery template, does the delivery template go by the alias name or the label?  What if you do not alias the output column?

 

 

Avatar

Employee

@KristenCo4  Whether or not you "@" symbol at the beginning lies in the way you wish the data in dowstream

It is all present as an XML structure.

If you use "@" the column is added to output as an Attribute

If you remove "@" that column appears in outbound transition as an XML element.

Please refer to this link for more differentiation 

XML Element: https://www.w3schools.com/xml/xml_elements.asp

XML Attribute: https://www.w3schools.com/xml/xml_attributes.asp 

Let us assume you have a new targetData column with value as "123" and the alias you have used is "@kristen". Also assuming your targeting dimension is nms:recipient

Data in your outbound transition is accessible in available in this form

 

<recipient firstName="myFirstName" lastName="myLastName" kristen="123">
</recipient>

 

 

Now if in the same example you were to remove the "@" symbol, same data will appear in this format

 

<recipient firstName="myFirstName" lastName="myLastName">
  <kristen>123</kristen>
</recipient>

 

There is no right or wrong way. It all depends on how the downstream activities are going to consume it. Like personalizing inside a delivery or making this available in seed addresses.

Alias is to be used whenever using the value anywhere

If you do not give an alias, product automatically deduces the alias value based on source column used.

If you have used a formula, it will create an alias like exprRandomNumber which is not user-friendly.