Hi fellow community people, I am struggling with getting to grips with the msdyncrm_FetchContactsByQuery to access segments in Dynamics Marketing. The documentation says this is the way to fetch all members of a segment:
POST {{OrgUrl}}/api/data/v9.0/msdyncrm_FetchContactsByQuery
{
"Query":"(SEGMENT(SEGMENT_CRM_ID_e1fa7fdc5c78ea11a811000d3a8e8fcc)).ORDERBY(fullname ASC).SKIP(0).TAKE(1000).SELECT(contactid)",
"FetchXml":"","OwningBusinessUnit":"0b4b85cc-7f6c-ea11-a811-000d3a54d359",
"Scope":270100000,
"TimeZone":null
}
Isn't this using two different methods for the same thing? Both Query and also FetchXML. When testing, it seems like the Query is actually capable of returning large datasets (over 100 000 contacts), by increasing the "TAKE"-variable. However, it seem slike the fetchxml limits the actual datafields returned. So in this example, it returns 1000 contacts, but only the first 15 includse all fields as described in the fetchxml. Trying to increase the fetchxml count to 100 000 only results in http timeouts.
Can anyone shed som light on why both query and fetchxml is needed?
Also, anyone know of resources documenting this a little bit more? https://docs.microsoft.com/en-us/dynamics365/marketing/developer/segment-query-definition
For example, what does the skipFunction do? I guess it skips something...


Report
All responses (
Answers (