Skip to content

Salesforce

Look up accounts and contacts, and raise Cases, in Salesforce.

Relevant to schools whose community or enrolment records live in Salesforce, and to school groups where a central team runs Salesforce as the system of record for relationships.

CategoryCRM
AuthenticationOAuth client credentials
Reacheshttps://yourorg.my.salesforce.com
Needs an agentNo
Demo modeYes

crm.account.lookup, crm.contact.lookup, crm.case.create, crm.case.get

  1. In Salesforce Setup, go to App Manager, New Connected App.
  2. Name it Plugboard, and give a contact email.
  3. Enable OAuth Settings.
    • Callback URL: any valid URL. The client credentials flow does not use it, but the form requires one.
    • Selected OAuth scopes: Manage user data via APIs (api).
  4. Under Flow Enablement, enable Client Credentials Flow.
  5. Save, and wait. Salesforce takes up to ten minutes to make a new connected app usable, and the failure in the meantime looks like wrong credentials.
  6. Open the app, then Manage Consumer Details to reveal the Consumer Key and Consumer Secret.
  7. Back in Manage, set the Run As user for the client credentials flow. This is which user the integration acts as, so it determines what it can see.

Step 7 matters. Use a dedicated integration user with a profile scoped to what the connector actually needs, not a system administrator.

Admin, Connectors, Salesforce, Configure.

FieldDefaultValue
baseUrlemptyYour instance URL, for example https://yourorg.my.salesforce.com
demoModefalseReturn fixture data

Use your My Domain instance URL, not login.salesforce.com.

FieldValue
clientIdThe Consumer Key
clientSecretThe Consumer Secret

Save and test.

OperationUse
Account lookupFind an organisation record
Contact lookupFind a person
Case createRaise a Case from work done in Plugboard
Case getRead a Case back

Salesforce orgs are usually customised heavily, and a connector that creates Cases in a customised org will meet required fields and validation rules that nobody remembered.

Point this at a sandbox first. The instance URL for a sandbox is different, so switching to production later is a configuration change here and nothing else.

SymptomCause
invalid_client immediately after creating the appSalesforce has not finished propagating it. Wait ten minutes
invalid_grantThe client credentials flow is not enabled, or no Run As user is set
Authenticates, cannot see recordsThe Run As user’s profile or sharing rules exclude them
Case creation fails on a required fieldAn org customisation. Check the Case page layout and validation rules
404 on the instanceThe base URL is the login URL rather than the My Domain instance URL
Fixture data appearsdemoMode is still on