Expandir la barra de logros de la comunidad.

RESUELTAS

How to use object array in audience rule

Avatar

Level 3

Hi,

I have a filed in one of the field groups defined as an array of objects, like shows in the image below.

GabrielaNa1_1-1741014958952.png

 

The field group was added to a schema, which was enabled for profile.

I would like to use the above field in an audience rule, something like below:

where da_for_touchpoints contains at least one that has (tp_code=XXX and tp_event=12345).
Is that possible? If yes, how would I define the audience criteria?

 

Thanks.

 

1 solución aceptada

Avatar

Respuesta correcta de
Community Advisor

Hi @GabrielaNa1  - Hope you are looking to store a multiple values related to the touchpoints. I don't see any odd on the screenshot that you have shared, looks fine. So once you ingest the data, it would look like below on the JOSN view on profile section. 

"da_for_touchpoints": [
{
"tp_code": "546777",
"tp_date": "03-04-2025",
"tp_event": "Community Program"
},
{
"tp_code": "874378",
"tp_date": "03-07-2025",
"tp_event": "Community Discussion"
}
]
Just go to the audience section and look for the folder that named as "da_for_touchpoints" , drag and drop the attributes that require along with the required value and refresh the estimation to see if you get some qualified profiles. Basically, this should get the profiles at least with one array element that match your audience criteria. 
 
Thank you,
Jayakrishnaa P.

Ver la solución en mensaje original publicado

5 Respuestas

Avatar

Employee

You can define an array within the XDM Individual profile class.  

 

You would include the array in the audience criteria and include the a count function which is equal to 1 to account for 1 item of the array.

 

You would then define the attributes of tp_code = foo and tp_event = 12345

Avatar

Level 9

@GabrielaNa1  may be try something like the below for the loyalty object 

 

RiteshYadav18_1-1741029705886.png

 

 

RiteshYadav18_2-1741029786940.png

 

 

Avatar

Respuesta correcta de
Community Advisor

Hi @GabrielaNa1  - Hope you are looking to store a multiple values related to the touchpoints. I don't see any odd on the screenshot that you have shared, looks fine. So once you ingest the data, it would look like below on the JOSN view on profile section. 

"da_for_touchpoints": [
{
"tp_code": "546777",
"tp_date": "03-04-2025",
"tp_event": "Community Program"
},
{
"tp_code": "874378",
"tp_date": "03-07-2025",
"tp_event": "Community Discussion"
}
]
Just go to the audience section and look for the folder that named as "da_for_touchpoints" , drag and drop the attributes that require along with the required value and refresh the estimation to see if you get some qualified profiles. Basically, this should get the profiles at least with one array element that match your audience criteria. 
 
Thank you,
Jayakrishnaa P.

Yes, thank you, that is what I am looking for. I played around a bit since I posted the question and I think it will work, exactly as you mentioned.

Avatar

Administrator

@GabrielaNa1 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni