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

Personalization : Fields has relation with recipient table

Avatar

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
ckumari12
Level 3

02-08-2017

I have data such as

brData

BR_Code  BR_Name BR_Manager_Name  BR_Manager_EMAIL_ID     BR_Manager_Phone# 

A               B                    C                    a1@gmail.com                   9123333333

X               Y                    Z                    b1@gmail.com                    9123333331

P               Q                    R                    c1@gmail.com                   9123333332

A               R                    Y                    r1@gmail.com                    9123333336

A               T                    Z                    t1@gmail.com                    9123333335

BR_Code remains constant but other details keeps changing (in a day or two).

Recipient Schema has customer email id & @text1 field of recipient  table has BR_Code so that it can be mapped with brData .

When I query Targeting dimension as Recipient & Filtering Dimension as brData and condition as BR_Code = 'A',it returns all customers in Recipient table with BR_Code as A but when I try to personalize BR_Manager_Name or BR_Manager_EMAIL_ID or BR_Manager_Phone# 

it returns undefined.

The syntax I have used in delivery to personalize is <%= recipient.brdata_Recipient.BR_Manager_Name %>.

When I use <%= recipient.text1 %> for Branch Code, it works perfectly fine but <%= recipient.brdata_Recipient.BR_Manager_Name %> is not working.

What I am missing here?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 2
_nkur
Level 2

Likes

11 likes

Total Posts

23 posts

Correct Reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Level 2
_nkur
Level 2

Likes

11 likes

Total Posts

23 posts

Correct Reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
_nkur
Level 2

03-08-2017

Hi Chandni,

You have to define revCardinality ="Single" for direct access of this data in delivery. below is the code

    <element externalJoin="true" label="Recipient" name="recipient" target="nms:recipient"

             type="link"  revCardinality ="Single">

      <join xpath-dst="@text1" xpath-src="@brCode"/>

    </element>

But, I think it might create a issue for you. You have defined brCode as primary key for you Br_data schema, by due this you are defining that each and every recipient will have different brCode, recipient can't share br Code. Adove code will define 1-1 cardinality between Recipient & BR_Data.

If multiple recipient can share same br code, than you need to define link with below code using unbound= "true", this might solve your problem

    <element externalJoin="true" label="Recipient" name="recipient" target="nms:recipient"

             type="link"  revCardinality ="Single" unbound="true">

      <join xpath-dst="@text1" xpath-src="@brCode"/>

    </element>

Hope, it make sense.

Regards,

Ankur A.

Answers (6)

Answers (6)

Avatar

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile
Amit_Kumar
MVP

07-08-2017

Hi Chandni,

As you have not specified the revCardinality so default cardinality is unbound so you can use the direct access in your delivery.

Now you have two options:

1. You have to define revCardinality ="Single" for direct access to this data in delivery. suggested by @ankur

2. You can use following code to access manager name in delivery.

<%= recipient.brdata_Recipient[0].BR_Manager_Name %>

Assumption: every recipient will have different BR code.

If this is not the case then use

<%

for( var i=0; i < recipient.brdata_Recipient.length; i++){

//condition to get the correct Br code anything can go here based on your requirement

if( recipient.brdata_Recipient[i].brCode =="testName"){

%>

<%= recipient.brdata_Recipient[i].BR_Manager_Name %>

<%}

}%>

Hope this helps!

Amit

Avatar

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
ckumari12
Level 3

10-08-2017

Many thanks Ankur. It worked for me !!

Avatar

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
ckumari12
Level 3

03-08-2017

Hi Ankur,

BR_data schema is a table storing master branch codes( BR_Code).

BR_Code  BR_Name BR_Manager_Name  BR_Manager_EMAIL_ID     BR_Manager_Phone#

A               B                    C                    a1@gmail.com                   9123333333

X               Y                    Z                    b1@gmail.com                    9123333331

P               Q                    R                    c1@gmail.com                   9123333332

Multiple recipients can have same BR_Code.

I am storing BR_Code in text1 field of recipient table.

In br_Data schema, I have created Join as below:

    <element externalJoin="true" label="Recipient" name="recipient" target="nms:recipient"

             type="link">

      <join xpath-dst="@text1" xpath-src="@brCode"/>

    </element>

    <key internal="true" name="brDetailsKey">

      <keyfield xpath="@brCode"/>

    </key>

Using enrichment, I am able to personalize the delivery. I am looking to do it directly through br_Data table in the delivery for the sake of simplicity.

I can make changes in br_Data schema if this is limiting me in anyway in directly personalizing the delivery.

Thanks,

Chandni

Avatar

Avatar
Boost 5
Level 2
_nkur
Level 2

Likes

11 likes

Total Posts

23 posts

Correct Reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Level 2
_nkur
Level 2

Likes

11 likes

Total Posts

23 posts

Correct Reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
_nkur
Level 2

03-08-2017

Hi,

Can you please also let us know the Cardinality between recipient and BR_Code schema ?

It might be to do with the cardinality, if you have 1-1 or N-1 cardinality from Recipient to BR-Code you can use it directly it in delivery. Otherwise you to enrich it using enrichment activity first and than use it as targetdata in delivery.

Also, make sure you use correct link name also.

Regards,

Ankur A.

Avatar

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
ckumari12
Level 3

Likes

17 likes

Total Posts

38 posts

Correct Reply

4 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
ckumari12
Level 3

02-08-2017

brData is another Data Schema which is linked with recipient table with key as text1 of recipient table = brCode column of brData table

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-08-2017

Hi,

I am not sure I understand the data model here. Can you confirm that all your data (including custom fields) are part of the recipients table? Or do you use a different table - related to the recipients table - to store the brData?

Let me know,

Florent