I'm trying to find a way to view all segments that a particular contact is a part of—is this possible?
Would you (or anyone else in the know who reads this) be willing to share more specific steps on how to achieve this? It would be amazing to implement this in our instance, but I don't have quite enough experience with D365/Power Automate to implement this.
Hello Halen! I'm finally getting back to this project. I'm hoping you can help me fill in a couple of the steps here to make this happen. Here's what I surmise needs to happen:
1. Create new Entity
2. Add relationships for contactid and segmentid between existing Entities (Contact, Segment) and new Entity. --> would these be N:N?
3. Add fields in new Entity for those I'd like to display on form
a. Segment Name, Segment Type, Status, Etc.
4. Set up Power Automate:
a. When a segment is created, find all contact records affiliated with that segment with fetch XML. --> I'll admit this is the hardest part for me when doing a bit of pre-exploring to tackling this. I can't seem to get an Advanced Find query to show me which Segments contain XYZ member(s). What might I be doing wrong here?
b. Once the contact records and segment records are located, create a new record in the new Entity that populates with the data from those records.
5. Once the above steps are working, add the captured information to the Contact form as a relative table lookup.
Does that seem close?
This is super great and gives me a place to start! Much appreciated!
So it is actually quite simple: An entity is required that will sit between Contacts and Segments.
The entity only requires a couple of fields to capture the basic information of what segment is a contact in.
So attributes like contactid and segmentid to map back to Contacts and Segments, respectively, and then attributes like date created, segment status, etc.
You would need to create relationships between this custom entity and Contacts and Segments, so that segment member records are linked to their respective source records.
We have created a PowerAutomate flow to do this automatically on the creation of a segment.
It basically uses a fetch XML statement to find all contact records that are affiliated with that segment. And this is quite interesting because the contact-segment link does exist in Dynamics, it just isn't stored as an accessible data point.
You can test this with an advanced find on contact.
All that happens then is every time a new segment is created, the workflow runs, pulls all the contacts that are affiliated to that segment, and then it creates individual records (i.e. segment membership records) in the custom entity.
And because we mapped these back to contacts, you should be able to then add this information to the contact form as a relative table lookup.
Let me know if anything is not clear.
That is super awesome and exactly what we're looking to do! I'd love some more direction if you can provide it.
As far as I am aware, Dynamics Marketing does not provide you with a consolidated list of the segment membership for each contact.
As this was one of our requirements, we custom built an entity to record this information.
You can do it quite easily actually in Dynamics through a custom entity and then use Power Automate to populate the entity with records for each contact based on their segment affiliations.
This is what it looks like:
You can get segment member but not the other way around.
However, you can loop through the segments, get all the member and then find what all segment is contact part of - not very efficient though.
You can refer this to get members of segment: