Skip to content

How to configure Salesforce Scheduler integration with Revenue Grid (v2)

8 min read · For Email Sidebar users on:

Introduction

This guide provides step-by-step instructions on how to set up the Salesforce Scheduler Adapter (SSA) integration with the RG Email Sidebar.

Important

This guide focuses on the version 2 integration scenario, which includes Salesforce widgets. For guidance on configuring SSA integration version 1, see this article.


Prerequisites

Before you proceed, complete the following prerequisites:

  1. Configure Salesforce Scheduler as described in this Salesforce article.
  2. Create a Salesforce Integration User with system administrator permissions as described in this article.

    Important

    To ensure the smooth integration, use the Salesforce Integration User exclusively to connect the Revenue Grid Salesforce Scheduler Adapter. Do not use personal user credentials for this purpose.

  3. Enable the Publish Appointments as Platform Events setting in the Salesforce Scheduler settings as described below.

Enable the Publish Appointments as Platform Events setting

  1. Switch to Lightning Experience.
  2. Open the Salesforce Setup menu.
  3. In the Quick Search field, enter Scheduler Settings.
  4. Click Salesforce Scheduler Settings in the search results.
  5. Enable the Publish Appointments as Platform Events setting.


Step 1: Revenue Grid managed package installation

To enable the full scope of Revenue Grid features, the local Salesforce admin should install a special Revenue Grid Salesforce managed package that includes several auxiliary custom fields, classes, and other components. The package’s publisher, InvisibleCRM, is an old Revenue Grid brand.

The managed package is guaranteed to be secure, confidential, and free of malicious content under Revenue Grid Privacy & Security policies.


Install Revenue Grid managed package

  1. Open the package installation link:

    Revenue Grid managed package (version 1.83)

  2. Log in to your Salesforce account with administrative permissions.

  3. Choose the installation scope:

    • Admins Only
    • All Users
    • Specific Profiles (recommended) – limits access to selected users who need the Salesforce Scheduler integration.
  4. If you select Specific Profiles, set access for the required profiles using the controls provided. For detailed instructions, refer to this Salesforce guide.

  5. Click Install. You will see the following notification:

  6. Once the installation is complete, click Done. You will receive an email confirming the successful installation or providing details about any issues.

Once you have installed the package, you can verify it in Salesforce by navigating to Platform Tools > Apps > Packaging > Installed Packages.


Configure Canvas Application Settings

After installing the managed package, you can proceed to configure the Revenue Grid app in Salesforce.

Important

To complete the configuration, you’ll need RevenueGridTenantUrl  and ServerSyncTenantUrl. To learn how to generate them, see How to generate tenant URLs or request our Support team.

To configure the Revenue Grid application:

  1. Open the Salesforce Setup Menu.
  2. In the Quick Search field, enter Custom Settings.
  3. Click Custom Settings in the search results.
  4. Click Manage next to the CanvasAppSettings label with the REVGRD Namespace Prefix. 

  5. Click Edit. The CanvasAppSettings Edit page will open.

  6. In the RevenueGridTenantUrl and ServerSyncTenantUrl fields, enter the corresponding URLs for your tenant. Make sure the URLs start with https, and then click Save.

Animation: Canvas Application Settings configuration

Set up user authorization policies

  1. In the Quick Search field, enter App Manager.
  2. In the application list, locate the Revenue Inbox for Salesforce application and open its drop-down menu.
  3. Click Manage.

  4. On the newly opened page, click Edit Policies.

  5. In the OAuth Policies section, in the Permitted Users field, select Admin approved users are pre-authorized and confirm selection in the dialogue that appears.

  6. Click Save. The system automatically returns you to the Connected App page.


Select profiles for application installation

  1. On the Connected App page, click Manage Profiles.

  2. Select the user profiles where you want to install the application. We recommend to include system administrators as well.

  3. Click Save.
Animation: Selection of the profiles for application installation

Step 2: Configuration of Revenue Grid Salesforce Scheduler Adapter in Salesforce

Install RG Salesforce Scheduler Adapter

The Salesforce Scheduler integration relies on specific Salesforce objects and classes. To simplify the setup, Revenue Grid provides a secure Salesforce managed package that contains all necessary objects and classes and complies with Revenue Grid Privacy & Security policies.

To install the package:

  1. Open the package installation link:

    RG Salesforce Scheduler Adapter managed package (version 1.30)

  2. Log in to your Salesforce account with administrative permissions.

  3. Select the installation scope:

    • Admins Only
    • All Users
    • Specific Profiles (recommended) – restrict access to users using the Salesforce Scheduler integration.
  4. If you select Specific Profiles, set access for the required profiles using the controls provided. For detailed instructions, refer to this Salesforce guide.

  5. Acknowledge the warning about installing a non-Salesforce application.

  6. Click Install. You will see the following notification:

  7. Once the installation is complete, click Done. You will receive an email confirming the successful installation or providing details about any issues.


Set the custom Apex class

To retrieve Salesforce Scheduler time slots accurately, configure the custom Apex class included in the managed package within the Salesforce scheduling policy settings.

  1. Open the Salesforce Setup Menu.
  2. In the Quick Find field, enter Scheduling Policies.
  3. Click Scheduling Policies in the search results.

  4. Click Edit next to the scheduling policy marked as Is Default.

  5. In the Check External Systems for Resource Availability field, enter the Apex class: ServiceResourceScheduleHandlerImpl.

  6. Click Save.

Important

If your flows use additional scheduling policies, repeat steps 4–6 for each.


Add a new remote site

  1. In the Quick Find field, type Remote Site Settings.
  2. Click Remote Site Settings in the search results.

  3. Click New Remote Site.

  4. Fill in the required fields:

    • Remote Site Name: SSA
    • Remote Site URL: Enter the Sync URL provided by the RG support team (e.g., https://sample-sync.revenuegrid.com).
    • Select the Active checkbox.

  5. Click Save.


Connect Salesforce Scheduler Adapter

  1. In the Quick Find field, type Installed Packages.
  2. Click Installed Packages in the search results.
  3. Click Configure next to the RG Salesforce Scheduler Adapter package.

  4. Enter the Client ID and Sync URL provided by the RG support team.

  5. Click Connect.

  6. In the Salesforce OAuth window, log in with the Salesforce Integration User’s credentials.

After a successful connection, the connection status will update accordingly.


Check the connection status

  1. Open the Sync URL in your browser.
  2. Select Sign in with Salesforce and log in.
  3. Navigate to the Connectivity tab and check the CRM configuration status.

If the connection is unsuccessful, contact our support team.


Step 3: Configuration for instant creation of calendar items in the email server calendar

Create a trigger on the AppointmentSchedulingEvent object

Important

Perform the step in a Sandbox environment. For details on creating a sandbox, refer to Create a Sandbox.

  1. Click on the Gear icon () and select Developer console.

  2. In the upper-left corner, click File, expand the New menu, and select Apex Trigger.

  3. In the pop-up dialog that appears, enter:

    Name: AppSchedEventTrigger

    sObject: AppointmentSchedulingEvent

  4. Click Submit.

  5. In the newly created document, substitute the automatically created text with the next code:

    trigger AppSchedEventTrigger on AppointmentSchedulingEvent (after insert) {  
        if (Trigger.isAfter && Trigger.isInsert) {  
            for (AppointmentSchedulingEvent evt : Trigger.new) {  
                try {  
                    system.debug(JSON.serialize(evt));  
                    String event_json = JSON.serialize(evt); RGLSA.AppSchedEventLSASendHandler app_handler = new RGLSA.AppSchedEventLSASendHandler(); app_handler.processAppointment(RGLSA.AppSchedulingEventWrapper.parse(event_json));  
                } catch (Exception e) { 
                    System.debug('** ex msg: ' + e.getMessage() + e.getStackTraceString());  
                }  
            } RGLSA.SM005_Logs.save();  
        }  
    }
    

Add new Apex Class

Important

Please perform this step in a Sandbox environment. For details on creating a sandbox, refer to Create a Sandbox.

  1. Click File, expand the New menu, and select Apex Class.

  2. In the field on the dialogue, enter AppSchedEventTriggerTest.

  3. Click Ok.

  4. In the newly created document, substitute all automatically created text with the following code:
@isTest  
public class AppSchedEventTriggerTest {  
    static testMethod void testTrigger() {  
        Test.enableChangeDataCapture();                  
        List<AppointmentSchedulingEvent> evtList = new List<AppointmentSchedulingEvent> ();  
        AppointmentSchedulingEvent evt = new AppointmentSchedulingEvent();  
        evt.ChangeType = 'CREATE';  
        evtList.add(evt);  
        List <Database.SaveResult>  results = EventBus.publish(evtList); 
        for (Database.SaveResult sr : results) { 
            if (sr.isSuccess()) { 
                System.debug('Successfully published event.'); 
            } else { 
                for(Database.Error err : sr.getErrors()) { 
                    System.debug('Error returned: ' + err.getStatusCode() + ' - ' + err.getMessage()); 
                }  
            }  
        } Test.getEventBus().deliver();  
    }  
}

Add an outbound change set and its components

Important

Please perform this step in a Sandbox environment. For details on creating a sandbox, refer to Create a Sandbox.

Add an outbound change set
  1. Open the Salesforce Setup Menu.
  2. In the Quick Find box, enter Outbound Change Sets.
  3. Click Outbound Change Sets in the search results. If you see a welcome screen, click Continue to proceed to the list of outbound change sets.
  4. Click New.

  5. In the Name field, enter the name of the new change set, such as ”AppointmentTrigger”.

  6. Click Save.


Add change set components
  1. In the Change Set Components section, click Add.

  2. In the Component type menu, select Apex Trigger.

  3. In the list below, select AppSchedEventTrigger.
  4. Click Add To Change Set.

  5. In the Change Set Components section, again, click Add.

  6. In the Component type menu, select Apex Class.

  7. In the list below, select the AppSchedEventTriggerTest class.
  8. Click Add To Change Set.


Upload the change set

After adding components to the change set, you will automatically return to the Change Set Details page.

  1. In the Change Set Detail section, click Upload.

  2. Select the organization where you want to upload the change set and click Upload.


Add Inbound Change Set

Important

Perform this step in your Production environment.

  1. Open the Salesforce Setup Menu.
  2. In the Quick Find box, enter Inbound Change Sets.
  3. Click Inbound Change Sets in the search results.
  4. In the change sets list, click on the change set that you created earlier.
  5. Click Validate.

  6. Select Run specified tests.

  7. In the text field, enter the name of the added Apex Class: AppSchedEventTriggerTest.
  8. Click Validate.
  9. Click Deploy.

  10. Select Run specified tests.

  11. In the text field, enter the name of the added Apex Class: AppSchedEventTriggerTest.
  12. Click Deploy.

Important

Once you have completed these steps, notify our support team so they can proceed with the required configuration on their end.


Troubleshooting

Error: Dependent classes need recompilation

You may encounter the following error during the installation of the RG Salesforce Scheduler Adapter managed package:

This package can't be installed.
There are problems that prevent this package from being installed.

• ApexClass: Dependent class is invalid and needs recompilation:
  Class RGLSA.SM007_postEvent

• ApexClass: Invalid type: AppointmentSchedulingEvent

• ApexClass: Dependent class is invalid and needs recompilation:
  Class SM007_postEventTest: Dependent class is invalid and needs recompilation:
  Class RGLSA.SM007_postEvent: Invalid type: AppointmentSchedulingEvent

• AppSchedEventLSASendHandlerTest: Dependent class is invalid and needs recompilation:
  Class RGLSA.SM007_postEvent: Invalid type: AppointmentSchedulingEvent

Cause

This error occurs when the Publish Appointments as Platform Events setting is not enabled in Salesforce Scheduler settings.

Resolution

To resolve this issue:

  1. Enable the Publish Appointments as Platform Events setting.
  2. Retry the package installation.

If the issue persists, please contact our support team for further assistance.


Error: Entity is locked

When configuring the instant creation of calendar items in the email server calendar, you may encounter the following error:

ENTITY_IS_LOCKED

Can not create Apex Class on an active organization.

Cause

This error appears when you use a production environment instead of a sandbox to perform one of the following configuration steps:

Resolution

Perform these configuration steps in a Sandbox environment. For information on how to create a sandbox, refer to Create a Sandbox.

If the issue persists, please contact our support team for further assistance.


See also