web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Issue with lead scoring model

(0) ShareShare
ReportReport
Posted on by 90

Hi ,

We have created a lead scoring example with following actions on one field (say Field X) 

1. Field X > 600 : Add score 20

2. Field X <=600 and >300 : Add score 15

3. Field X <= 300 : Add score 10

We find that the scoring is not working expected if the field is modified . For example : 

When record is created with Field X as 500 : Then score is 15 - This is correct. 

When the same record is modified with Field X as 250 : Then score is 25 - This is Wrong. 

It seems that lead scoring rules are just increasing the previous score but not updating it as per criteria. 

Any suggestions on how to handle these situations. Is this a bug in the model ? This is really confusing for our customer. 

Please suggest

I have the same question (0)
  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at

    Hi vijaykiran,

    From 4th tip of this article:

    When your model includes several rules, each rule can affect the lead score independently

    So if your lead status move from "field X equals 500" to "field Y equals 250", then the third rule will be triggered regardless of other rules have been triggered.

    A workaround is that you could stop the model and go live it again, during this period, old lead score records will be cleaned and score will be re-calculated based on current lead fields value once the model goes live again. 

    Lead score of your record will back to 10 if you re-run the model.

    You could request your requirement on improvement of lead scoring model to Ideas forum.

    Regards,

    Clofly

  • vijaykiran Profile Picture
    90 on at

    Thanks Clofly . However , I cannot keep stopping the model as these changes can happen multiple times on the field in several records.

    I pull the improvement request in the Idea forum.

    Do you know where else is the score saved on lead form or other entity. I tried to delete the old lead score record when field is modified , expecting that a new lead score record will be created without incrementing old score but it still increments old score.

    Thank you

  • cloflyMao Profile Picture
    25,210 on at

    Hi vijaykiran,

    The whole lead scoring model process is automatic, so even if we delete lead score record, the final score will still be calculated automatically based on all previous operations, that's by design.

    In your scenario, you could create an empty model without control rules, and create a new lead score record, set its parent model and parent lead.

    Then run following javascript on your lead form when record is saved.

    var leadid = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '');
    
    var eva_score = Xrm.Page.getAttribute("new_evaluationscores").getValue();
    
    var lead_score = "";
    
    Xrm.WebApi.retrieveMultipleRecords("msdyncrm_leadscore_v2", "?$filter=_msdyncrm_lead_value eq "   leadid   "").then(
        function success(result) {
            if (result.entities.length > 0) {
                if (eva_score > 600) {
                    lead_score = 20;
                }
                if (eva_score > 300 && eva_score <= 600) {
                    lead_score = 15;
                }
                if (eva_score <= 300) {
                    lead_score = 10;
                }
                alert(lead_score);
                var data = {
                    "msdyncrm_score": lead_score
                }
                Xrm.WebApi.updateRecord("msdyncrm_leadscore_v2", result.entities[0]["msdyncrm_leadscore_v2id"], data).then(
                    function success(result) {
                        console.log("Ok");
                    },
                    function (error) {
                        alert("Error: "   error.message);
                    }
                );
            }
        },
        function (error) {
            alert("Error: "   error.message);
        }
    );
    

    As you see, we'll update the score value manually based on value in field X.

    Once the score field of lead score record reaches threshold, then trigger a workflow to qualify its parent lead.

    In a word, we do sales ready job for lead manually without model.

    Regards,

    Clofly

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans