Using Salesforce workflow rules to update fields based on ScheduleOnce data

The ScheduleOnce connector for Salesforce allows you to map any ScheduleOnce System or Custom fields to Salesforce fields. If you want to add an additional layer of Salesforce fields update logic, you should configure Salesforce workflow rules.

In this article, you will learn how to create Workflow rules based on ScheduleOnce data. You will review a sample scenario in which you will update the Lead - Event booked checkbox and the Lead - Lead status picklist when a Customer makes a booking or reschedules a booking.

Requirements

To update Salesforce fields when the Customer schedules or reschedules an event, you will need:

Let’s assume that you have already customized the Lead layout:

  • The Event Status custom field is added to the Lead layout
  • The Event Booked checkbox (unchecked as default) is added to the Lead layout
  • The Lead Status field includes the Working – Contacted and the Open – Not contacted options

Map the ScheduleOnce Status field to the Lead Event status field

  1. In the Salesforce connector setup, go to the Optional Mapping tab.
  2. At the bottom left of the table, click the Add ScheduleOnce fields button. The ScheduleOnce field list includes System fields and Custom fields organized by categories.
  3. On the Add ScheduleOnce fields popup, filter by Booking data, check the Status box, and click the Add fields button. (see figure 1)

Figure 1: Booking data - Status field

Note: If you want to make the Workflow rule booking page or Service specific, you can also map the ScheduleOnce Booking page label or Service name to specific Lead Custom fields. The Booking page label or Service name can be used to refine the Salesforce Workflow rule that is triggered when a booking is made.

  1. Now you simply need to map the ScheduleOnce Booking data - Status field to the Salesforce Lead – Event status custom field.
  2. Click the Save button or Save and Continue if you have completed mapping all fields.

Create Workflow Rules in Salesforce

You can automate the update of many field records using workflow rules. We will create two workflow rules:

  • Workflow rule 1 checks the Event booked checkbox and sets the Lead Status to Working - Contacted when the event is scheduled or rescheduled by Customer
  • Workflow rule 2 unchecks the Event booked checkbox and sets the Lead Status to Open – Not Contacted when the event is not scheduled or rescheduled by Customer

To create Workflow rules:  

  1. Log in to Salesforce.
  2. In your Salesforce Setup page, go to Create > Workflow and approvals.
  3. Select Workflow rules and click New Rule.
  4. From the Object drop-down, select the object to which the rule will apply. In our example, select Lead.

Creating the Workflow Rule 1

  1. On the New Workflow Rule page in Salesforce, fill out the following information and click Save. (See figure 2)

    • Rule Name: Update Lead fields when event is scheduled or rescheduled by Customer
    • Rule description: The Rule checks the Event booked checkbox and sets the Lead Status to Working - Contacted when the event is scheduled or rescheduled by Customer
    • Evaluate the rule when a record is: created, and every time it’s edited
    • Rule Criteria: Run this rule if the following criteria are met:
      • Lead: Event status Equals Scheduled
      • Lead: Event status Equals Rescheduled by Customer
      • Advance filter logic: 1 OR 2

Figure 2: Update Lead fields when event is scheduled or rescheduled by Customer

  1. On the Immediate Workflow Actions, click Add Workflow Action, select New Field Update, make the following changes, and click Save (see figure 3):

    • Name: Check automatically the Lead Booked checkbox
    • Unique name: Check_checkbox
    • Field to update: Event Booked
    • Re-evaluate Workflow Rules after Field Change: Checked
    • Checkbox Options: True

Figure 3: Check automatically the Lead Booked checkbox

  1. On the Immediate Workflow Actions, click Add Workflow Action, select New Field Update, make the following changes, and click Save (See figure 4):

    • Name: Update the Lead Status picklist to Working - Contacted
    • Unique name: Working - Contacted
    • Field to update: Lead Status
    • Re-evaluate Workflow Rules after Field Change: Checked
    • Picklist Option > A specific value: Working – Contacted

Figure 4: Update the Lead Status picklist to Working - Contacted

  1. Under the Workflow rules page, click Activate to activate the rule.

Creating the Workflow Rule 2

  1. On the New Workflow Rule page in Salesforce, fill out the following information and click Save.

    • Rule Name: Uncheck automatically the Lead Booked checkbox when a booking is not scheduled or rescheduled by Customer.
    • Rule description: The Lead.Booked checkbox will be automatically unchecked on the Lead layout when an event is not scheduled or rescheduled by the Customer for that record.
    • Evaluate the rule when a record is: created, and every time it’s edited
    • Rule Criteria: Run this rule if the following criteria are met:
      • Lead: Event status Does not equal Scheduled
      • Lead: Event status Does not equal Rescheduled by Customer
      • Advance filter logic: 1 OR 2
  1. On the Immediate Workflow Actions, click Add Workflow Action, select New Field Update, make the following changes, and click Save:

    • Name: Uncheck automatically the Lead Booked checkbox when a booking is made
    • Unique name: Update_checkbox1
    • Field to update: Event Booked
    • Re-evaluate Workflow Rules after Field Change: Checked
    • Checkbox Options: False
  1. On the Immediate Workflow Actions, click Add Workflow Action, select New Field Update, make the following changes, and click Save:

    • Name: Change the Lead Status picklist to Open - Not Contacted
    • Unique name: update_picklist1
    • Field to update: Lead Status
    • Re-evaluate Workflow Rules after Field Change: Checked
    • Picklist Option > A specific value: Open - Not contacted
  1. Under the Workflow rules page, click Activate to activate the rule.

You’re done! Test a booking to view how the Workflow rules update your records when a booking is made.

Rate this article