web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How are Segments and Contacts related - I want to loop though contacts that are part of an segment with power automate

(0) ShareShare
ReportReport
Posted on by 112

Coming form a relational db background, can't figure out how contacts and segments are related. 

I simply want to loop through Contacts that are part of a segment. I am expecting a table that associate contacts to a segment, but have yet to find it.

I am looking for insight into this to be able to complete some flows.

Thanks

Xv

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi HangryMapache,

    You need to perform an unbound action to achieve this:

    pastedimage1653635064204v1.png

    This is a http request sample: you need to change the Segment id in the "Query".(Please remove all the '-' in GUID)

    POST {{OrgUrl}}/api/data/v9.0/msdyncrm_FetchContactsByQuery
    {
        "Query":"(SEGMENT(SEGMENT_CRM_ID_e1fa7fdc5c78ea11a811000d3a8e8fcc)).ORDERBY(fullname ASC).SKIP(0).TAKE(15).SELECT(contactid)",
        "FetchXml":"","OwningBusinessUnit":"0b4b85cc-7f6c-ea11-a811-000d3a54d359",
        "Scope":270100000,
        "TimeZone":null
    }

    Please refer to this doc: https://docs.microsoft.com/en-us/dynamics365/marketing/developer/extend-segments#addremove-contacts-to-static-segments

    Result:

    pastedimage1653635342009v2.png

  • HangryMapache Profile Picture
    112 on at

    Thank you ! That answers my question. Took a long time to find the solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans