Connect Salesforce
Pipemetry connects to Salesforce with the Client Credentials OAuth flow and reads Opportunities, their field history, and owners. It never writes back — the Salesforce client has read operations only.
The same walkthrough is built into the app, with copy-to-clipboard values, under Onboarding → Salesforce.
What Pipemetry needs from you
Three values:
| Value | Where it comes from |
|---|---|
| Login URL | Your org’s My Domain URL for the Client Credentials flow |
| Consumer Key | Your External Client App / Connected App — this is the client_id |
| Consumer Secret | The same app — this is the client_secret |
Step 1 — Pick your Salesforce environment
Decide whether you are connecting Production or a Sandbox, then find your My Domain login URL
under Setup → My Domain. It looks like https://your-domain.my.salesforce.com (a sandbox looks
like https://your-domain--sandbox.sandbox.my.salesforce.com).
Using the wrong login server is the single most common reason a connection fails.
Step 2 — Create an External Client App
As of the Spring ‘26 release Salesforce restricts creating new Connected Apps and recommends External Client Apps instead. Use an External Client App unless your org still relies on a legacy Connected App.
- Gear icon → Setup.
- Quick Find → type
App→ App Manager. - New External Client App.
- Name it (for example
Pipemetry Integration), let the API Name auto-fill, add your contact email, and leave Distribution State as Local. - Expand API (Enable OAuth Settings) and turn on Enable OAuth.
- Callback URL: paste
https://login.salesforce.com/services/oauth2/callback. Client Credentials never redirects a browser — the field just has to be present and valid. - Selected OAuth Scopes: add Manage user data via APIs (api). Perform requests at any time (refresh_token, offline_access) is harmless but not required.
- Create, then wait 2–10 minutes for the app to propagate.
- Enable the flow on the saved app: Quick Find →
External→ External Client Apps Manager → your app → Edit Settings → expand OAuth Settings → check Enable Client Credentials Flow → accept the warning → Save.
Step 3 — Set the Run-As (integration) user
Pipemetry sees exactly what this one user can see. If the Run-As user cannot see every Opportunity, your numbers will be incomplete.
- Recommended: a dedicated user on the Salesforce Integration user license with the Minimum Access – API Only Integrations profile. These licences are included free in Enterprise, Unlimited, Performance and Developer editions and exist for exactly this.
- Alternative: a regular user with the API Only User permission who can see every Opportunity.
For an External Client App: Setup → Quick Find External → External Client Apps Manager →
your app → Edit Settings → OAuth Settings → in the Client Credentials Flow area set
Run As to the integration user → Save. (The exact in-product label can vary slightly by
release.)
For a legacy Connected App: Setup → App Manager → your app → Manage → Edit Policies → under the OAuth Policies “Client Credentials Flow” section, set Run As → Save.
Step 4 — Grant data access with a permission set
- Setup → Quick Find
Permission→ Permission Sets → New. - Name it (for example
Pipemetry Read Access). If your Run-As user is on the Salesforce Integration licence, set the Permission Set License to Salesforce API Integration so it can be assigned. - System Permissions → enable API Enabled.
- Object Settings → Opportunity → grant Read and enable View All, so the user sees every Opportunity regardless of owner or sharing rules.
- Object Settings → Opportunity Field History (
OpportunityFieldHistory) → grant Read. - Field-level Read on: Amount, Stage, Close Date, Forecast Category (API names
Amount,StageName,CloseDate,ForecastCategory). - Save → Manage Assignments → Add Assignment → your Run-As user.
Pipemetry’s Verify step probes these five Opportunity fields:
Amount, CloseDate, CreatedDate, OwnerId, StageNameCreatedDate and OwnerId are Salesforce system fields with no field-level-security toggle —
they become readable automatically once the Opportunity object is readable, so there is nothing to
configure for them.
Step 5 — Turn on Opportunity Field History Tracking
This is recommended, not required. Pipemetry forecasts from your current pipeline immediately; field history is what makes point-in-time reconstruction accurate — “what was this deal’s amount, stage and close date on day N” — and it powers the trend and waterfall views.
- Setup → Object Manager → Opportunity → Fields & Relationships.
- Set History Tracking.
- Check Enable Opportunity Field History, then select Amount, Stage, Close Date (add Owner if you forecast by owner). Save.
Two limits worth knowing: Salesforce tracks up to 20 fields per object, and without the
OpportunityFieldHistory object read from step 4 Pipemetry sees zero history rows even when
tracking is on.
Forecasting by Segment is optional: check the Opportunity field you want to use, grant the integration user Read on it, and map it on the Field Mapping step. Segment never blocks activation.
Step 6 — Enable Change Data Capture
This is what powers live streaming. Without it Pipemetry can read your data but will not receive real-time updates as deals change.
- Setup → Quick Find
Change Data Capture→ Change Data Capture. - Find Opportunity in Available Entities and move it to Selected Entities.
- Save. Salesforce creates the
OpportunityChangeEventchannel that Pipemetry subscribes to.
There is no “start streaming” action inside Pipemetry — once the connection is verified and CDC is enabled here, the consumer subscribes automatically.
Step 7 — Copy your credentials into Pipemetry
External Client App: Setup → External Client Apps Manager → your app → Settings tab → under OAuth Settings → Consumer Key and Secret.
Legacy Connected App: Setup → App Manager → your app → dropdown → View → Manage Consumer Details (you may be asked to verify your identity).
Then, in Pipemetry:
- Paste the login URL from step 1, the Consumer Key (
client_id) and the Consumer Secret (client_secret). - Leave Auth Mode as Client Credentials. Save.
- Click Verify — it checks Opportunity read access, the required fields, history access, and advises on CDC.
- Click Run Backfill to pull your existing Opportunities and field-history events. After that, live changes stream in via CDC.
Treat the Consumer Secret like a password: anyone with both values can pull your data. Pipemetry stores it encrypted and never returns it — secret fields are always blank when you reopen the form.
If Verify fails
Re-check step 4 (the permission set and field access) and step 3 (Run-As user visibility). Those are the usual causes. The Verify result lists exactly which object or field was unreadable.