Swarmz
IntegrationsCRM, sales, and recruiting

Salesforce

Query Salesforce objects and read, create, update, or upsert CRM records

Connect Salesforce when a project needs live CRM records or must change Salesforce data. A shared connection uses one authorized Salesforce user for a project. A published app can instead ask each signed-in app user to authorize their own Salesforce account.

Before you connect

A Swarmz administrator must configure and enable the Salesforce OAuth application before the connector appears. Each Salesforce user still signs in and approves access. The administrator's consumer secret identifies the Swarmz OAuth application; it is not a user's Salesforce password or access token.

Create an OAuth-enabled Salesforce External Client App. For a Swarmz installation that serves more than one Salesforce org, use Salesforce's packaged distribution model and install the app where users will authorize it. A local External Client App works only in the org where it was created and is not copied to a new sandbox.

Configure the app with these values:

  • Add the callback URL shown on the Salesforce card in Admin > Settings > Integrations.
  • Enable the authorization code web server flow and PKCE with the SHA-256 challenge method.
  • Add Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).
  • Require the client secret for the web server and refresh-token flows.

Copy the consumer key and consumer secret into the Swarmz admin card, complete Test, then enable the connector. The secret is write-only. To replace it, rotate the secret in Salesforce and enter the new value in Swarmz.

Available operations

OperationWhat it doesLimit per minute
list_objectsLists objects visible to the connected user30
describe_objectReads fields and metadata for one object30
query_recordsRuns one read-only SOQL SELECT, capped at 200 rows20
get_recordReads one record by object and 15- or 18-character record ID30
create_recordCreates one record10
update_recordUpdates one record by ID10
upsert_recordCreates or updates one record by an external ID10

Swarmz sends REST API requests to the Salesforce instance returned by OAuth. SOQL input must be one SELECT statement, cannot contain comments or a semicolon, and cannot request more than 200 rows. Write operations pause for AI approval during a build.

Connect Salesforce

In Settings > Integrations, select Salesforce, then select Connect new.

  1. Select Production for a production or Developer Edition org, or Sandbox for a sandbox or scratch org.
  2. Select read access. Add write access only when the project will create, update, or upsert records.
  3. Sign in to the intended Salesforce org and approve access.
  4. Link the connection to the project.

For a project-owned CRM dashboard, ask: “Use our shared Salesforce connection to list open opportunities by stage and show the related accounts.” For a multi-tenant app, ask: “Let each signed-in app user connect Salesforce, then let them search contacts and update opportunities in their own org.” See Connector connection modes before choosing between a shared and app-user connection.

Verify Salesforce

  1. Run list_objects, then confirm that a known standard or custom object appears.
  2. Run describe_object for Account and check a known field API name.
  3. Query a test object with a SOQL SELECT and compare the returned rows in Salesforce.
  4. Read one disposable record by ID.
  5. With write access, create a disposable record, update one field, then upsert it through a test external-ID field.
  6. Delete the disposable record in Salesforce. The connector deliberately does not expose delete operations.

If production works but a sandbox does not, confirm that the External Client App is installed in that sandbox and that the connection uses Sandbox. If reads work but writes fail, reconnect with write access and check the Salesforce user's object- and field-level permissions. If OAuth settings changed recently, Salesforce can take time to activate the app; confirm the app is active before testing again.

On this page