
Salesforce API Basics: Connecting Salesforce to Other Applications (Easy Starter Guide)
If you’re just starting with integrations, good news: you don’t need to be a hardcore developer to connect Salesforce to the rest of your stack. This guide explains the core Salesforce APIs, a simple strategy for picking the right approach, and how to get moving fast—often with pre-built apps from the AppExchange.
Step 1 — Decide your integration strategy (10-minute exercise)
Before touching APIs, answer three questions:
- What problem are we solving?
Examples: “Push new web leads into Salesforce,” “Sync invoices back from ERP,” “Notify our app when an Opportunity closes.” - How fresh does the data need to be?
- Real-time or near real-time (seconds): use events/streaming.
- Hourly/daily: use bulk or scheduled jobs.
- Buy vs. build?
- Buy: Start on the Salesforce AppExchange and look for a pre-built connector (data integration, finance/ERP, e-signature, marketing). You’ll move faster and inherit maintenance from the vendor. See the Integration collection and the Guide for Integration Apps.
- Build: Use Salesforce APIs (below) when there’s no good app, or when you need tight control.
Write the answers on one page. That’s your integration brief.
Step 2 — Know your Salesforce API options (plain English)
- REST API — Best for everyday create/read/update/delete (CRUD), small–medium payloads, and modern web/mobile apps. Easy to test with tools like cURL or Postman.
- Bulk API 2.0 — For large data loads or scheduled syncs (imports, upserts, mass deletes, and bulk queries).
- Streaming & Events — When you want Salesforce to notify other systems about changes in real time:
- Compare Change Data Capture vs. Platform Events
- Use the Pub/Sub API for high-throughput publish/subscribe patterns
- External Services (low-code callouts) — Bring an external API into Salesforce using an OpenAPI (Swagger) schema; Salesforce generates invocable actions you can use in Flow or Apex. Start here: External Services overview and Developer guide.
- Named Credentials — Store endpoint URLs and authentication securely once; reference them in Apex/Flow so you don’t hard-code secrets. Learn more in Named Credentials (Help) and Developer overview.
Step 3 — Authentication 101 (so things stay secure)
Salesforce uses OAuth 2.0 with a Connected App for inbound integrations. The high-level steps:
- Create a Connected App in Salesforce and enable OAuth settings (choose the flows/scopes you need).
- Your external app requests an access token via OAuth; Salesforce returns a token if the user/flow is authorized.
- Use the token in your API requests.
Start here: OAuth & Connected Apps and Enable OAuth Settings for API Integration.
Tip: For outbound calls from Salesforce to other systems, pair Flow/Apex with Named Credentials so your auth lives in config, not code.
Step 4 — Quick-start recipes (copy, test, learn)
A) Test the REST API with cURL (read your user info)
- Get an access token (via OAuth or the Salesforce CLI if you’re just testing).
- Call the REST endpoint:
curl https://yourInstance.salesforce.com/services/data/v60.0/sobjects/User/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
You should see JSON about the logged-in user. From there, you can POST
to create records or PATCH
to update. See the REST API Quick Start for examples.
B) Load a CSV with Bulk API 2.0 (nightly syncs)
Create a job, upload a CSV, and let Salesforce process it asynchronously. Perfect for nightly product or invoice syncs. Use Bulk API 2.0 for imports, upserts, and mass queries.
C) React to changes in real time (events)
Subscribe to Change Data Capture or publish/subscribe to Platform Events via the Pub/Sub API. Use this when downstream systems must react within seconds—e.g., kick off provisioning when an Opportunity closes.
D) Call an external API from Flow (no code)
Register an OpenAPI spec with External Services; Salesforce generates invocable actions you can drop into Flows. Great for “get shipping rates,” “validate VAT,” or “fetch order status.”
Step 5 — When to use pre-built apps (and how to pick)
Start on the AppExchange. Compare connectors for your category (ERP, billing, data pipelines, marketing, e-signature, etc.). Look for:
- Data direction (Salesforce → App, App → Salesforce, or both)
- Sync style (real time vs. scheduled)
- Objects covered (standard + custom)
- Field mapping UI and error handling
- Security (OAuth, IP allowlists, audit trails)
Shortlist options with the Integration collection and the Guide for Integration Apps.
A basic integration strategy you can trust
- Start with buy: If an AppExchange app covers ≥80% of your needs, use it. You’ll ship faster and reduce maintenance.
- Design for the freshness you actually need: events for real-time, Bulk API 2.0 for scheduled/big data, REST API for everything in between.
- Secure by default: Connected App + OAuth for inbound; Named Credentials for outbound; keep least-privilege scopes.
- Log and retry: Capture errors, respect rate limits, and build retries for transient failures.
- Pilot in a sandbox: Prove the mapping, volumes, and governance before production.
30-day “get connected” plan (copy/paste)
Week 1 — Define & discover
- Write the one-page integration brief (problem, freshness, buy vs. build).
- Shortlist AppExchange options and/or confirm the API approach.
Week 2 — Secure & set up
- If inbound: create a Connected App and test OAuth in a sandbox.
- If outbound: configure Named Credentials and a test Flow/Apex callout.
Week 3 — Build & test
- REST/Bulk: build a small, representative sync (10–100 records) using REST or Bulk 2.0.
- Events: subscribe to one CDC channel via the Pub/Sub API and log events.
- External Services: register an OpenAPI spec and call it from Flow via External Services.
Week 4 — Harden & launch
- Add error handling, retries, and monitoring.
- Validate profiles/permission sets and audit logging.
- Launch to a small group; document the runbook.
Troubleshooting cheat sheet
- 401 /
invalid_grant
→ Check OAuth scopes and callback, and the user/profile permissions. LIMIT_EXCEEDED
→ You’re hitting API or event limits; batch or back-off (Bulk/API allocations apply) with Bulk API 2.0 or queued jobs.- Handshake/auth issues on callouts → Move secrets into Named Credentials; confirm auth type matches the external service.
- Event subscriber drops messages → Review Pub/Sub API flow control/acknowledgements and ensure the consumer commits offsets promptly.
Where Revenue Ops can help
Not sure whether to buy or build? We’ll help you draft the integration brief, shortlist AppExchange apps, and prototype the right API pattern (REST, Bulk, Events, or External Services) with guardrails—so your first integration is fast, secure, and easy to maintain.
For related, practical reads:
- Clean Pipeline, Real Forecasts
- RevOps Is the Operating System for Growth
- Sales Engagement That Actually Works
- 10 High-Impact Updates Every Salesforce Admin Should Make
Bottom line: Start with a one-page brief, choose the right API or pre-built app, secure it with OAuth/Named Credentials, and pilot in a sandbox. Keep the data as fresh as it needs to be (not more), log everything, and iterate. That’s how you connect Salesforce to the rest of your business—without turning integration into a science project.