Overview

Open integrates natively with Salesforce to provide state-of-the-art AI agents for customer support and internal operations. Open works with both Salesforce Cases and Salesforce Chat, and can respond to cases, update them, and create new cases whenever needed.

Timeline

Setup Time

Complete integration in around 2 hours

Zero Downtime

No interruption to existing support operations

Integration Steps

1

Get your Salesforce instance URL

Identify the instance URL of your Salesforce org, e.g., https://na1.salesforce.com.

If you’re using a Salesforce Sandbox, please reach out to mo@open.cx to enable sandbox support.

2

Create a Connected App in Salesforce

In your Salesforce org:

  • Go to SetupAppsApp Manager
  • Click New Connected App
  • Fill in the basic information
    • Enable OAuth settings
    • Set the callback URL to: https://api.open.cx/backend/salesforce-case-management/oauth/callback
    • Select the scope: Full access (full)
    • Enable: Require Proof Key for Code Exchange (PKCE)
  • Click Save

It may take several minutes for the new app to become active.

3

Configure the Open.cx integration

  • Go to your Open dashboard → SettingsTicketingSalesforce
  • Input the Consumer Key and Consumer Secret from the Connected App
  • Click Save
  • Click Connect with Salesforce to complete the OAuth flow and link your account
4

Create a Named Credential in Salesforce

In Salesforce:

  • Go to SetupNamed Credentials
  • Click New Named Credential
  • Set the name to: OpenCX_Integration
  • Go to your Open.cx dashboard → SettingsTicketingSalesforce
  • Copy the Webhook URL provided there (it includes the required token)
  • Paste the copied URL into the URL field in Salesforce
  • Set Identity Type to: Anonymous
  • Leave Authentication Protocol as No Authentication
  • Do not check Generate Authorization Header
  • Save the Named Credential

This webhook URL includes a secure token, so there’s no need to configure OAuth or authentication headers. Treat the token as sensitive and do not share it publicly.

5

Create the Apex Class

In Salesforce:

  • Go to SetupApex Classes
  • Click New
  • Paste the following Apex class code:
public class OpenSalesforceCaseManagement {
    @future(callout=true)
    public static void sendCaseEvent(Id caseId, String eventType) {
        String endpointUrl = 'callout:OpenCX_Integration?caseId=' + EncodingUtil.urlEncode(caseId, 'UTF-8');

        HttpRequest req = new HttpRequest();
        req.setEndpoint(endpointUrl);
        req.setMethod('POST');
        req.setHeader('Content-Type', 'application/json');
        req.setBody(''); // No body needed since we're passing everything in the URL

        Http http = new Http();
        HttpResponse res = http.send(req);
        System.debug('Open.cx webhook response: ' + res.getBody());
    }
}
  • Save the class
6

Create the Apex Trigger

  • Go to SetupApex Triggers
  • Click New
  • For the Trigger Object, select Case
  • For the Trigger Event, choose After Insert
  • Paste the following trigger code:
trigger CaseTrigger on Case (after insert) {
  for (Case c : Trigger.new) {
    OpenSalesforceCaseManagement.sendCaseEvent(c.Id, 'CaseCreated');
  }
}
  • Save the trigger

The Salesforce integration might not be the easiest to work with, and we are happy to help you set it up. Please reach out to us at mo@open.cx if you have any questions.