Expand my Community achievements bar.

SOLVED

crs.get('<Datasource Name>.<Attribute name>'), here what to be used as "Datasource Name"?

Avatar

Level 2

crs.get('<Datasource Name>.<Attribute name>'), here what to be used as "Datasource Name"?.

 

I tried to create audience in Target by using alias id in "DataSource Name" and it does not seems working. I am bit confuse why alias id not working and what else to be used?

Below is actual script code: I used "mdm_mvp" instead as it is alias id but it did not work.

 

var offer_end_date=crs.get("MDM_MVP.OFFER_END_DATE")||0;
//user.setLocal('oed',offer_end_date);
if(offer_end_date ==0){
return false;
}else{
var curr_date=new Date().getTime();
//user.setLocal('curr_date',curr_date);
var oed_time=Date.parse(offer_end_date+' 14:29:59');
//user.setLocal('oed_time', oed_time);
if(curr_date<=oed_time){
return true;
}else{
return false;
}
}

 

@VictorToledo_ @DEBAL_DAS @arunpatidar @arturl43391132 @Ankur_Khare @Rajneesh_Gautam_

@Tanvi_Agarwal_  

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hello @RudraChaudhari ,

In <Data source Name> you need to insert the Name of the customer attributes not the aliasID of customer attributes.

(Name: By which you've saved customer attribute) 

 

And the syntax  crs.get('<Datasource Name>.<Attribute Name>') used for referencing customer attributes in profile scripts. and profile script can be used directly in code.

 

You can find more about syntax here:

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/working-with-custome... 

 

 

 

Regards,

Sai Ganesh Reddy

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Hello @RudraChaudhari ,

In <Data source Name> you need to insert the Name of the customer attributes not the aliasID of customer attributes.

(Name: By which you've saved customer attribute) 

 

And the syntax  crs.get('<Datasource Name>.<Attribute Name>') used for referencing customer attributes in profile scripts. and profile script can be used directly in code.

 

You can find more about syntax here:

https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/working-with-custome... 

 

 

 

Regards,

Sai Ganesh Reddy