QuickBooks Connector

Post Installation Steps

4.1 Remote Site Settings

To establish a secure connection between Salesforce and QuickBooks, add the following sites to the remote site settings inside the client org:

  1. Intuit_Auth: https://oauth.platform.intuit.com

  2. Intuit_Prod_Environment: https://quickbooks.api.intuit.com

  3. Intuit_Sandbox_Environment: https://sandbox-quickbooks.api.intuit.com

  4. QB_AuthOrg: https://cloudmaveninc.my.salesforce-sites.com

These settings enable secure API communication between the systems, ensuring smooth data flow.

Steps to open Remote Site Settings -

  1. Click the ⚙️ Gear icon in the top-right corner.

  2. Select Setup.

  3. In the Quick Find box (left panel), type Remote Site Settings.

  4. Click Remote Site Settings from the results.

  5. Click New Remote Site (if you want to create one).

  6. Enter:

    • Remote Site Name

    • Remote Site URL

  7. Check Active

  8. Click Save


4.2 Salesforce Site Configuration

A Salesforce Site is required to securely expose specific Salesforce data and functionality through a custom web interface. It grants limited access to Site Guest Users, allowing them only to view or edit permitted data and complete actions such as authentication with Quickbooks and Receiving Webhook notifications.

4.2.1 Create a Salesforce Site or Configure an Existing One

To integrate QuickBooks with Salesforce, create a Salesforce site and configure it as follows:

Screenshot 2025-02-13 at 6.21.20 PM-20250213-125126.png
  • Active Site Home Page: QBAuthVFPage

  • Lightning Features for Guest Users: true

  • Enable Content Sniffing Protection: true

  • Enable Browser Cross Site Scripting Protection: true

  • Referrer URL Protection: true

  • Redirect to custom domain: true

  • Cache public Visualforce pages: true

  • Site Contact: The user which will be the record owner for the records created by Site Guest User.

  • Default Record Owner: The user which will be the record owner for the records created by Site Guest User.

  • Make sure that the site is Active.

Once the site is created, add cm_finance.QBAuthVFPage to the Site Visualforce Pages list.

Screenshot 2025-02-13 at 6.22.39 PM-20250213-125245.png

This configuration is essential to allow QuickBooks authentication and ensure smooth data processing.


4.3 Site Guest User Profile Configuration

Navigate to the Profile of the Site Guest User for the created site and provide access to the following:

4.3.1 Apex Classes Access

Grant Apex Class Access

  1. Inside the Guest User Profile, scroll to Enabled Apex Class Access.

  2. Click Edit.

  3. Move your required Apex Class from Available Apex ClassesEnabled Apex Classes.

  4. Click Save

To allow data processing and synchronization, grant access to the following Apex classes:

  • cm_finance.QBAuthController

  • cm_finance.Webhook_QBChangeHandler

  • cm_finance.BatchQBSFAccountWebhook

  • cm_finance.BatchQBSFCustomerWebhook

  • cm_finance.BatchQBSFInvoiceWebhook

  • cm_finance.BatchQBSFProductWebhook

  • cm_finance.BatchQBSFPaymentWebhook

  • cm_finance.BatchQBSFVendorWebhook

  • cm_finance.CMQBConnectorUtility

  • cm_finance.BatchQBSFSalesReceiptWebhook

  • cm_finance.BatchQBSFPaymentMethodWebhook


4.3.2 Object Settings Access

Provide the necessary access to QuickBooks-related custom objects:

Step: Open Object Settings

  1. Inside the Guest User Profile

  2. Scroll to Object Settings

  3. Click Object Settings

  4. Select the Object Name (Select one by one for below list)

  • cm_finance__Custom_Field_Mapping__c

  • cm_finance__Quickbooks_Company__c

  • cm_finance__Quickbooks_Account__c

  • cm_finance__Quickbooks_Customer__c

  • cm_finance__Quickbooks_Invoice_Item__c

  • cm_finance__Quickbooks_Invoice__c

  • cm_finance__Quickbooks_Product__c

  • cm_finance__Quickbooks_Vendor__c

  • cm_finance__Quickbooks_Journal_Entry__c

  • cm_finance__Quickbooks_Journal_Entry_Item__c

  • cm_finance__Payment_Transaction__c

  • cm_finance__Payment_Method__c

  • cm_finance__Payment_Gateway__c

  • cm_finance__Quickbooks_Sales_Receipt__c

  • cm_finance__Quickbooks_Sales_Receipt_Item__c

Step: Grant Object Permissions

  1. Click Edit

  2. Enable Object permissions:

    • Read

    • Create

    • View All Fields

  3. Enable Field permissions:

    • Read Access All

    • Edit Access All

  4. Click Save

image-20260716-201840.png


4.3.3 Visualforce Page Access

Ensure that the guest user has access to the Visualforce page handling authentication:

Step: Grant Visualforce Page Access

  1. Scroll to Enabled Visualforce Page Access

  2. Click Edit

  3. Move the required Visualforce Page from Available Visualforce PagesEnabled Visualforce Pages

  4. Click Save

  • cm_finance.QBAuthVFPage

This configuration is necessary to allow external authentication and seamless QuickBooks integration.

4.3.4 Package License Access

Ensure that Site Guest User has License assigned for “CM Finance” application.

Follow these steps:

  1. Open the Site Guest User record.

  2. Scroll down to the Managed Packages section.

  3. Click Assign Licenses.

  4. Assign the CM Finance license to the Site Guest User.

Screenshot 2025-10-23 at 10.44.22 PM.png

4.4 Populate the State URL and Client Id and Client Secret in Quickbooks Credentials

4.4.1 If the backend access is available

  • Navigate to setup.

  • Search Custom Settings and find “Quickbooks Credentials”.

  • Click Edit on Default Credentials.

  • Populate the state URL as follows:
    {enter the site domain} + '/' + {site path} + '/cm_finance__QBAuthVFPage'

Example of stateURL

https://cm-sfqbconnector-dev-ed.develop.my.salesforce-sites.com/quickbooks/cm_finance__QBAuthVFPage
  • Get the Client Id and Client Secret from Cloud Maven, Inc team and populate them in respective fields.

4.4.2 Run the Following Code Snippet in Developer Console (if backend access is not available)

Execute the following Apex code snippet to update QuickBooks credentials within Salesforce:

cm_finance.AdminServices.ServicesDataWrapper oWrapper = new cm_finance.AdminServices.ServicesDataWrapper();
oWrapper.stateURL = {enter the site domain} + '/quickbooks/cm_finance__QBAuthVFPage';
oWrapper.clientId = '';    
oWrapper.clientSecret = ''; 
oWrapper.apiInstance = 'Production';
cm_finance.AdminServices.updateQBCredentials(oWrapper);

Get the Client Id and Client Secret from Cloud Maven, Inc team.

Example of stateURL: You can take reference to the below example as it follows the structure

{site domain} + '/' + {site path} + '/cm_finance__QBAuthVFPage'

https://cm-sfqbconnector-dev-ed.develop.my.salesforce-sites.com/quickbooks/cm_finance__QBAuthVFPage

This step ensures that QuickBooks authentication is correctly routed through the designated Salesforce site.


4.5. Internal Step: Add Site to Cloud Maven’s Subscriber Org

As an internal step, add the created Salesforce site to the remote site settings of Cloud Maven’s Subscriber org to enable communication between the environments.

Steps to open Remote Site Settings -

  1. Click the ⚙️ Gear icon in the top-right corner.

  2. Select Setup.

  3. In the Quick Find box (left panel), type Remote Site Settings.

  4. Click Remote Site Settings from the results.

  5. Click New Remote Site (if you want to create one).

  6. Enter:

    • Remote Site Name

    • Remote Site URL (URL of the remote site will be the same as the site created/used in step 4.2.1).

  7. Check Active

  8. Click Save


4.6 Configure Quickbooks Common Settings

Refer to this page for configuring Quickbooks common settings.


4.7 Assign Users to Permission Sets

Permission Set is assigned to users to grant additional permissions or functionality beyond their existing profile settings.

Steps to Open Permission Sets

  1. Click the ⚙️ Gear icon in the top-right corner.

  2. Select Setup.

  3. In the Quick Find box (left panel), type Permission Sets.

  4. Click Permission Sets from the results.

To ensure proper role-based access control, assign the following permission sets:

Screenshot 2025-02-13 at 6.31.31 PM-20250213-130136.png
  • Assign "CM Quickbooks Connector - System Admin" permission set to System Admin users.

  • Assign "CM Quickbooks Connector - Standard User" permission set to Standard Users based on business requirements.

These permission sets grant appropriate access levels to different users, ensuring smooth workflow execution.


4.8. Create QuickBooks Sync Button

'QuickBooks Sync' button allows users to push data from Salesforce to create corresponding records in QuickBooks, and also to pull updated data from QuickBooks back into Salesforce.

4.8.1. Steps to create a "QuickBooks Sync" button

  1. Navigate to Object Manager:

    • Go to "Setup" within your Salesforce instance.

    • Select "Object Manager."

    • Choose the source object whose data will be used for QuickBooks synchronization.

      • For example, if you intend to create QuickBooks Customers from Account records, select the "Account" object.

Note: The button's functionality is dependent on the presence of a valid Custom Field Mapping record. If no such record exists, the button may not perform as expected, or an error may occur. To use this button for QuickBooks Customer integration on an Account, ensure a corresponding mapping record exists. Refer to the screenshot below for an example.

image-20250324-122330.png
  1. Create a New Action:

    • Within the selected object's settings, click "Buttons, Links, and Actions."

    • Click the "New Action" button.

    • Configure the action with the following details:

      • Action Type: Select "Lightning Web Component."

      • Lightning Web Component: Enter cm_finance:cmQBConnectorMaster.

      • Label: Enter "QuickBooks Sync."

    • Click "Save."

image-20250324-115748.png
  1. Add the Button to the Page Layout:

    • Navigate back to the selected object's settings.

    • Click "Page Layouts."

    • Select the page layout where the button needs to be added.

    • Locate the "QuickBooks Sync" button within the "Mobile & Lightning Actions" or "Buttons" section.

    • Drag and drop the "QuickBooks Sync" button onto the desired location on the page layout.

    • Click "Save."

image-20250324-115951.png
  • Navigate to Object Manager:

    • Go to Setup within your Salesforce instance.

    • Select Object Manager.

    • Select the object where the QuickBooks-related records need to be displayed.

  • Open Page Layouts:

    • Within the selected object's settings, click Page Layouts.

    • Select the page layout that is assigned to the required users.

  • Add the QuickBooks Related List:

    • Scroll down to the Related Lists section.

    • Locate the appropriate QuickBooks-related list.

    • Drag and drop the related list into the Related Lists section of the page layout.

  • Configure the Related List:

    • Click the wrench icon on the related list to configure it.

    • Select the fields that should be displayed in the related list.

    • Configure the required columns, such as:

      • QuickBooks ID

      • Name/Reference

      • Sync Status

      • Sync Date

      • Amount, where applicable

      • Other relevant QuickBooks fields

    • Click OK.

  • Save the Page Layout:

    • Click Save to save the page layout changes.

  • Verify the Related List:

    • Open a record of the selected object.

    • Navigate to the Related tab.

    • Verify that the QuickBooks-related list is displayed.

Note: The related list will display records only when the corresponding QuickBooks relationship/lookup is populated on the record. Ensure that the required QuickBooks lookup or relationship fields are available on the object and that users have the necessary field and object permissions.

4.9 Create Map Custom Fields button

The 'Map Custom Fields' button enables users to establish connections between QuickBooks custom fields and Salesforce fields. Currently, this functionality is limited to Invoices and supports a maximum of three QuickBooks custom fields due to API restrictions.

4.9.1 Steps to Create Map Custom Fields button

  1. Navigate to Object Manager:

    • Go to "Setup" within your Salesforce instance.

    • Select "Object Manager."

    • Choose ‘Custom Field Mapping’.

  2. Create a New Action:

    • Within the object's settings, click "Buttons, Links, and Actions."

    • Click the "New Action" button.

    • Configure the action with the following details:

      • Action Type: Select "Lightning Web Component."

      • Lightning Web Component: Enter cm_finance:customFieldMapper.

      • Label: Enter "Map Custom Fields"

    • Click "Save."

image-20250324-142825.png
  1. Add the Button to the Page Layout:

    • Navigate back to the selected object's settings.

    • Click "Page Layouts."

    • Select the page layout where the button needs to be added.

    • Locate the "Map Custom Fields" button within the "Mobile & Lightning Actions" or "Buttons" section.

    • Drag and drop the "Map Custom Fields" button onto the desired location on the page layout.

    • Click "Save."

image-20250324-143742.png

The administrator must create the Custom Field Mappings for the appropriate parent object record, enabling users to use QuickBooks integration.


5. Configure Custom Field Mappings

Customize field mappings to align with business requirements and facilitate data synchronization between Salesforce and QuickBooks.

For detailed Mappings Information, Click Here.