Create a Formula Field to Predict

Add a Checkbox Field

You’ve got your special Trailhead Playground. Now let’s look at it more closely. In Object Manager, you can see that it has:
  • Reservation, a custom object. Each Reservation record represents a customer’s reservation at one of Pizzaiolo Marco’s restaurants.
  • Status, a picklist field on the Reservation object with options that include:
    • Completed
    • No Show
    • Upcoming

You want to predict the likelihood that customers will be a no-show. In a nutshell, you want to know which reservations are likely to eventually have: Status = “No Show.” Einstein Prediction Builder can answer your questions in a yes/no format: “Is this customer’s reservation likely to result in a No Show? Yes or no?” That means you need to provide your historical data in the same yes/no format. In Salesforce, that’s a checkbox field. So let’s create a custom formula checkbox field for No Show.

  1. From Setup, click Object Manager.
  2. Search for and click Reservation.
  3. Click Fields & Relationships.
  4. Click New.
  5. Select the Formula data type, then click Next. Select Formula data type
  6. For the Field Label, enter No Show and select Checkbox for the return type. Then click Next. Select Checkbox output type
  7. Enter this formula in the No Show (Checkbox) field on the Simple Formula tab, and click Next.
    ISPICKVAL(Status__c,"No Show")
    This formula will return a True value if the reservation resulted in a no-show, and a False value otherwise. That’s just what we’re looking for in our prediction. Enter the formula
  8. Leave the default options for field-level security and the following page, clicking Next, then Save.
Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities