Greetings,
I am working with a client where the users will have multiple accounts in same source and each account will have the account status True / False. The transforms needs to use the value from the active account and if no active accounts are present then transforms should use the data from inactive account.
We can use the “accountPropertyFilter” to filter the active accounts and by wrapping the logic inside a firstValid transform we will be able to get the active account data and if active account not present then I will use the data from inactive account.
{
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"sourceName": "TestSource",
"attributeName": "Email",
"accountPropertyFilter": "(isActive == \"true\")"
}
},
{
"type": "accountAttribute",
"attributes": {
"sourceName": "TestSource",
"attributeName": "Email",
"accountPropertyFilter": "(isActive == \"false\")"
}
},
"[email protected]"
]
}
Is there anyway that we can get the required data once and use it through out the transform instead of using this same code for at all loctions for different variables? I am trying to avoid the above code block whenever I need to use the Account Attribute Transform.
Appriciate any help or thoughts…!
Thankyou.