Lightning Scheduler: Calendar Integration

Share on facebook
Share on twitter
Share on linkedin
Lightning Scheduler gives us tools needed to simplify appointment scheduling in Salesforce. We can create a customized experience by scheduling customer appointments. The appointments by in person, or by phone or video with the right person at the right place and time. We can use an app, such as Lightning Sync or Einstein Activity Capture, to connect Salesforce calendar with an external calendar such as Microsoft, Outlook, or Google Calendar.

With Lightning Scheduler, it is easy to insert appointment scheduling into standard Salesforce workflows, such as leads and referrals, Opportunities, and Accounts. With Lightning Scheduler, we can do the below.

  • Create records that represent appointment attendees (service resources) and add details about their areas of expertise (skills), location, and availability
  • Describe branch and office locations (service territories) and operating hours
  • Create appointment topics (work type groups), such as home loans or investment
  • Describe appointment templates (work types) to link appointment topics with locations
  • Schedule customer appointments with defined topics, attendees, duration, and location.

Required Edition

It is available for Enterprise, Performance and Unlimited Editions.

Data Model Overview

Learning about the objects and relationships within the Lightning Scheduler data model that represent appointments and employees who can be scheduled to attend appointments.

Set Up Lightning Scheduler

  1. Assign the Lightning Scheduler Setup App
    1. Setup -> Quick Find box ->Lightning Experience App Manager ->the Lightning Scheduler Setup dropdown-> Edit -> App Settings -> User Profiles -> Move the System Administrator profile to Selected Profiles -> save the changes.
  2. Configure Who Can Be a Service Resource
    1. Create a Permission Set for the Lightning Scheduler permission set license and assign the user
      1. Setup -> Quick Find box -> Permission Sets -> New and Enter a label, API name, and description for your permission set -> select the Lightning Scheduler permission set license -> Save.
      2. On the Permission Set overview page, under System, click System Permissions -> Click Edit and Enable the Let a user be included in appointments in Lightning Scheduler permission -> Save.
      3. On the Lightning Scheduler Permission Set overview page -> click Manage Assignments, and then click Add Assignments -> Select the users -> click Assign -> click Done.
  3. Configure Who Can Manage Lightning Scheduler Core Elements
    1. Setup -> Quick Find box -> Profiles -> Click Edit  -> Under Standard Object Permissions, define the access level to Lightning Scheduler objects.
  4. Configure Related Lists for Lightning Scheduler Object Page Layouts
    1. Setup -> Object Manager -> Quick Find box -> Service Territory -> Edit Page Layouts -> On the palette, select Related Lists à Drag Service Territory Members and Service Territory Work Types on the Related Lists section of the page -> Save.
    2. Similarly, we can add for Absences, Appointments, Service Territories, and Skills to the Service Resource object page layout.
  5. Make Lightning Scheduler Object Tabs Visible to Lightning Scheduler Users
    1. Setup -> Quick Find box -> Profiles -> Edit -> Tab Settings, ensure that the required Lightning Scheduler tabs are set to Default On.
    2. Add the tabs to a custom app or ask users to add the tabs to the Salesforce navigation bar.
  6. Add the Operating Hours Component to a Lightning Page in Lightning Scheduler
    1. Setup -> Quick Find box -> Lightning App Builder -> Edit for one of the following pages
      • Service Territory Lightning Record Page
      • Service Territory Member Lightning Record Page
      • Work Type Lightning Record Page
    2. Drag the Scheduler Operating Hours component onto the page
    3. Save and Activate the page
    4. Repeat for the other Lightning pages listed in step 1 as needed
  7. Enable Maps and Location Services in Lightning Scheduler
    1. Setup -> Quick Find box -> Maps and Location Settings -> Edit -> Select Enable Maps and Location Services -> Save
    2. Setup -> Quick Find box -> Data Integration Rules -> Click Geocodes for Service Territory Address -> Edit Rule Settings -> Select Update all records (recommended) and save.
  8. Extend Location Search
    1. Setup -> Quick Find box -> CSP -> New
    2. Enter a name for the site. For example, enter location_force_com
    3. Enter a URL for the site
      • For a production org, enter https://location.force.com
      • For a sandbox org, enter https://test-location.force.com
    4. Save your changes.
  9. Use Lightning Scheduler Setup Assistant Guidance (Optional):
    1. Setup -> Quick Find box ->Lightning Experience App Manager Setup page -> edit the Lightning Scheduler Setup app.
    2. Select Navigation Items -> Move Lightning Scheduler Setup Assistant to Selected Items, and then click Save.
    3. From the App Launcher, find and open Lightning Scheduler Setup.
    4. (Optional) Enable the Lightning Scheduler Setup Assistant tab for your profile.
      • Setup -> Quick Find box -> Profiles -> Tab Settings, for Lightning Scheduler Setup Assistant -> select Default On and save.
    5. Click the Lightning Scheduler Setup Assistant tab. If you do not see the Lightning Scheduler Setup Assistant tab, enable it for your profile (Step 4).
  10. Set Up Scheduling for Internal Users (Outbound Scheduling) Lightning Scheduler provides standard flow templates to let internal users (employees) quickly schedule appointments with customers. We can either use the given standard flow templates or create flows based on those templates and customize them to suit your business needs.
    1. Grant Access to Outbound New Appointment Flow
      1. Setup -> Object Manager -> Account, Person Account, Lead, or Opportunity  -> Select Page Layouts à add the Schedule Appointment action to the page.
      2. Select Mobile & Lightning Actions in the palette ->Drag the Schedule Appointment action to the top -> Save the changes.
      3. Repeat these steps for each page layout. Users can now click the Schedule Appointment button or the link in the dropdown list on account, person account, lead, or opportunity record pages to schedule appointments.
    2. Grant Access to Outbound Modify Appointment Flow
      • Setup -> Object Manager -> Service Appointment -> Page Layouts and edit -> Drag the Modify Service Appointment action to the top and Save
    3. Grant Access to a Custom Outbound Flow
      1. Create an action for your custom flow
        • Setup -> Object Manager -> Object -> Click Buttons, Links, and Actions, and then click New Action -> Action Type list -> select Flow -> select the name of your customized outbound flow -> Enter a label and Save your changes
        • Repeat these steps for each object you want to create an action for
      2. Add the actions to the relevant object page layouts
        1. Setup -> Object Manager -> object -> Select Page Layouts -> Select Mobile & Lightning Actions in the palette.
        2. Drag the action to the top of the Salesforce Mobile and Lightning Experience Actions section and Save your changes.
    4. Add Lightning Scheduler Flows to Record Pages
      1. On the record page that you want to embed your Lightning Scheduler flow into, from Setup, select Edit Page.
      2. Drag the Flow component to the page.
      3. In the Properties pane, from the Flow list, select the Lightning Scheduler flow that you want to add.
      4. Save your changes.
  11. Set Up Scheduling for Authenticated External Users (Inbound Scheduling):

Lightning Scheduler provides standard flow templates to let your authenticated external users (customers and partners) quickly schedule appointments with your employees. Users can easily search for and select the right person, topic, location, and date and time of the appointment. We can either use the provided standard flow templates or create flows based on those templates and customize them to suit your business needs.

Lightning Scheduler provides these standard flow templates for authenticated external users.

FLOWPURPOSE
Inbound New AppointmentWalks an authenticated external user through scheduling an appointment with one or more employees.
Inbound Modify AppointmentWalks an authenticated external user through modifying a scheduled appointment.
Inbound Cancel AppointmentWalks an authenticated external user through canceling a scheduled appointment.
  1. Supported Communities Licenses
    • To configure inbound scheduling in your Salesforce community, you need at least one of these communities’ licenses.
      • Customer Community
      • Customer Community Plus
      • Partner Community
      • Lightning External Apps Plus
  2. Give Users Permission to Schedule Appointments
    1. Setup -> Quick Find box -> Profiles -> Click Edit next to the profile that you want to assign permissions to.
    2.  Under General User Permissions, select these permissions.
      • Access Activities – To create and update events on Salesforce calendar.
      • Edit Events -To create and edit events on Salesforce calendar.
      • Run Flows – To run appointment flows.
    3. Under Standard Object Permissions, define appropriate access levels for these objects.
      • Accounts – Read
      • Contacts – Read
      • Operating Hours – Read
      • Service Appointments – Read, Create, Edit
      • Service Resources – Read
      • Service Territories – Read
      • Work Types – Read
      • Work Type Groups – Read
      • Save your changes.
    4. If you see a permission change confirmation, click Save.
  3. Update Sharing Settings
    1. Setup -> Quick Find box -> Sharing Settings.
    2. Under Organization-Wide Defaults, set the sharing settings as described in this table.
    3. Under General User Permissions, select these permissions and Save the Changes.
      • Calendar – Show Details and Add Events
      • Service Appointment – Public Read/Write
      • Service Resource – Public Read Only
      • Service Territory – Public Read Only
      • Work Type Public – Read Only
      • Work Type Group – Public Read Only
      • User – Public Read Only
  4. Additional Configurations for Inbound Modify Appointment Flow
    1. Grant your users edit permission on Account and Contact.
      • Setup -> Quick Find box -> Profiles -> Click Edit next to the profile.
      • Under Standard Object Permissions, select Edit for Account and Contact objects.
    2. Give your partner users read and write access to partner account records. You can do that in one of the following ways.
      • Manually share account records with partner users.
      • Create a sharing set to grant read and write access to partner users
      • Use a sharing rule on Account to share account records with partner users.
    3. In Sharing Settings, under Organization-Wide Defaults, for Activity, set default internal access to Controlled by Parent.
    4. For the Public field on the Event object, set the field-level security to Visible for partner user and admin profiles.
    5. Create a workflow rule on the Event object to set ‘Public’ flag to true when partner users create an event.
  5. Add Inbound Flows to Salesforce Communities
    1. From your inbound scheduling community, click Experience Builder in the profile menu
    2. In Experience Builder, select the Components icon.
    3. Enter Flow into the search box.
    4. Drag the Flow component onto the canvas.
    5. From the Flow list, select a standard flow template, such as Inbound New Appointment, Inbound Modify Appointment, Inbound Cancel Appointment, or a custom inbound scheduling flow.
    6. Repeat steps 4 and 5 to add more flows.
    7. Click Publish to save and publish your changes.
  6. Add Inbound Flows to Website
    1. Lightning Scheduler must be enabled.
    2. Your org must have a Service, Sales, Financial Services Cloud, or Health Cloud license.
    3. For user authentication, a Salesforce Community (preferable) or a Salesforce Site must be set up on your org.
    4. Ensure that Lightning Scheduler supports your browser. Lightning Scheduler supports the same browsers as Lightning communities.
    5. Create an Embedded Service
      1. Setup -> Quick Find box, -> select Embedded Service Deployments -> Click New Deployment.
      2. From the Site Endpoint list, select your Salesforce community or Salesforce site that you want to use, and click Save.
      3. On the Embedded Service Deployment Settings page, under Appointment Management Settings, click Start.
      4. Select Let Customers Schedule New Appointments and Let Customers View Their Appointments and click Save.
      5. Under Login method, click Edit.
      6. From the Login Method list, select Communities, and click Save.
      7. Under Scheduling flows, click Edit.
      8. For each of the three fields, select an appropriate appointment scheduling flow or a custom flow and Save it. For example, for New Appointment Flow, select In_New.
        • New Appointment Flow: In_New
        • Modify Appointment Flow: In_Modify
        • Cancel Appointment Flow: In_Cancel
      9. Optionally, under Additional branding, click Edit to customize your appointment scheduling interface.
    6. Create a Connected App
      1. Setup à App Manager à New Connected App
      2. Enter a Connected App Name, such as Inbound Connected App
      3. Enter a contact email
      4. Under API (Enable OAuth Settings), select Enable OAuth Settings.
      5. Enter a callback URL. For example, if your website is https://cumulusbank.com, you can create a page for the callback and host it as https://cumulusbank.com/inbound-callback.html
      6. Move Allow access to your unique identifier (OpenID) from the Available OAuth Scopes list to the Selected OAuth Scopes list.
      7. Click Save, and then click Continue.
      8. On the Inbound Connected App page, under API (Enable OAuth Settings), copy and save the Consumer Key. You will need this key when you create an external page for your inbound scheduling flow.
      9. Click Manage, and then click Edit Policies
      10. Under OAuth Policies, for Permitted Users, select Admin approved users are pre-authorized, and click Save.
      11. Under Profiles, click Manage Profiles.
      12. Select the System Administrator profile and the profiles of the community’s users who will access the inbound scheduling flow through Embedded Service on your website, and then click Save.
    7. Set Up Cross – Origin Resource Sharing [CORS]:
      1. Setup à Quick Find box à Select CORS à New.
      2. In the Origin URL Pattern field, enter your website’s domain URL, and click Save.
    8. Get Your Embedded Service up and Running on Your Website
      • Setup à Quick Find box à Embedded Service Deployments.
      • Click the dropdown arrow for your embedded service (Inbound in this case) and select View.
      • Under Embedded Service Code Snippets, click Get Code.
      • Under Chat Code Snippet, click the Copy to Clipboard link, and then click Done.
      • Paste the code in a text editor or web publisher.
      • In the code, set the values of the parameters as described in this table 1.1. NOTE: Enter the values within single quotation marks.
      • Paste the modified code snippet within the <body> tag of your website’s page on which you want to make the inbound flows available.
      • On the callback page, enter the following code snippet.
embedded_svc.settings.useCustomAuthenticationVerify that the value is set to false.
embedded_svc.settings.loginClientIdEnter the consumer key that you copied when you created your connected app.
embedded_svc.settings.loginRedirectURLEnter the callback URL that you entered when you created your connected app.
embedded_svc.settings.loginTargetQuerySelectorEnter #salesforce-login
embedded_svc.settings.authenticationStartLabelEnter a message that you want to display when authentication is complete.
Table 1.1
<!DOCTYPE html>
<html>
<head>
<meta name="salesforce-community" content="Community URL">
<meta name="salesforce-mode" content="popup-callback">
<meta name="salesforce-save-access-token" content="true">
<meta name="salesforce-allowed-domains" content="cumulusbank.com">
<script src="Community URL/servlet/servlet.loginwidgetcontroller?type=javascript_widget" async defer></script>
</head>
<body></body>
</html>

Replace the Cumulus website references in the code snippet with your website and community details.

Lightning Scheduler Limitations

  • Limited Support on Mobile Devices
    • Lightning Scheduler standard flow templates do not support multi-resource scheduling on a mobile device.
  • Flow – Specific Limitations
    • Lightning Scheduler standard flow templates do not support right-to-left languages such as Arabic.
    • The Lightning Scheduler Flow type does not support these capabilities.
      • Conversion into screen flows
      • Enabling sub flows
      • Component visibility filters

Conclusion

Thus, the lighting scheduler can be used as an efficient tool for appointing meeting in Salesforce. Even though it has some limitations, it proves to be useful in many ways. Furthermore, it also provides a personalized knowledge between the customers.

Reference

  1. Trailhead Reference: https://trailhead.salesforce.com/en/content/learn/modules/lightning-scheduler
  2. Salesforce Help: https://help.salesforce.com/articleView?id=ls_overview.htm&type=5
  3. Setting up for free trail org for Financial Cloud Services: https://www.salesforce.com/form/signup/financial-services-cloud-trial/
  4. Lightning Scheduler Terminology: https://help.salesforce.com/articleView?id=ls_terminology.htm&type=5

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Salesforce and Sync Apps

Sync Apps is an Integration tool that helps us integrate Salesforce with other platforms. For example, Constant Contact can be a platform that can be integrated with Salesforce, which is another platform. This kind of integration between two different platforms is possible without coding.

Read Article »

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.