Personalization : Fields has relation with recipient table

Avatar

Avatar

ckumari12

Avatar

ckumari12

ckumari12

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?

View Entire Topic

Avatar

Avatar

_nkur

Avatar

_nkur

_nkur

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.