Authorization Type

Carbon uses OAuth 2.0 to connect to knowledge bases in Salesforce Knowledge.

Authorization Flow

Configuration

Syncing Salesforce Knowledge Articles

You can synchronize Salesforce Knowledge articles via our pre-built file selector UI in Carbon Connect or via the following steps:

Sync a User’s Salesforce Knowledge Account

  • Use the /integrations/items/sync endpoint to synchronize a user’s Salesforce Knowledge account.

List All Items from a User’s Salesforce Knowledge Account

  • Retrieve a list of all items from a user’s Salesforce Knowledge account by utilizing the /integrations/items/list endpoint.

Specify Specific Articles to Sync

  • Employ the /integrations/files/sync endpoint to specify and synchronize specific articles.

If you are utilizing our Carbon Connect component, be aware that all articles are automatically synchronized by default.

Custom OAuth Credentials

Custom OAuth credentials is only required for customers who enable white labeling.
You will be creating a Connected App in Salesforce, read more about them here.
  1. Click on the gear widget located next to your profile icon to access the “Setup” page.

  2. Navigate in left-hand menu from “App” > “App Manager”.

  3. Click on “New Connected App” to create your OAuth app.

  4. Fill in the following required information under “Basic Information”.

  5. Check the “Enable OAuth Settings” checkbox.

  6. Then add the following “Selected OAuth Scopes”:

  • Access the identity URL service (id, profile, email, address, phone)
  • Manage user data via APIs (api)
  • Perform requests at any time (refresh_token, offline_access)
  • Access unique user identifiers (openid)
  1. Enter https://api.carbon.ai/integrations/salesforce as the “Callback URL”. You can also opt to use a custom CNAME record pointing to https://api.carbon.ai. The domain path must still be /integrations/salesforce.

  2. After created the app, click “Manage Consumer Details” to generate a “Consumer Key” and “Consumer Secret”.

  3. Copy the “Consumer Key” and “Consumer Secret” value to your clipboard, save it somewhere safe, and share with us via Slack.

Functionality

Carbon syncs all Published articles under a single Salesforce knowledgebase. Any Draft article won’t be synced.

Synchronization

Syncs are triggered when end-users add or remove articles in Salesforce directly and then go through Carbon’s Salesforce OAuth flow. You can use the resync_file API endpoint to programmatically resync specific Salesforce files.

To sync Salesforce files on a 24-hour schedule (more frequent schedules available upon request), you can use the /update_users endpoint. This endpoint allows organizations to customize syncing settings according to their requirements, with the option to enable syncing for all data sources using the string ‘ALL’. It’s important to note that each request supports up to 100 customer IDs.

Here’s an example illustrating how to automatically enable syncing for updated Salesforce content for specified users:

{
    "customer_ids": ["team@carbon.ai", "sam@openai.com"],
    "auto_sync_enabled_sources": ["SALESFORCE"]
}