Skip to main content

Notifications

Announcements

No record found.

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans