function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Peter Martensen 8Peter Martensen 8 

Is there a way to start a Flow or Process Builder when the Opportunity Score changes?

I want to copy the Opportunity Score to a custom field that I can track with Field History Tracking.  Can someone tell me how to lauch a Flow or Process Builder when the Opportunity Score changes?  It doesn't work to simply use Opportunity Score ISCHANGED, I think because it is a system field.
ShirishaShirisha (Salesforce Developers) 
Hi Peter,

Greetings!

Seems like the API name of the Opportunity Score is "IqScore".So,have you tried by checking the criteria something like below:

ISCHANGED(IqScore) in your process.If not,I would suggest you try this formula.I don't have enabled the Einstein Opportunity Scoring in my org but,I don't see any limitations on the score field.

Reference:https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunity.htm

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Peter Martensen 8Peter Martensen 8
Shirisha,  ISCHANGED doesn't work because IqScore is a system field.  At least that's what Salesforce tech support said.
 
Meenakshi PisupatiMeenakshi Pisupati
Hi Peter,

I am looking to solve a similar problem. Did you find a solution to this issue? If so, please share. 

Thanks,
Meena
Peter Martensen 8Peter Martensen 8
Hi Meena,
I did find a solution, but it's not very elegant and I'm constantly trying to find a better way to do this.
I created 2 custom Opportunity fields; Opportunity Score History and Temporary Opportunity Score.  The Temporary Opportunity Score field is a formula field that = OpportunityScore.Score.
I use a scheduled Flow to copy the Temporary Opportunity Score to the Opportunity Score History field every night.  It causes lock row errors once in a while if there are too many Opportunities that changed.  I haven't written a new Flow to fix that yet.  I wrote a Process Builder to copy the Temporary Opportunity Score to the Opportunity Score History field when it changes, but it doesn't fire for reasons I can't figure out.
Peter
Peter Martensen 8Peter Martensen 8
Hi Meena,
I decided to try something after writing the last comment.  I changed the Process Builder to fire if the Temporary Opportunity Score Is Changed OR if the Temporary Opportunity Score <> Opportunity Score (IqScore).  Then I exported all open Opportunities and updated them all using Data Loader and the Process Builder fired.  So that is a better solution.  I then changed the Process Builder so that the condition is Opportunity Score History <> Opportunity Score.  I'll let you know if that works.  It would be great to not have the Temporary Opportunity Score field.
Peter