Dears, I am using below code to get Segment members but how can I apply filter on it? I tried to add condition in the fetchXML but it neglected it as if it doesn't exist. I even tried to add .FILTER() on the query but it returned an error that query is not correct.
Eventually, I need to get all segments where current contact is part of, but my segments are dynamic not static so they are changing every while.
-----------------------------------------------------------------------------
Retrieve segment members (recommended)
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
}
-----------------------------------------------