Integrating Salesforce

Increase your teams' efficiency, productivity and response to opportunities by integrating your Salesforce organisation into your CINNOX service. Manage all of your customer information & interactions on a single platform.

Sync and link your contacts, automatically log enquiries as cases and calls as tasks between Salesforce and CINNOX efficiently and manage the conversations and engagements in your CINNOX account without switching between applications.

Prerequisites

๐Ÿ“˜

Your CINNOX plan must be Business or above.

Your Salesforce organisation must be an Enterprise, Unlimited, Developer, or an edition with API access.

How do I know what Edition of Salesforce I have?

Identify which Edition you are on:

  • From Salesforce Classic and Lightning Experience:
  • Navigate to Setup. See Explore the Salesforce Setup Menu for more details.
  • In the 'Quick Find' search box type, Company
  • Click Company Information
  • Your Salesforce Edition is listed in the "Organization Edition" field.

Note: Other key org details such as "Salesforce.com Organization ID" and "Instance" will also be listed in the right-hand column of the Company Information page.

You may refer to this link to find out more.

ย 


Overview

What is Salesforce Sandbox?

A sandbox is a copy of your production environment where any changes will not affect your actual data and users.
It's commonly used for integration testing between Salesforce and the third party application.

What is Salesforce Production?

The Production is a live environment where any changes will affect your actual data and users.

When integrating the Production environment to the third party, Salesforce requires to deploy the configurations made in Sandbox (such as Apex classes and triggers) rather than to touch the Production directly.

For each Instance (Sandbox and Production), you will need to create new to the following in Salesforce:

  • New Remote Site: Salesforce allows you and your organisation to access external website resources by registering the resource URL.

  • New Connected App: It's a framework that enables an external application to integrate with Salesforce and grant access to its data with policies defining access restrictions.

  • New Apex Class: It is used to implement the actions associated with an object in Salesforce. It allows Salesforce to call operations of external web services through Apex class.

  • New Apex Trigger: It enables you to perform custom actions before or after changes to Salesforce records (insert, update or delete a record such as your contacts).

And, you will need to provide the following information.

๐Ÿšง

Please use your System Admin account when integrating your Salesforce to your CINNOX service.

The created Apex Class and Apex Trigger in Sandbox will be required to deploy in Production following the steps provided by Salesforce.

ย 

When the integration is successful, you and your staff can log in to your Salesforce user account, and the following features will be available:

Salesforce Integration Features

Feature

Description

Salesforce Contact Information displays in CINNOX

When a customer enquiry is matched with Salesforce Contact information, it will display in CINNOX as the Enquiry Contact Profile.

Synchronous Contacts

Synchronise your Salesforce contacts in CINNOX and vice versa to view all your contacts on a single platform.

Contact fields mapping between CINNOX & Salesforce allows for automatic syncing of data between these two applications.

Each staff will need to log in to their Salesforce account to sync their Salesforce contacts to CINNOX.

Link Contacts

One Salesforce contact can link to one CINNOX external contact.
One CINNOX external contact can link up to ten (10) Salesforce contacts.

Create Contact

Create a new contact in CINNOX, and it will be saved in Salesforce, too.

Search Contact

Search and view Salesforce contact in CINNOX.

Update Contact

Update and save Salesforce contact in CINNOX.

Automate CINNOX Enquiry to Salesforce Case

Your Contact's Enquiry will automatically be saved as a Contact's Case in Salesforce with information and chat history.

Automate CINNOX Call to Salesforce Task

Your Call inside the Enquiry is saved as a Task in Salesforce. The call log is posted in the Task Details.

SMS Campaign

Send SMS Campaign to Salesforce Contacts.

ย 

Integrating CINNOX and Salesforce

Sandbox Environment

  • You will need to create a sandbox org in your Salesforce.
  • Log in to the created Salesforce Sandbox Org using your System Admin account

Afterwards, please proceed with the following steps:

  • Log in to your CINNOX Dashboard using your staff admin account
  • Navigate to Administration > Service Integration
  • Click Edit.
  • Select Salesforce Sandbox for the integration instance.
  • Click Next
Selecting Salesforce SandboxSelecting Salesforce Sandbox

Selecting Salesforce Sandbox

Create New Remote Site

  • Log in to your Salesforce Sandbox Org using your System Admin account.
  • Navigate to Setup > Security > Remote Site Settings.
  • Click New Remote Site.
  • Copy the Remote Site Name and URL from CINNOX to Salesforce Remote Site Name and Remote Site URL.
  • Click Save.
Sandbox - Create New Remote SiteSandbox - Create New Remote Site

Sandbox - Create New Remote Site

ย 

Create New Connected App

  • Log in to your Salesforce Sandbox Org using your System Admin account.

  • Navigate to Setup > Apps > App Manager and click New Connected App.

  • Fill in all required fields in the form and tick the Enable OAuth Settings checkbox.

  • Copy the Callback URLfrom CINNOX to Salesforce Callback URL

  • Under the Selected OAuth Scopes , select and click Add for the following:

    • Manage user data via APIs (api)
    • Access the identity URL service (id, profile, email, address, phone)'
    • Perform requests at any time (refresh_token, offline_access)
  • Click Save.

Sandbox - Create New Connected AppSandbox - Create New Connected App

Sandbox - Create New Connected App

A page will appear with a note Changes can take up to 10 minutes to take effect. Deleting a parent org also deletes all connected apps with OAuth settings enabled.

  • Click Continue
New Connected App NoticeNew Connected App Notice

New Connected App Notice

ย 

Create New Apex Class

  • Log in to your Salesforce Sandbox Org using your System Admin account.
  • Navigate to Setup > Custom Code > Apex Classes and click New.
  • Copy the Webhook Class code from CINNOX and paste it in the Salesforce Apex Class Editor.
  • Click Save.
Sandbox - Create New Apex ClassSandbox - Create New Apex Class

Sandbox - Create New Apex Class

ย 

Create New Apex Trigger

  • Log in to your Salesforce Sandbox Org using your System Admin account.
  • Navigate to Setup > Custom Code > Apex Triggers and click Developer Console.
  • On the pop-up window, click File, select New then select Apex Trigger.
  • On the small window, enter a name, e.g., 'Triggercode1', select Contact for the sObject field and click Submit.
Sandbox - Create New Apex Trigger Part 1Sandbox - Create New Apex Trigger Part 1

Sandbox - Create New Apex Trigger Part 1

  • Copy the Trigger code from CINNOX
  • Clear the default code in the Trigger Code Editor
  • Paste the code
  • Click File and select Save.
  • Close the Code Editor
  • Go back to the Apex Triggers and refresh the page, the newly created Trigger will appear.
Sandbox - Create New Apex Trigger Part 2Sandbox - Create New Apex Trigger Part 2

Sandbox - Create New Apex Trigger Part 2

ย 

  • Back in the CINNOX Dashboard, click Next
CINNOX Dashboard > Sandbox - SetupCINNOX Dashboard > Sandbox - Setup

CINNOX Dashboard > Sandbox - Setup

Consumer Key and Consumer Secret

To provide the Consumer Key:

  • Navigate to the Setup page > Apps > App Manager.
  • Find the Connected App recently created for CINNOX.
  • Click the arrow down icon and select View.
  • Click 'Copy' for the Consumer Key.
  • Paste it on the respective field in CINNOX.

To provide the Consumer Secret:

  • Click 'Click to reveal' and copy the value.
  • Paste it on the respective field in CINNOX
Sandbox - Consumer Key and SecretSandbox - Consumer Key and Secret

Sandbox - Consumer Key and Secret

ย 

Location

To find the Sandbox Location:

  • Log in to your Salesforce Production org using your System Admin account
  • Navigate to Setup> Environments > Sandboxes and locate the Sandbox account you use
  • Copy the Location value
  • Paste it on the respective field on the CINNOX side
Sandbox Location in the Production OrgSandbox Location in the Production Org

Sandbox Location in the Production Org

ย 

Domain Name

To find the Domain Name:

  • On your Salesforce Sandbox Org page, navigate to the URL.
  • Copy the domain name, e.g., https://abc.lightning.force.com.
  • Paste it on the respective field in CINNOX.
Sandbox Org DomainSandbox Org Domain

Sandbox Org Domain

  • Click Validate.
Validate Sandbox DetailsValidate Sandbox Details

Validate Sandbox Details

A pop-up window will appear asking you to log in to your Salesforce System Admin account to authorise CINNOX.

Validate the Sandbox IntegrationValidate the Sandbox Integration

Validate the Sandbox Integration

Note: If it is the first logging of your Salesforce account to a device and browser, Salesforce will require the verification code sent to your email.

And provide permissions to CINNOX to access the following:

  • Access the identity URL service

  • Manager user data via APIs

  • Perform requests at any time

  • Click Allow

Allow Permissions to CINNOXAllow Permissions to CINNOX

Allow Permissions to CINNOX

When you have completed the steps and successfully connected your Sandbox Org to your CINNOX service, the below page will appear.

By default, your Salesforce contacts will sync and appear in your CINNOX Contacts.

And you can toggle ON the Auto-sync External Contacts to Salesforce to sync and display your CINNOX external contacts in Salesforce.

  • Click Next to confirm the settings for the auto-sync settings.
  • Click Done to exit on the current page
Auto-sync External Contacts to Salesforce SettingsAuto-sync External Contacts to Salesforce Settings

Auto-sync External Contacts to Salesforce Settings

Sandbox Integration to CINNOX Successfully CompletedSandbox Integration to CINNOX Successfully Completed

Sandbox Integration to CINNOX Successfully Completed

ย 

Salesforce and CINNOX Contact Fields Mapping

The below table shows how we map each field between Salesforce and CINNOX that allows automatic syncing of records between these two applications.

Salesforce and CINNOX Contact Fields MappingSalesforce and CINNOX Contact Fields Mapping

Salesforce and CINNOX Contact Fields Mapping

ย 

Or you can click the My Account > Integration to be redirected to your Integration page under your My Account to log in to your Salesforce account and sync your contacts.

Salesforce Login in CINNOXSalesforce Login in CINNOX

Salesforce Login in CINNOX

Refer to Salesforce Contacts and Cases in CINNOX section of this Guide for details on logging in to your Salesforce and the features available in more information.

๐Ÿšง

When you disconnect the sandbox integration, the changes made to Salesforce Contacts and external contacts will be no longer available in your CINNOX service.

The sandbox is used to test the integration and create Apex Classes and Trigger to deploy in the Production.

ย 

Disconnecting Sandbox and CINNOX

To disconnect the integration of Salesforce Sandbox and CINNOX.

  • Log in to the CINNOX Dashboard using the staff admin account
  • Navigate to Administration > Service Integration
  • Click Disconnect
  • A pop-up window will display to confirm the disconnection.
  • Click Disconnect
Disconnect Sandbox and CINNOXDisconnect Sandbox and CINNOX

Disconnect Sandbox and CINNOX

ย 


Production Instance

  • Log in to the created Salesforce Production Org using your System Admin account

Afterwards, please proceed with the following steps:

  • Log in to your CINNOX Dashboard using your staff admin account
  • Navigate to Administration > Service Integration
  • Disconnect the Sandbox Integration
  • Click Edit.
  • Select Salesforce Production for the integration instance.
  • Click Next
Selecting Salesforce ProductionSelecting Salesforce Production

Selecting Salesforce Production

๐Ÿ“˜

The creation of New Remote Site and New Connected App steps are similar to the steps of Sandbox integration. The only difference is the environment.

Create New Remote Site

  • Log in to your Salesforce Production Org using your System Admin account.
  • Navigate to Setup > Security > Remote Site Settings.
  • Click New Remote Site.
  • Copy the Remote Site Name and URL from CINNOX to Salesforce Remote Site Name and Remote Site URL.
  • Click Save.
Production - Create New Remote SiteProduction - Create New Remote Site

Production - Create New Remote Site

ย 

Create New Connected App

  • Log in to your Salesforce Production Org using your System Admin account.

  • Navigate to Setup > Apps > App Manager and click New Connected App.

  • Fill in all required fields in the form and tick the Enable OAuth Settings checkbox.

  • Copy the Callback URL from CINNOX to Salesforce Callback URL

  • Under the Selected OAuth Scopes , select and click Add for the following:

    • Manage user data via APIs (api)
    • Access the identity URL service (id, profile, email, address, phone)
    • Perform requests at any time (refresh_token, offline_access)
  • Click Save.

Production - Create New Connected AppProduction - Create New Connected App

Production - Create New Connected App

  • A page will appear with a note Changes can take up to 10 minutes to take effect. Deleting a parent org also deletes all connected apps with OAuth settings enabled.

  • Click Continue

ย 

Deploying Sandbox Apex Class and Triggers to Production

You will need to create test classes and have a pass rate greater than 75% code coverage to deploy classes in the Production.

For more details, please refer to Salesforce - Instructions to test Apex code.

I. Creating Test Classes

Here are the sample test classes that you can add to your Sandbox Org.

  • Log in to your Salesforce Sandbox environment using your System Admin account
  • Navigate to Setup page > Custom Code > Apex Classes
Created Apex Class (Webhook) in SandboxCreated Apex Class (Webhook) in Sandbox

Created Apex Class (Webhook) in Sandbox

ย 

  • Click New to create a new apex
  • Copy and paste the code below
  • Click Save
  • A new Apex Class is created
global class WebhookMockImpl implements HttpCalloutMock {
    public static HttpResponse response;
    global HTTPResponse respond(HTTPRequest req) {
        response = new HttpResponse();
        response.setStatusCode(200);
        return response;
    }
    global static void callout(String url, String content) {
        
    }
}

ย 

  • Go back to Apex Classes main page
  • Click New to create a new apex
  • Copy and paste the code below
  • Click Save
  • A new Apex Class is created
@isTest
public class TestContactTrigger {
    @isTest static void TestTrigger() {
        // Test data setup
        // Create an account with an opportunity, and then try to delete it
        Account acct = new Account(Name='Test Account2');
        insert acct;
        Contact newContact = new Contact(LastName='TestContact3', AccountId=acct.id);
        //insert newContact;
        
        

        // Perform test
        Test.startTest();
        Test.setMock(HttpCalloutMock.class, new WebhookMockImpl());
        Database.SaveResult result = Database.insert(newContact, false);
        Test.stopTest();
        // Verify 
    System.debug(result.getErrors());        
        System.assert(result.isSuccess());
    }
}

ย 

  • Go back to Apex Classes main page
  • Click New to create a new apex
  • Copy and paste the code below
  • Click Save
  • A new Apex Class is created
@isTest
public class TestWebhook {
    @isTest static void TestJsonContent() {
        System.TriggerOperation op = TriggerOperation.AFTER_INSERT;
        List<Account> contacts = new List<Account>();

        String result = Webhook.jsonContent(op, contacts, contacts);
        System.assert(result.length()>0);
    }
}

ย 

๐Ÿ“˜

A total of four (4) Apex Classes should be created in your Sandbox Org.

Created Apex Classes (Webhook + test classes) in SandboxCreated Apex Classes (Webhook + test classes) in Sandbox

Created Apex Classes (Webhook + test classes) in Sandbox

ย 

II. Deploying the Apex Classes

  • Log in to your Salesforce Production Org using your System Admin account
  • Navigate to Environments > Deploy > Deployment Settings
  • Check the Sandbox Org to which your Apex Classes were located.

When the Upload Authorization Direction is not a green arrow pointing to Production from Sandbox. E.g., it displays a disconnected red line (please refer to the below image).

  • Click Edit near the Sandbox Name
Deployment Settings - Upload Authorization Direction StatusDeployment Settings - Upload Authorization Direction Status

Deployment Settings - Upload Authorization Direction Status

  • Tick the Allow Inbound Changes check
  • Click Save
Production Deployment - Allow Inbound ChangesProduction Deployment - Allow Inbound Changes

Production Deployment - Allow Inbound Changes

  • Ensure that the Upload Authorization Direction green arrow points to Production from Sandbox. To successfully upload the change sets from Sandbox to Production.
Production Deployment SettingsProduction Deployment Settings

Production Deployment Settings

ย 

Next,

  • Log in to your Salesforce Sandbox Org using your System Admin account
  • Navigate to Environments > Change Sets > Outbound Change Sets
  • Read through the details of the Understanding Deployments and click Continue
  • In the Outbound Change Sets page, click New
Sandbox Outbound Change SetsSandbox Outbound Change Sets

Sandbox Outbound Change Sets

  • Name your New Change Set. It can be any name.
  • Click Save
Sandbox Outbound Create New Change SetSandbox Outbound Create New Change Set

Sandbox Outbound Create New Change Set

  • In the created Change Set, navigate to Change Set Components
  • Click Add
Sandbox Outbound Change Set ComponentsSandbox Outbound Change Set Components

Sandbox Outbound Change Set Components

  • In the Component Type dropdown, select Apex Class
  • Tick all the checkboxes of the created four (4) Apex Classes
  • Click Add to Change Set
Sandbox Outbound Change Set Components - Apex ClassesSandbox Outbound Change Set Components - Apex Classes

Sandbox Outbound Change Set Components - Apex Classes

  • In the created Outbound Change Set, navigate again to Change Set Components
  • Click Add
  • In the Component Type dropdown, select Apex Trigger
  • Tick the checkbox of the created Apex Trigger
  • Click Add to Change Set
Sandbox Outbound Change Set Components - Apex TriggerSandbox Outbound Change Set Components - Apex Trigger

Sandbox Outbound Change Set Components - Apex Trigger

  • Your Outbound Change Sets must have five (5) items from your Apex Classes and Apex Trigger.
Sandbox Outbound Change Set Components - Apex Classes & TriggerSandbox Outbound Change Set Components - Apex Classes & Trigger

Sandbox Outbound Change Set Components - Apex Classes & Trigger

  • Click Upload
Sandbox Outbound Change Set UploadSandbox Outbound Change Set Upload

Sandbox Outbound Change Set Upload

  • Tick the Production radio button in the Upload Details - Target Organization
  • Click Upload
Sandbox Outbound Change Set UploadSandbox Outbound Change Set Upload

Sandbox Outbound Change Set Upload

  • The Outbound Change Sets successful upload notice will appear on the page.
Sandbox Outbound Change Set Upload StatusSandbox Outbound Change Set Upload Status

Sandbox Outbound Change Set Upload Status

  • Also, an email will be received when the upload is completed successfully.
Email Received - Successful Upload of Change SetsEmail Received - Successful Upload of Change Sets

Email Received - Successful Upload of Change Sets

ย 

Then,

  • Log in to your Salesforce Production Org using your System Admin account
  • Navigate to Setup page > Environments > Change Sets > Inbound Change Sets
  • Find the Change Set uploaded from the Sandbox Org and click Deploy
Production Inbound Change Set DeploymentProduction Inbound Change Set Deployment

Production Inbound Change Set Deployment

  • Keep the Test Option to Default, click Deploy.
Production Inbound Change Set DeploymentProduction Inbound Change Set Deployment

Production Inbound Change Set Deployment

  • A warning pop-up window will appear about deploying the change sets. Click OK
Production Inbound Change Set DeploymentProduction Inbound Change Set Deployment

Production Inbound Change Set Deployment

  • Back in the Inbound Chang Set, a notice of Deployment Started - Track the progress on the Deployment Status page.
Production Inbound Change Set Deployment StatusProduction Inbound Change Set Deployment Status

Production Inbound Change Set Deployment Status

  • Also, an email will be received when the deployment is completed successfully.
  • Navigate to Setup > Custom Code > Apex Classes
  • Check that the four (4) Apex Classes from the deployed Change Sets are appearing in your Salesforce Production.
Production - Apex ClassesProduction - Apex Classes

Production - Apex Classes

  • Navigate to Setup > Custom Code > Apex Triggers
  • Check that the Apex Trigger from the deployed Change Sets are appearing in your Salesforce Production
Production - Apex TriggerProduction - Apex Trigger

Production - Apex Trigger

ย 

  • Back in the CINNOX Dashboard, click Next
CINNOX Dashboard > Production - SetupCINNOX Dashboard > Production - Setup

CINNOX Dashboard > Production - Setup

๐Ÿ“˜

Providing the Consumer Key, Consumer Secret, and Domain steps are similar to the steps of Sandbox integration. The only difference is the environment.

Consumer Key and Consumer Secret

To provide the Consumer Key:

  • Log in to your Salesforce Production using your System Admin account
  • Navigate to the Setup page > Apps > App Manager.
  • Find the Connected App recently created for CINNOX.
  • Click the arrow down icon and select View.
  • Click 'Copy' for the Consumer Key.
  • Paste it on the respective field in CINNOX.

To provide the Consumer Secret:

  • Click 'Click to reveal' and copy the value.
  • Paste it on the respective field in CINNOX
Production - Consumer Key and SecretProduction - Consumer Key and Secret

Production - Consumer Key and Secret

Domain Name

To find the Domain Name:

  • On your Salesforce Production Org page, navigate to the URL.
  • Copy the domain name, e.g., https://abc.lightning.force.com.
  • Paste it on the respective field in CINNOX.
Production Org DomainProduction Org Domain

Production Org Domain

  • Click Validate.
Validate Production DetailsValidate Production Details

Validate Production Details

A pop-up window will appear asking you to log in to your Salesforce System Admin account to authorise CINNOX.

Validate the Production IntegrationValidate the Production Integration

Validate the Production Integration

Note: If it is the first logging of your Salesforce account to a device and browser, Salesforce will require the verification code sent to your email.

And provide permissions to CINNOX to access the following:

  • Access the identity URL service

  • Manager user data via APIs

  • Perform requests at any time

  • Click Allow

Allow Permissions to CINNOXAllow Permissions to CINNOX

Allow Permissions to CINNOX

When you have completed the steps and successfully connected your Production Org to your CINNOX service, the below page will appear.

By default, your Salesforce contacts will sync and appear in your CINNOX Contacts.

And you can toggle ON the Auto-sync External Contacts to Salesforce to sync and display your CINNOX external contacts in Salesforce.

  • Click Next to confirm the settings for the auto-sync settings.
Auto-sync External Contacts to Salesforce SettingsAuto-sync External Contacts to Salesforce Settings

Auto-sync External Contacts to Salesforce Settings

  • Click Done to exit on the current page.
Production Integration to CINNOX Successfully CompletedProduction Integration to CINNOX Successfully Completed

Production Integration to CINNOX Successfully Completed

ย 

Staff Login to Salesforce in CINNOX

Refer to Salesforce Contacts and Cases in CINNOX section of this Guide for details on logging in to your Salesforce and the features available in more information.

Updated 14 days ago


Integrating Salesforce


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.