Skip to main content

Hi there, our contact properties contain a field that is a somewhat complex data type: it is an array of objects. For arguments sake, the field is called "classes," and a couple of contacts might have data that looks like this:

Jane

classes: [

{ name: "Math 101", enrollment_status: "enrolled" },

{ name: "Chemistry 101", enrollment_status: "waitlist" },

]

Bob

classes: [

{ name: "Math 101", enrollment_status: "waitlist" },

{ name: "Chemistry 101", enrollment_status: "enrolled" },

]

We want to run a campaign against a segment of users who are *enrolled in Math 101*.

When we compose the segment, we're saying "Find users that meet ALL of the following criteria": classes.name equals "Math 101"

AND

classes.enrolled equals "enrolled"

We're seeing both Jane & Bob show up in the segment, seemingly because both criteria are met when looking at ALL class objects in our classes array.

Can anyone help us build the segment we're looking for? Are there any workarounds? Would you recommend a different schema?

Hi Steven,

Indeed both criteria are being met by another item in the same array of objects which is why both users are returning in your segmentation.

I think you should probably create a ticket with support@iterable.com and we will be happy to assist you there.

I think potential solutions probably goes beyond the scope of this forum.

In the support ticket, if you can provide a sample user email that has this data structure as well as the project name , that would be helpful in expediting the request to get a quicker response.


Did you ever figure this out Steven Moncada ?


Reply