Hi,
I have created a customer journey that sends email and based on email clicks, I am creating leads.
I have also done a setup for lead scoring models, which gives me the score when I see the lead on the UI.
Now, I would like to fetch the lead score using API, passing the lead ID; but so far I have not been able to get through this.
The "view lead" page passes the following request:
<?xml version="1.0" encoding="utf-8"?>
<fetch version="1.0" mapping="logical" returntotalrecordcount="true" page="1" count="4" no-lock="false">
<entity name="msdyncrm_leadscore">
<attribute name="statecode"/>
<order attribute="msdyncrm_select_score" descending="false"/>
<filter type="and">
<condition attribute="statecode" operator="eq" value="0"/>
</filter>
<attribute name="msdyncrm_select_scoringmodelname"/>
<attribute name="msdyncrm_select_scoringmodelid"/>
<attribute name="msdyncrm_select_score"/>
<attribute name="msdyncrm_select_grade"/>
<attribute name="msdyncrm_leadscoreid"/>
<link-entity name="lead" from="leadid" to="msdyncrm_leadid" alias="bb">
<filter type="and">
<condition attribute="leadid" operator="eq" uitype="lead" value="64c86b97-f9b2-4761-8dc8-930e50916dd4"/>
</filter>
</link-entity>
</entity>
</fetch>
But what exactly do I need to pass/query if I need the same output with postman or using microsoft flow?
Regards,
Dhiren Shah
Try to do the same query in Advanced find, then download the fetchxml from there (it’s easy & to avoid any mistakes)
us.hitachi-solutions.com/.../great-fetchxml-tool-for-microsoft-dynamics-crm
You can test/build queries (including above query in question) in xrmtoolbox plugins like Fetchxml builder or fetchxml tester.
Query looks good, you didn’t say what’s the result ie if any errors or empty rows.
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156