Extole to Salesforce CRM

Learn how to send Extole real-time referrals, rewards, and customer engagement data to Salesforce through outbound webhooks.

Overview

Extole integrates with Salesforce Sales Cloud by sending real-time referral, reward, and customer engagement data through outbound webhooks. This server-to-server connection allows Salesforce to ingest and act on Extole events, ensuring accurate attribution, automated follow-ups, and streamlined customer lifecycle management.

This document outlines the ways data can flow from Extole into Salesforce.

Why Send Data to Salesforce?

Salesforce often serves as the system of record for customer and lead activity. Integrating Extole with Salesforce allows:

  • Referral and advocate activity to be tracked within existing CRM records.
  • Reward events to trigger internal workflows and updates.
  • Automated processes (e.g. marketing journeys, sales alerts) to run without manual intervention.
  • Full-cycle attribution between marketing campaigns and sales outcomes.

Salesforce OAuth Authentication

All Extole to Salesforce integrations make use of Salesforce OAuth 2.0 client credentials flows to acquire an access token, which is included in outbound webhook requests. Salesforce documentation on this method is available here.

OAuth Client Registration in Salesforce

Create a Connected App in Salesforce:

  • OAuth Scopes: Access and manage your data (API)
  • Enable Client Credentials (JWT or OAuth 2.0).
  • Note down the Client ID and Client Secret.

Before sending the webhook, Extole will exchange credentials for an access token.

OAuth Key Creation in Extole

To create the key within Extole, create a new Integration from within the Outbound Webhooks menu. Configure the key with the following options:

FieldExample Value
Key NameSFDC Client Credentials Key
Partner Key IDNot Required
AlgorithmOAUTH_SFDC
KeyThe Client Secret from the previous step
Authorization URLhttps://yourdomain.my.salesforce.com/services/oauth2/token
OAUTH Client IDThe Client ID from the previous step
ScopeNot Required
DescriptionA useful description of where this key will be used

Option 1: APEX Rest Endpoint for Extole to Salesforce

Extole uses outbound webhooks to POST JSON-formatted events to a configured Salesforce Apex REST endpoint.

Webhook Configuration Example

FieldExample Value
Webhook NameSalesforce Production – Share Links
Webhook TypeGeneric
HTTP MethodPOST
URLhttps://yourdomain.my.salesforce.com/services/apexrest/contacts/referralExtoleInfo
Request Buildercontext.createRequestBuilderWithDefaults().build();
AuthenticationSFDC Client Credentials Key

Event Payload Delivery

Event delivery from Extole to Salesforce using an Apex REST Endpoint is customizable. See example Extole webhook bodies below:

{
    "event_name":"reward_earned",
    "data":{
        "salesforce_id":"",
        "email":"",
        "value":"50"
    }
}
{
    "event_name":"referral_registered",
    "data":{
        "salesforce_id":"",
        "email":"",
        "advocate":""
    }
}

Salesforce Ingestion

A custom Apex REST endpoint receives and parses the JSON body, performing logic such as:

  • Creating or updating Contact, Lead, Referral, or custom objects
  • Validating payload format
  • Preventing duplicates using external IDs (e.g. referralId)

Salesforce Apex Endpoint example:

@RestResource(urlMapping='/contacts/referralExtoleInfo')
global with sharing class ReferralHandler {
  @HttpPost
  global static void doPost() {
    RestRequest req = RestContext.request;
    String payload = req.requestBody.toString();

    // Parse JSON and handle event logic
    // Map to Salesforce fields and insert/update records
  }
}

The Apex class should include error handling, JSON parsing, and record matching logic (using fields like salesforce_id for idem-potency). Salesforce provides documentation here.

Option 2: Utilizing sObject Endpoints

Extole uses outbound webhooks to POST JSON-formatted data to modify existing sObjects with data from the Extole system. Documentation on this method is available here.

Webhook Configuration Example

FieldExample Value
Webhook NameSalesforce Production – Contact Update
Webhook TypeGeneric
HTTP MethodPOST
URLhttps://yourdomain.my.salesforce.com/services/data/vXX.X/sobjects/sObject/{id}
Request Builderjavascript@runtime: function(){ var requestBuilder = context.createRequestBuilderWithDefaults(); var data = context.getData(); var body = context.globalServices.getJsonService().toJsonString(data['body']); return requestBuilder .addUrlTemplateParameter('id', data['salesforce_id']) .withBody(body) .build(); }();
AuthenticationSFDC Client Credentials Key

Event Payload Delivery

Example requests would look like:

{
    "AdvocateCode__c":"refer1"
}
{
    "RewardsEarned__c":3
}