Einstein Opportunity Scoring populates a score on each scored Opportunity in Salesforce. The Opportunity Score field (API name `IqScore`, an integer field) is a derived, read-only field. Its value is not stored in the Opportunity row and is calculated only when the field is explicitly queried.
Because of this, the Opportunity Score field returns null when a record-triggered flow reads `{!$Record.IqScore}` or when an Apex trigger reads the field from the new or old record context. In a SOQL query or a Flow Get Records element, the field returns the correct value.
Conditions that trigger the issue: Einstein Opportunity Scoring is enabled, the Opportunity has a valid score, and automation reads the Opportunity Score field directly from the triggering record instead of querying it.
Prerequisites to observe correct behavior: The Opportunity must be scored, and the running user must have access to Opportunity Scoring.
Important: Reading `IqScore` directly from the triggering record has never been a reliable way to obtain the score because the field is derived. Customers may notice that this appeared to work previously and then stopped. Regardless of prior behavior, the supported method is to query the field explicitly, as described in the Resolution.
This article answers the question: why does the Opportunity Score (IqScore) field return null in a Salesforce record-triggered flow or Apex trigger, and how do you get its value? To reliably obtain the Opportunity Score value in automation, query the field explicitly instead of reading it from the triggering record.
Re-query the Opportunity with SOQL after the trigger fires, and use the queried value rather than the value from the trigger context. The following query returns the Id and the Opportunity Score for the record. Replace recordId with the Id of the Opportunity.
SELECT Id, IqScore FROM Opportunity WHERE Id = :recordId
This query-based approach is a supported and stable method for retrieving the Opportunity Score field value.
This is expected behavior for a derived field. No code fix or patch is required or planned. The query-based workaround above is the recommended long-term solution.
005390248

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.