내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Referencing profile script value in VEC custom code

Avatar

Level 3

Hi,

 

We are uploading data into customer attributes. We have then created a profile script to reference the attribute.

 

Is it possible to retrieve the value of the profile script within the VEC > custom code builder? Or alternatively, is there a way to retrieve the customer attribute value within the VEC > custom code builder? 

 

I know you can render the value like this:  ${user.endpoint.lastPurchasedEntity} but we would like to use the value within our custom code to determine what to display to the user. E.g if  ${user.endpoint.lastPurchasedEntity} = x then do y.

 

Any ideas?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hello @nicholase927171 ,
yes you can simply define e.g. a variable and then work with it in the code.

 

<script>
    var a = '${user.activeActivities}';
    var b = (a.length < 10) ? 'small' : 'big'; // just an example
    console.log(b);
</script>

Hope this helps you.

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hello @nicholase927171 ,
yes you can simply define e.g. a variable and then work with it in the code.

 

<script>
    var a = '${user.activeActivities}';
    var b = (a.length < 10) ? 'small' : 'big'; // just an example
    console.log(b);
</script>

Hope this helps you.

Avatar

Level 3

Fantastic thanks for the response!