Salesforce Sales Cloud Integration Document

Written By Devin O'Neill ()

Updated at March 19th, 2025

Introduction

Sales Cloud is a component of the platform designed to improve the effectiveness of an organization's sales team, ultimately increasing sales. It stands out from other sales methods by providing both account information about customers and insights gathered from social platforms regarding products and customers. This comprehensive data helps assess the potential of sales leads and facilitates quicker closes on sales.

Login to SFSC

Create and Register Domain

Create Lightning Application 

To create a Lightning application for Salesforce, you need to set up and register your domain. Follow the steps below to create and register a domain:

  1. To begin, navigate to the Setup from the home page, as shown in the image below.
  2. Next, use the search bar to look for My Domain under Company Settings, as illustrated below.
  3. Enter your domain name in the designated field and click Check Availability. If your domain name is available, click Register Domain. After registering the domain, you will receive an email within approximately 10 to 15 minutes confirming that your domain is ready for testing. Finally, click Deploy.
If you do not receive an email, refresh this page after 5 to 10 minutes.
 
  1. To deploy the domain, first log in with your domain.
  • Click Deploy to Users.
  • From the home page, navigate to Setup and use the search bar to find App Manager, as illustrated below.
  • Click the New Lightning App as shown in the image below.
  • Enter the details for your new App and click Next as demonstrated below.
  • You can keep the default settings or modify them to suit your preferences before clicking Next.
  • Again, in the utility page, you can either keep the default settings or change them according to your needs, and then click Next.
  • Select the navigation items based on your preference and click Add button as shown below. After that, click Next.
  • Next, add the member profiles that will have access to your application as indicated below. Then, click Save & Finish.
  • To check the App you created, go to the App Manager from the homepage, as shown below.
  • Now your application will be listed. Click it to see more details.

Add Required Configuration Settings

  • Create a custom object and configure the necessary settings. To create a custom object, go to setup and search for Object Manager as shown below.
  • Click create Custom Object as shown in the image below.
  • Enter the required details and click Save as indicated below.
  • To add fields to a custom object, click Fields and Relationships as shown below.
  • Next, click New to create a new custom field.
  • Select the desired data type and then click Next as indicated below.
  • Enter the details according to your preferences and then click Next.
Click Next again if you would like to create another field.
 
  • The newly created field will be displayed in the Fields & Relationships table as shown below.

Custom Object Details

In the custom object, you can view the details of the two objects created and all the information you provided during their creation.

  1. Loyalty_Config_c
  2. AC_Exception_c

In the tables below, you can see the object details you entered during its creation:

Annex Cloud Salesforce
Object: AC_Exception_c
Field Label (Front End) API Name Type
Response Response_c Long Text Area(32768)
AC Exception Name Name Text(80)
Error Details Error_Details_c Long Text Area(32768)
Request Request_c  Long Text Area(32768)
Annex Cloud Salesforce
Object: Loyalty_Config_c
Field Label (Front End) API Name Type
Site Id siteId_c Text(20)
endpointurl endpointurl_c Text(40)
Access Token Access_Token_c Text(40)
Loyalty Config Setting Name Name Text(80)

Create Tab

  • In order to display the custom object, you need to create a tab for it.
  • To create a new tab,navigate to Setup and search for Tabs, then select Tabs from the options.
  • Click New next to Custom Object Tabs.
  • From the drop-down menu, select the object you want to create a tab for and choose a tab style. Clicking on the style will open a popup displaying various options. Select your preferred style and click Next.
  • Set the object visibility for the profiles according to your preferences, then click Next.
  • Choose the custom apps for which the new tab will be available. You can also review or change the visibility of tabs from the detail and edit pages of each custom app. Once done, click Save.
  • The newly created tab will now appear in the application.
  • To add configuration settings to the created tab, click New button. Configure the fields to your liking and click Save.

Steps to add Static resources to the Application

  • Navigate to Setup and search for Static Resources.
  • Click the New button.
  • Fill in the required details based on your preferences and attach a zip file that contains images, CSS, JavaScript files.
  • Finally, click Save.

Remote Site Settings

To whitelist a domain, you need to add it to the Remote Site Settings. Follow the steps below for configuring remote site settings:

  • Go to Setup and search for Remote Site Settings.
  • Click New Remote Site.
  • Fill in the required details according to your preferences and click Save.
  • Enter the Annex Cloud URL to access the remote site: https://s15.socialannex.net/api/3.0

Create a New Lightning Page

  • Open the developer console as shown in the following image.
  • Navigate to File > New > Lightning Component, as illustrated in the image provided.
  • Enter the details according to your preferences and select Lightning Page from the Component Configuration section, as shown below.
  • Create a component named loyaltyV3.cmp and enter the code provided by Annex Cloud in the designated file.
  • Include Loyaltyv3Controller.js in your system.
  • After this, the following page will open. Add the necessary HTML to your application.
  • To add JavaScript code, click Controller. This will open the corresponding file.

Apex Class

An Apex Class connects to the Annex Cloud APIs, allowing for the use of Apex programming. In order to create an apex class, follow these steps:

  • To create an apex class, navigate to File > New > Apex Class, as illustrated below.
  • Enter a name for your apex class and add the apex code.
  • Next, open the Lightning App Builder, as depicted in the following image and click New tab to continue.
  • Select Record Page and then click Next, as shown below.
  • Create a new Lightning page as demonstrated below.
  • Click the Next button.
  • Select the Header and Right Sidebar, then click Done, as shown in the following image.
  • The next step is to activate the saved page.
  • After that, you will be assigned an Org Default and which you need to close.
  • Finally, create the recommended apex class provided by Annex Cloud.
    • ACFileLogger.apxc
    • ACFileLogger_test.apxc
    • ACLoyaltyConfig.apxc
    • ACLoyaltyConfig_Test.apxc
    • ACLoyaltyJwtToken.apxc
    • ACLoyaltyJwtToken_Test.apxc
    • ACObjectUtilClass.apxc
    • ACObjectUtilClass_Test.apxc
    • ACQueryUtilClass.apxc
    • ACQueryUtilClass_Test.apxc
    • Loyaltyv3Controller.apxc
    • Loyaltyv3Controller_Test.apxc
    • ACMockHttpResponse.apxc

Steps to Create a Lead

To create leads in the application, follow these steps as illustrated in the image below:

  • Click New tab to add new leads.
  • Fill in the required fields in the next step and save the details as shown below.
  • Enroll in the Loyalty Program.

To enroll in the Loyalty Program, follow these steps as indicated in the image below:

  • Click Enroll Now.
  • Confirm your enrollment in the Loyalty Program by clicking the OK button as shown below.
  • To join the Loyalty Program, click Join Loyalty, as displayed in the image below.

In this document, the loyalty dashboard is displayed in the leads section. Annex Cloud can also present the dashboard in the Account section and the service console.