Hi there,
We are looking to send our customers a SMS based on their phone numbers in their profile. However, for our org identity structure, a profile can have multiple accounts, the data looks like this:
"ContactNumbers": [
{
"Account": "1",
"PhoneNumber": "111",
"AccountType": "Class A"
},
{
"Account": "2",
"PhoneNumber": "222",
"AccountType": "Class B"
},
{
"Account": "3",
"PhoneNumber": "333",
"AccountType": "Class c"
}
]
Is it possible in the Advanced Mode of an expression, put conditions in there? In English, "return me the phone number in the array position where AccountType is "Class C""
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Ivan_Mironchuk,
I came across this documentation, and experimented with a few variations of what is mentioned in it. Looks like by using the below expression, it achieves what I needed.
(serializeList(#{ExperiencePlatform.ContactDetails.profile._tenantID.contactdetailsv2.all(currentDataPackField.Account == ${externalKey}).smsContactNumber},'', false))
where ${externalKey} is the parameter.
I am still looking forward to the IF/ELSE feature though!
Thanks.
Views
Replies
Total Likes
hi @akwankl currently it is not possible to use expressions to choose the particular phone number. We are working through a featureset in the future that will allow for if/then expressions for surface settings such as the use case above. In the meantime, I suggest using audience segment logic to split your audience into the different account holder types before targeting.
Views
Replies
Total Likes
Hi @Ivan_Mironchuk,
I came across this documentation, and experimented with a few variations of what is mentioned in it. Looks like by using the below expression, it achieves what I needed.
(serializeList(#{ExperiencePlatform.ContactDetails.profile._tenantID.contactdetailsv2.all(currentDataPackField.Account == ${externalKey}).smsContactNumber},'', false))
where ${externalKey} is the parameter.
I am still looking forward to the IF/ELSE feature though!
Thanks.
Views
Replies
Total Likes