Prompt
Salesforce AppExchange integration for a SaaS product
Latest observation
Integrating a SaaS product with Salesforce AppExchange usually means one of three things:
-
Simple Salesforce integration
Your app connects to Salesforce via APIs, but isn’t listed on AppExchange. -
AppExchange managed package
You build a package customers install in their Salesforce orgs. -
AppExchange-connected app / OAuth app
Your SaaS uses Salesforce as an identity or data source, with listing on AppExchange for distribution and trust.
Typical architecture
A common SaaS-to-Salesforce setup looks like this:
- Frontend in your SaaS
- Backend integration service
- Salesforce connected app for OAuth
- Salesforce REST/Bulk/Metadata APIs
- Optional Platform Events / Change Data Capture for near-real-time sync
- Optional Apex package if you need in-org logic, UI components, or custom objects
Key decisions
1. Do you need a managed package?
Use a managed package if you need:
- Custom objects/fields
- Lightning components
- Apex classes/triggers
- In-org automation
- Easy install/uninstall for customers
If you only need to sync data between systems, you may not need a package.
2. How will auth work?
Most SaaS apps use:
- OAuth 2.0 Authorization Code flow
- Refresh tokens for long-lived access
- Per-customer Salesforce org connection
For server-to-server use cases, you may also consider:
- JWT Bearer flow if suitable and approved
- Named credentials only if logic runs inside Salesforce
3. What data flows are needed?
Common patterns:
- Push from SaaS to Salesforce: create/update leads, accounts, contacts, cases
- Pull from Salesforce to SaaS: read account status, opportunity stage, cases
- Bidirectional sync: requires conflict resolution and field mapping
- Event-driven sync: use CDC or Platform Events to reduce polling
AppExchange requirements
If you want to publish on AppExchange, expect:
- Security review
- OAuth best practices
- Least-privilege permissions
- Clear privacy policy and data handling
- Install/uninstall behavior documentation
- Packaging and versioning standards
Suggested implementation steps
- Define your use case and Salesforce objects
- Decide whether you need a managed package
- Create a Salesforce connected app
- Implement OAuth login and token storage
- Build API sync logic
- Add field mapping and error handling
- If listing on AppExchange, prepare package and complete security review
- Test in multiple Salesforce editions and org types
Common APIs used
- REST API for standard CRUD
- Bulk API for large data volumes
- Composite API for fewer round trips
- Streaming API / CDC for event-driven updates
- Metadata API if you deploy configuration
Example use cases
- CRM enrichment
- Customer success platform syncing account health
- Support ticket sync with Salesforce Cases
- Billing/subscription status syncing
- Marketing automation integration
If you want, I can help with any of these next:
- a reference architecture
- AppExchange packaging strategy
- OAuth implementation flow
- Salesforce object model mapping
- security review checklist
- sample integration plan for your specific SaaS
Brands