This guide covers the complete setup process for connecting Stood Flows to your Salesforce org, including OAuth configuration, required permissions, and security best practices.
Navigate to Setup:
Go to Setup → App Manager → New Connected App (or edit existing)
Configure OAuth Settings:
Callback URL: https://stoodflows.web.app/salesforce-oauth-callback
Selected OAuth Scopes:
api - Access to Salesforce REST API
refresh_token - Ability to refresh access tokens
offline_access - Long-lived session support
Require Proof Key for Code Exchange (PKCE): Unchecked (must be disabled)
Save Configuration:
Keep your Client ID and Client Secret for your Stood setup
Save the Connected App configuration
💡 Best Practice: Permissions are applied on top of OAuth settings that simply open the door for the authenticated user. You may use an integration tech user for this or consider plugging your sandbox only (full sandbox preferred to have representative statistics on data).
The application requires the following OAuth scopes (or "full access"):
api - Access to Salesforce REST API
refresh_token - Ability to refresh access tokens
offline_access - Long-lived session support
Read access to Lead, Opportunity, and Case objects
Read access to RecordType, BusinessProcess, OpportunityStage, CaseStatus objects
Ability to execute queries on standard objects
Field History Tracking access (for Lead Status, Cases and Opportunity Stage fields)
Read access to Tooling API objects:
FlowDefinition - Flow definitions
Flow - Flow metadata
ApexTrigger - Apex trigger definitions
Layout - Layout definitions
ProfileLayout - Profile-layout associations
Profile - Profile metadata
BusinessProcess - Business process metadata
Ability to describe Lead, Opportunity, and Case objects (for field and relationship metadata)
Standard object describe permissions
Read access to Profile metadata
Access to Record Type visibility settings in Profile metadata
Read access to UserLicense (may not be available in Developer/Sandbox editions)
Read access to PermissionSetLicense
Read access to User object (for license analysis)
Access to Limits API (for organization limits and usage tracking)
API Enabled - Required for all API access
Read access to Lead, Opportunity, and Case objects
Read access to RecordType, BusinessProcess, OpportunityStage, CaseStatus objects
Tooling API access enabled
Read access to FlowDefinition, Flow, ApexTrigger, Layout, ProfileLayout, Profile in Tooling API
API Enabled - Required for all API access
View All Data (optional) - For accessing all records regardless of sharing rules
Customize Application - For accessing metadata objects
View Setup and Configuration - For accessing Tooling API objects
View Field History - For lifecycle analytics (requires Field History Tracking enabled)
For lifecycle analytics to work, you must enable Field History Tracking on:
Status field - Track status changes for lifecycle analysis
StageName field - Track stage changes for lifecycle analysis
Go to Setup → Object Manager → Lead (or Opportunity)
Click Fields & Relationships
Find the Status (Lead) or StageName (Opportunity) field
Click Set History Tracking
Enable history tracking for the field
Save
⚠️ Note: Field History Tracking has data retention limits (typically 18-24 months). Historical data beyond this period will not be available for analysis.
Recommended: Create a dedicated integration user with minimal permissions:
Create Integration User:
Create a user specifically for Stood Flows integration
Use a descriptive name (e.g., "Stood Flows Integration User")
Set to inactive login hours if desired
Assign Permission Set:
Create a permission set with only required permissions
Assign to integration user
Review and update regularly
Monitor Usage:
Review login history regularly
Monitor API usage
Set up alerts for unusual activity
Recommended Approach:
Development/Testing: Use a Full Sandbox (preferred)
Production: Use integration user with minimal permissions
Full Sandbox Benefits:
Representative data volumes
Realistic record counts
Safe testing environment
No impact on production users
Read-Only Operations: Stood Flows is currently read-only - no modifications to your org
Data Isolation: All data is isolated by organization in Stood Flows
Token Security: OAuth tokens stored securely with organization-based access control
API Rate Limits: Application includes progress tracking and respects Salesforce rate limits
Default: 15,000 API calls per 24 hours (per org)
Usage: Standard object queries (Lead, Opportunity, Case, RecordType, etc.)
Default: 5,000 API calls per 24 hours (per org)
Usage: Metadata objects (FlowDefinition, Flow, ApexTrigger, Layout, ProfileLayout, Profile)
The application minimizes API usage through:
Versioned Snapshots: All metadata stored in versioned snapshots
Incremental Refresh: Only fetches new data when refreshing
Caching: Uses stored versions for display
Progress Tracking: Shows API usage during refresh operations
Solution: Ensure user has required permissions listed above
Check: Permission sets and profiles assigned to user
Cause: Field History Tracking not enabled for Status/StageName fields
Solution: Enable Field History Tracking (see setup steps above)
Note: Lifecycle analytics will not work without this
Cause: Connected App has PKCE enabled
Solution: Disable PKCE in Connected App settings
Cause: Callback URL mismatch
Solution: Ensure callback URL is exactly: https://stoodflows.web.app/salesforce-oauth-callback
For setup assistance and commercial questions, contact: contact@stoodcrm.com