Overview
A client-mode connector for a curated CRM / Field Service / IIoT bridge slice of the Salesforce REST API underhttps://YOUR_INSTANCE.my.salesforce.com/services/data/v62.0/:
BASE_ADDRESS is the org instance URL from the OAuth token response (no trailing slash). Topics use crm/salesforce/<object>/<verb>.
Use the
instance_url returned with the access token (for example https://mycompany.my.salesforce.com). login.salesforce.com and test.salesforce.com are for OAuth token exchange only — calling /services/data/ on the login host returns URL_NOT_RESET.API version is pinned to v62.0 (Hugo catalog
base_url). Bump the path version in the .lot when you standardize on a newer org API version. Bulk 2.0 and Pub/Sub (gRPC) are out of scope for this REST_API client template. Prefer Hub secrets for tokens. This template has not been verified against a live org.Basic Syntax
Events
Auth
OAuth 2.0 Bearer access token — default in the template:- In Salesforce Setup, create a Connected App with the OAuth scopes your integration needs (at least API access).
- Obtain an
access_token(authorization code, JWT bearer, or client credentials where the org enables it). - Set connector
BASE_ADDRESSto the token responseinstance_url(My Domain host). - Pass
access_tokenon the MQTT request payload so headers resolve:Authorization: Bearer {value.json.access_token}
- Store the token in Hub secrets /
GET SECRET. Never commit real credentials.
Example payloads
List sObjects (smoke): includeaccess_token on the MQTT JSON root used for header substitution.
SOQL:
assetId; body is the field map.
Platform Event: set eventName to the API name ending in __e (for example DeviceAlert__e); body is the event field map.
Deploy notes
- Deploy
SalesforceRestApi.lotonly (-addRoute). Do not deployhub-metadata.lotas a connector — it exists for Hub /-listTemplates(ADD METADATA+WITH IMAGEbase64). - Hub category: REST API Connectors.
- Doc link: https://docs.coreflux.org/latest/lot-language/routes/rest-api-apps/salesforce

