Formula Fields
Einstein Prediction Builder



Gemma Emmett

Einstein Opportunity Predictor

by Gemma Emmett


  1. Einstein Prediction Builder works on boolean (box is either checked or not), so it is critical to understand this context. For the renewals app, I want to know if it will be on time or not, but I won't be able to ask what date it would close.

    Trailblazer Note

    There is an awesome Einstein Prediction Builder trail that I adapted to the renewals app here. I've adapted it to my app, but if you get stuck you can refer back here for details.

  2. Create a formula field called "Days Until Close" on the opportunity object that counts the days until the expected opportunity close. Use number as the formula type, no decimals, and the following formula: Today( ) - Expected Close Date.

  3. Create a second custom formula field on the opportunity object called "Closing Prediction”; make it a checkbox return type and use the following formula: ISPICKVAL(Status,"Closed Won"). You may need to adapt to your org's syntax.

  4. We will enrich the dataset by creating a rollup summary field on the account object called "Won Deal Count". Your summarized object is Opportunities; select COUNT and filter where STAGE equals "Closed Won".

  5. Create a final custom formula field on the Opportunity object and call it "Won Deals" number return type, and no decimal places. In the formula field use Insert Field to select "Won Deal Count" from the Account object.

  6. Enter Einstein Prediction Builder from setup and name your prediction. Select the "Closing Prediction" formula field in the opportunity object. Have Einstein use opportunities where stage does not equal ‘Closed Won’ & Days Until Close >0.

  7. Name your prediction "Predicted Closing" and now we need to wait a few hours for Einstein to determine if the opportunity is likely to close. In the meantime we can create a custom list view to look at our at-risk opportunities.

  8. Go to your opportunities, select the gear, and create a list view. Let's name it "Call the Account Exec" and include the account, Days Until Close, Account Owner, and Predicted Closing. For Predicted Closing, enter a value less than 20.

    Trailblazer Note

    Now we have a list of opportunities that are less likely to close, and we can reach out to the Account Exec to see if assistance is needed. Before the deal pushes!

Inspired to build your own app? Share your app recipe with the community.

Submit a Recipe

More App Recipes