Skip to main content

Connect Cademy to Salesforce

Sync Cademy contacts, organisations, course dates and registrations to Salesforce: set up fields and the app, then fix records that fail in Sync Activity.

Written by Artur Binzaru
Cademy Salesforce app details showing an Enterprise plan, Beta label and Install button.

This guide is for course providers who want Cademy to send contacts, organisations, course dates and registrations to Salesforce. It covers the setup in order, then how to check and fix records that did not sync.

​

Each group of records you can sync, such as Contacts, is a module. You can start with Contacts and add the others later. If a record did not reach Salesforce, go to Check Salesforce Sync Activity and Retry a Failed Record.

​


​

What You Need Before You Connect Salesforce

  • Salesforce switched on for your Cademy account. The app is shown as an Enterprise beta, but an Enterprise plan alone does not switch it on. If you cannot see or install it, ask Cademy Support.

  • The System Admin role in Cademy. Only System Admins see Apps; if it is hidden from your menu, look under More.

  • A Salesforce administrator who can create an External Client App, users, permission sets, fields and custom objects.

  • A Salesforce user for the integration to run as, ideally a separate integration user, and your Salesforce My Domain URL.

Existing Records Are Not Sent to Salesforce When You Connect

Cademy sends a record when it is created or changed after you connect and switch on its module, not before. An existing contact is sent the next time it changes, or when a record being synced needs it, for example a new registration. There is no button to send all existing records. Do not make bulk changes to force a full sync: contact Cademy Support before you connect if you need historic data in Salesforce.

​

Will Cademy Create Duplicate Contacts or Accounts in Salesforce?

Cademy recognises the records it synced by its own Cademy ID fields. A Contact or Account already in Salesforce has an empty Cademy ID field, so Cademy creates a new record. If Salesforce already holds many of the same people or organisations, contact Cademy Support before you switch on the sync.

​


​

How the Salesforce Sync Works (One-Way From Cademy)

The sync is one-way: changes made in Salesforce are not sent back to Cademy. Cademy never deletes a Salesforce record. Switching off a module or disconnecting stops future updates and leaves what was sent in place.

​

What Cademy Sends to Salesforce

Module

Salesforce object

Cademy ID field

At first

Contacts

Contact

Cademy_Contact_ID__c

On

Organisations

Account

Cademy_Organisation_ID__c

Off

Course Dates

Course_Date__c

Cademy_Course_Date_ID__c

Off

Registrations

Registration__c

Cademy_Registration_ID__c

Off

Course Date and Registration are custom objects you create in Step 4. The other modules start off so you can create their fields first.

​

How Cademy Matches Records in Salesforce (Cademy ID Fields)

Cademy writes its own ID into the Cademy ID field and uses it to find the same record later, so create these fields before you connect. If you connect more than one org, Cademy sends changes to every connection marked Ready; Default only marks your main one.

​


​

Step 1: Choose the Salesforce Integration User

Cademy uses Salesforce’s Client Credentials flow and always works as one Salesforce user: the execution user of an External Client App (Run As in a Connected App). Choose a user whose licence supports API access. It needs API Enabled and, from Step 5, access to the objects and fields, but not Delete.

  1. In Salesforce Setup, enter Permission Sets in Quick Find, open Permission Sets and select New. Enter a label such as Cademy Integration and save.

  2. Open System Permissions, select Edit, switch on API Enabled and save.

  3. Open Manage Assignments, select Add Assignments, choose the integration user and select Assign. Integration users that are not listed are assigned through the PermissionSetAssignment API (see the help links below).

Note the user’s Salesforce username: it is not always their email.

​

Step 2: Find Your Salesforce My Domain URL

In Setup, enter My Domain in Quick Find and copy the full Current My Domain URL, such as https://yourcompany.my.salesforce.com (or .sandbox.my.salesforce.com, .develop.my.salesforce.com). Do not use a .lightning.force.com address or add /services/oauth2/token.

​

Step 3: Create the Cademy ID Fields in Salesforce

Create these fields before you connect, because Cademy checks for them when it creates the starting mappings.

​

Create the Cademy Contact ID Field

  1. In Setup, open Object Manager > Contact > Fields & Relationships, select New, choose Text and select Next.

  2. Enter Field Label: Cademy Contact ID, Length: 255 and Field Name: Cademy_Contact_ID. Switch on Unique and External ID.

  3. Make the field visible to the integration user and select Save. Check that the API name is Cademy_Contact_ID__c.

Create the Cademy Organisation ID Field on Accounts

If you will ever sync Organisations, create the same field on Account: Text, Cademy Organisation ID, length 255, Unique and External ID, API name Cademy_Organisation_ID__c. Create it before you connect, even if Organisations stays off.

​


​

Step 4: Create the Course Date and Registration Objects (Optional)

Skip this if you only sync Contacts and Organisations. Create Course Date first, because each Registration links to one.

​

Create the Course Date Object in Salesforce

In Object Manager, select Create > Custom Object. Enter Label: Course Date, Plural Label: Course Dates, Object Name: Course_Date and Record Name: Course Date Name (Text). Switch on Allow Reports and save. The API name must be Course_Date__c.

​

Add the Course Date Fields

Create each field below, give the integration user access and check the API name.

Field

Type and settings

API name

Cademy Course Date ID

Text, length 255, Unique, External ID

Cademy_Course_Date_ID__c

Start

Date/Time

Start__c

End

Date/Time

End__c

Status

Picklist, one per line: Scheduled, Cancelled, Completed

Status__c

Cademy sends Scheduled for an active date and Cancelled when a synced date is deleted.

​

Add a Course Date Tab in Salesforce (Optional)

In Setup, open Tabs, select New under Custom Object Tabs, choose Course Date and a style, then save.

​

Create the Registration Object in Salesforce

Create another custom object: Label: Registration, Plural Label: Registrations, Object Name: Registration, Record Name: Registration Name (Text), Allow Reports on. The API name must be Registration__c.

​

Add the Registration Fields

For a lookup, choose Lookup Relationship and the object under Related To.

Field

Type and settings

API name

Cademy Registration ID

Text, length 255, Unique, External ID

Cademy_Registration_ID__c

Contact

Lookup to Contact

Contact__c

Course Date

Lookup to Course Date

Course_Date__c

Status

Picklist: Registered, Cancelled, Moved

Status__c

Attendance Status

Picklist: Attended, Absent

Attendance_Status__c

Let the integration user edit both lookups.

​


​

Step 5: Finish the Integration User’s Salesforce Permissions

In the integration user’s permission set, give Read, Create and Edit on the object of each module you will use (Contact, Account, Course Date, Registration), and read and edit access to:

  • the fields in your mappings and each module’s Cademy ID field

  • Course_Date__c.Name, Start__c, End__c, Status__c

  • Registration__c.Name, Contact__c, Course_Date__c, Status__c, Attendance_Status__c

If sharing rules limit which records the user can see, give it access to the records Cademy updates.

​


​

Step 6: Create an External Client App in Salesforce

The app lets Cademy call the Salesforce API without a password. Treat its Consumer Secret like a password. Salesforce recommends External Client Apps and, since Spring ’26, restricts new Connected Apps.

​

Create the External Client App (Recommended)

  1. In Setup, open App Manager and select New External Client App. Enter a name such as Cademy Sync, a contact email and the distribution state Local.

  2. Switch on OAuth, enter the Callback URL https://login.salesforce.com/services/oauth2/callback (required by Salesforce, not used by Cademy) and add the scope Manage user data via APIs (api).

  3. Switch on Client Credentials Flow and save.

  4. In External Client Apps Manager, open the app’s actions menu and select Edit Policies. Select Enable Client Credentials Flow, enter the integration user’s exact Salesforce username as the execution user, and save.

Copy the Salesforce Consumer Key and Consumer Secret

In the app’s actions menu, select Edit Settings, expand OAuth Settings and select Consumer Key and Secret. Complete Salesforce’s identity check and copy both values into a password manager. Do not send them to Cademy Support.

​

Use a Salesforce Connected App Instead (Older Route)

Use one only if you already have it. Set it up with OAuth, the same Callback URL and scope, and Client Credentials Flow on, and choose the integration user in Run As. OAuth changes can take a few minutes to apply, so if the test fails straight after setup, wait and try again.

​


​

Step 7: Install the Salesforce App in Cademy

Sign in to the Cademy admin dashboard as a System Admin, go to Apps, select Salesforce, then Install. Installing sends no data.

​

Cademy Apps page with the Salesforce Beta, Enterprise app listing highlighted.

​

Step 8: Connect Your Salesforce Org to Cademy

  1. Select Connect Your First Salesforce Org, or + Add Connection if an org is already connected.

  2. Enter a Connection Name such as Production Salesforce, then paste the full My Domain URL, the Consumer Key and the Consumer Secret. Leave API Version blank unless Cademy Support gives you one (the default is 67.0).

  3. Select Test & Continue. Check that Connected as shows the integration user and Organization ID is the right org.

  4. Select Save Connection, then Finish.

The Add Salesforce connection window on its Credentials step, over the Salesforce connections page: Connection Name with Production Salesforce, My Domain URL filled in, Consumer Key and Consumer Secret empty, API Version empty under Advanced, and the buttons Back and Test & Continue; Test & Continue is outlined.

​

The Add Salesforce connection window on its Verify step: Salesforce connection succeeded, Connected as with the integration user name, Organization ID, and the buttons Back and Save Connection; the Connected as and Organization ID lines and the Save Connection button are outlined.

Your first connection becomes the default. Saving creates the starting mappings but does not send existing records.

​


​

Step 9: Choose What to Sync to Salesforce (Modules)

Go to Apps > Salesforce and select the connection. The Mappings page has one card per module. Open each, check its settings and select Save after a change.

​

The Mappings tab of the Production Salesforce connection: Modules with the four cards Contacts (Enabled), Organisations, Course Dates and Registrations (Disabled), each with its number of fields mapped; the selected Mappings tab and the heading Modules are outlined.

​

Sync Cademy Contacts to Salesforce Contacts

On by default. Starting mappings: Email, First Name, Last Name, and Phone to Business Phone. If the contact belongs to an organisation and Organisations is on, Cademy syncs the Account first and links it. Deleting a contact in Cademy does not delete it in Salesforce.

​

Sync Organisations to Salesforce Accounts

Off by default. Starting mapping: Name to Account Name. Open Organisations, check that Map to Salesforce account shows Account, switch on Organisations Sync and select Save.

​

Sync Course Dates to Salesforce

Off by default; needs the Step 4 object. Starting mappings: Course Name with Date to Course Date Name, Starts at to Start, Ends at to End, Status to Status. Open Course Dates, check that Map to Salesforce course date shows Course Date (Course_Date__c), switch on Course Dates Sync and select Save.

​

The Course Dates module of the Production Salesforce connection: Course Dates Sync switched on, Map to Salesforce course date showing Course Date (Course_Date__c), Field Mappings with Add Mapping and the four starting mappings, and Save at the top; the Course Dates Sync switch and the Save button are outlined.

In a block (several sessions sold as one booking), each session syncs as its own Course Date.

​

Send Course Registrations (Bookings) to Salesforce

Off by default; needs the Step 4 object. Switch on and save Contacts and Course Dates first, then open Registrations, check that Map to Salesforce registration shows Registration (Registration__c), switch on Registrations Sync and select Save. Starting mappings: Registration Code (such as REG-123) to Registration Name, Status and Attendance Status; Cademy fills the Contact and Course Date lookups.

​

Status is Registered for a new booking and Cancelled for a cancelled one. A move is sent as Moved with the new Course Date, and the next update sets it back to Registered. Attendance Status stays empty until attendance is marked.

​


​

Step 10: Add or Change Salesforce Field Mappings (Optional)

  1. In the connection’s Mappings, open the module and select Add Mapping.

  2. Choose the Cademy Module, the Cademy Field (or Create new field… where offered) and the Salesforce field.

  3. If both are dropdowns with different values, use Map values. For a custom Cademy dropdown or radio field, Save changes there also changes that field’s choices in Cademy.

  4. Select Save at the top. To remove a mapping, use the remove button at the end of its row.

  • Map the same kind of value, such as a date to a date field, and each Salesforce field from one Cademy field only.

  • Do not map Cademy ID fields or relationship links; the integration manages them.

  • Changing a module’s Salesforce object clears its mappings, ID matching and links after a warning.

Step 11: Test the Salesforce Sync With Test Records

Create a test contact in Cademy with a recognisable name and email. After a short wait, find it in Salesforce, check that Cademy_Contact_ID__c has a value, and check that Sync Activity shows Synced. Test each other module the same way.

​


​

Check Salesforce Sync Activity and Retry a Failed Record

Go to Apps > Salesforce, select the connection, then Sync Activity. It shows up to 100 records, the most recently updated first. Each row is the latest result for one record, with the Salesforce record ID and the latest error. The filters are All Statuses (which also shows Not attempted rows), Synced, Failed and Needs reconnect.

​

The Sync Activity tab of the Production Salesforce connection: the All Statuses filter and ten rows with Status, Object, Last attempted and Last error, eight Synced and two Failed, each Failed row with its error and a Retry button; the selected Sync Activity tab and the Retry button of the first Failed row are outlined.

For a Failed row, read the full error, fix the cause in Cademy or Salesforce (see below), then select Retry. Only Failed rows have Retry. It sends that one record and, when their modules are on and they have not synced yet, a contact’s organisation or a registration’s contact and course date.

​


​

Fix Salesforce Sync Problems

Each Failed row in Sync Activity shows the reason for the failure. Errors returned by Salesforce include field names when Salesforce supplies them.

​

A Contact or Other Record Is Not Syncing to Salesforce

  1. Check that the record’s module is switched on and saved on the Mappings page.

  2. Check that the record was created or changed after you switched the module on. Older records are not sent until they change.

  3. Check that the connection shows Ready.

  4. Read the record’s row in Sync Activity and use the sections below.

Salesforce Sync Says Needs Reconnect

Salesforce refused the connection’s credentials the last time Cademy used them, for example after the Consumer Secret was changed or the execution user was deactivated. Fix this in Salesforce, then enter valid credentials with Edit Connection (see Replace or Rotate the Salesforce Consumer Secret).

​

Changes made while the connection needed reconnecting are not sent afterwards, and Needs reconnect rows have no Retry. Cademy tries each record again the next time it changes in Cademy, or when another synced record needs it.

​

Records Fail With an Access Error After the Connection Works

A successful test shows only that Salesforce gives Cademy a token. Check that the execution user has API Enabled, Read, Create and Edit on the object, edit access to each mapped and Cademy ID field, and sharing access to the record (Step 5). Then select Retry.

​

Salesforce Says an Object or Field Does Not Exist

Check the API names against Steps 3 and 4, including capitals and underscores, and that the integration user can access each field. If you created a Contact or Account ID field after connecting, contact Cademy Support before you switch that module on.

​

Salesforce Rejects a Record Because a Required Field Is Missing

Required fields and validation rules in your org apply to the integration user. Map a suitable Cademy value to the field (Step 10) and retry, or ask your Salesforce administrator about an exception for the integration user. If a Cademy contact has no last name, its row shows Failed with Salesforce’s error, such as Required fields are missing: [LastName]. Add a last name to the contact in Cademy, then select Retry.

​

A Dropdown (Picklist) Value Is Not Accepted by Salesforce

Open the mapping, select Map values, match each Cademy value to an allowed Salesforce value, save, then retry the record.

​

A Contact Did Not Link to Its Account, or a Registration to Its Contact or Course Date

Cademy syncs the linked record first. If it fails, the record is written without the link and the linked record’s own row shows the error. Check that its module is on and saved, its Cademy ID field is Unique and External ID, and the integration user can edit the Account field or lookup. A contact links only if it belongs to an organisation. Fix and retry the Failed related record, then check the link in Salesforce. If the contact or registration shows Synced but is still unlinked, it has no Retry button; contact Cademy Support with both records.

​

On-Demand and Block Registrations Show as Failed

A registration on an on-demand course, or for a whole block, has no single course date. It shows as Failed with a reason and is not synced. This is expected.

​

A Deleted Course Date Still Says Scheduled in Salesforce

To cancel a course date, you delete it (see Cancel or Delete a Course Date or Block). Cademy then sets its Salesforce Status to Cancelled. If it still says Scheduled, check that Course Dates still maps Status to Status__c. Without it, Cademy leaves the record as it is and Sync Activity says so.

​

Old Salesforce Records Did Not Change After a Mapping Change

This is expected. A mapping change applies the next time each record changes in Cademy, and removing a mapping leaves the old value in Salesforce.

​

What to Send Cademy Support About a Salesforce Sync Problem

Send the connection name, the Cademy record, the Salesforce object, the status and full error from Sync Activity, and when you last tried. Never send your Consumer Key or Consumer Secret.

​


​

Replace or Rotate the Salesforce Consumer Secret

  1. In Apps > Salesforce, open the connection’s action menu and select Edit Connection.

  2. Check the My Domain URL and enter the Consumer Key and Consumer Secret again (the saved secret is not shown).

  3. Select Test & Continue, check the username and Organization ID, then select Update Connection and Finish.

The Salesforce connections page with + Add Connection and two connections: Production Salesforce, Ready and Default, with its action menu open (Edit Connection, Set as Default greyed out, Disconnect), and Salesforce Sandbox, Disconnected; the action menu button and the whole open menu are outlined together.

Your mappings are kept. For a different org, use + Add Connection so each org has its own mappings and Sync Activity.

​

Disconnect a Salesforce Org From Cademy

Open the connection’s action menu, select Disconnect and confirm. Syncing stops and records already in Salesforce stay. To reconnect, use Edit Connection with valid credentials.

​


​

Salesforce Help Links for This Setup

​


​

Frequently Asked Questions

Why is the Salesforce app not showing in Cademy?
Salesforce is not switched on for your account, or you are not a System Admin. Ask a System Admin or Cademy Support.

​

Why can’t I create an External Client App?
Your Salesforce user needs permission, so ask a Salesforce administrator. If you need a Connected App instead, ask Salesforce Support for access.

​

Why does the connection say invalid client credentials or invalid_grant?
Wait a few minutes after changing the app. Then check that Client Credentials Flow is on, the execution user (Run As) is the user’s Salesforce username, the key and secret come from the same app with no extra spaces, and the My Domain URL is the same org. Select Test & Continue again.

​

What if I created a Cademy ID field after connecting?
Contact Cademy Support before you switch the module on. The Contact and Account ID fields are checked only when the connection is first saved.

Did this answer your question?