Skip to main content

Notifications

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

  • HangryMapache Profile Picture
    HangryMapache 112 on at
    RE: How are Segments and Contacts related - I want to loop though contacts that are part of an segment with power automate

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

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How are Segments and Contacts related - I want to loop though contacts that are part of an segment with power automate

    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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans