crs.get('<Datasource Name>.<Attribute name>'), here what to be used as "Datasource Name"? | Community
Skip to main content
RudraChaudhari
New Participant
November 10, 2022
Solved

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

  • November 10, 2022
  • 1 reply
  • 1017 views

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_  

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SaiGaneshReddy

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-customer-attributes.html?lang=en 

 

 

 

Regards,

Sai Ganesh Reddy

1 reply

SaiGaneshReddyAccepted solution
New Participant
November 10, 2022

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-customer-attributes.html?lang=en 

 

 

 

Regards,

Sai Ganesh Reddy