Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Insights - Journeys forum

How to retrieve members of a marketing segment

(0) ShareShare
ReportReport
Posted on by

Hi, is there an action or something like that to retrieve the members of an msdyncrm_segment? Apparently the documentation does not cover that topic: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/marketing/developer/extend-segments

We would like to use the result list of an segment in an external application.

The query language of segments does not appear familiar to me. What language is this or can it be translated into fetchxml?

Categories:
  • Cnquest Profile Picture
    97 on at
    RE: How to retrieve members of a marketing segment

    I 100% need the ability to see what segments a contact is a member of. I often think those designing Dynamics don't use Dynamics, and this is one of those times.

  • Rinshwind Profile Picture
    35 on at
    RE: How to retrieve members of a marketing segment

    For static segments there is a supported method:

    POST {{OrgUrl}}/api/data/v9.0/msdyncrm_FetchContactsByQuery

    {

       "Query":"(SEGMENT(SEGMENT_CRM_ID_e1fa7fdc5c78ea11a811000d3a8e8fcc)).ORDERBY(fullname ASC).SKIP(0).TAKE(15).SELECT(contactid)",

       "FetchXml":"<fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" count=\"15\" page=\"1\" returntotalrecordcount=\"true\"><entity name=\"contact\"><attribute name=\"fullname\"/><attribute name=\"emailaddress1\"/><attribute name=\"company\"/><attribute name=\"parentcustomerid\"/><attribute name=\"contactid\"/><order attribute=\"fullname\" descending=\"false\"/></entity></fetch>","OwningBusinessUnit":"0b4b85cc-7f6c-ea11-a811-000d3a54d359",

       "Scope":270100000,

       "TimeZone":null

    }

    docs.microsoft.com/.../extend-segments

  • mothersuperior Profile Picture
    5 on at
    RE: How to retrieve members of a marketing segment

    Same problem we are currently facing. Do you have solution to this already?

  • Oseirf Profile Picture
    67 on at
    RE: How to retrieve members of a marketing segment

    Hi Alex,

    Where you successful with the Advenced Find, getting Segmentmembers? I'm having at the moment the same challenge..

    Best Regards

    Frieso

  •  Alexnyho Profile Picture
    15 on at
    RE: How to retrieve members of a marketing segment

    Hi Christian

    With Advanced Find, I try to find contacts that are segmentmembers on any Marketing Segments, but I got no results - even if I know there are members...

    Why? Am I doing something wrong here?

    Br

    Alex

  • Rawish Kumar Profile Picture
    13,756 on at
    RE: How to retrieve members of a marketing segment

    I agree. it is not placed well. But i am glad it is atleast added :)

  • Community Member Profile Picture
    on at
    RE: How to retrieve members of a marketing segment

    Sorry, you are right. Imho the "Retrieve segment members" sub section is badly placed under the "Include/exclude segment members" main section, therefore it wasn't easy to find for me.

  • Verified answer
    Rawish Kumar Profile Picture
    13,756 on at
    RE: How to retrieve members of a marketing segment

    what do you mean it is unsupported. and it has been included in the documentation post I opened a ticket with microsoft on this issue and also opened github issue on document( scroll down to the bottom of the documentation). I have been using it successfully using web api and org service.

    Thanks

  • Community Member Profile Picture
    on at
    RE: How to retrieve members of a marketing segment

    Which is actually what I posted above, but this is not supported. There's still no official documentation on how to retrieve members for dynamic segments: docs.microsoft.com/.../extend-segments

  • Rawish Kumar Profile Picture
    13,756 on at
    RE: How to retrieve members of a marketing segment

    this should help: passion4dynamics.com/.../  

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,758 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans