Salesforce Integration
Connect Ledly to your Salesforce org to automatically sync leads. This guide walks you through creating a Connected App and authorizing Ledly.
Prerequisites
- Salesforce Administrator access
- Access to Salesforce Setup
Step 1: Create a Connected App
- Log in to your Salesforce org
- Click the gear icon → Setup
- In the Quick Find box, search for App Manager
- Click New Connected App (top right)
Basic Information
| Field | Value |
|---|---|
| Connected App Name | Ledly Integration |
| API Name | Ledly_Integration (auto-fills) |
| Contact Email | Your admin email |
API (Enable OAuth Settings)
-
Check Enable OAuth Settings
-
Set Callback URL to:
https://api.ledly.io/api/salesforce/callback -
Selected OAuth Scopes - Add these:
Access and manage your data (api)Perform requests on your behalf at any time (refresh_token, offline_access)Access your basic information (id, profile, email, address, phone)
-
Leave other settings as default
-
Click Save
After saving, changes can take up to 10 minutes to take effect in Salesforce.
Step 2: Get Your Credentials
- After saving, click Continue
- On the Connected App detail page, click Manage Consumer Details
- You may need to verify your identity (email code or authenticator)
- Copy these values:
- Consumer Key (this is your Client ID)
- Consumer Secret (this is your Client Secret)
Security Note: Keep these credentials secure. Never share them via email or chat.
Step 3: Configure Connected App Policies
- Go back to App Manager
- Find your
Ledly Integrationapp - Click the dropdown arrow → Manage
- Click Edit Policies
Recommended OAuth Policies
| Setting | Recommended Value |
|---|---|
| Permitted Users | All users may self-authorize |
| IP Relaxation | Relax IP restrictions |
| Refresh Token Policy | Refresh token is valid until revoked |
- Click Save
Step 4: Enter Credentials in Ledly
- Log in to Ledly at app.ledly.io
- Go to Settings → CRM Integration
- Select your environment (Production or Sandbox)
- Enter your Client ID (Consumer Key)
- Enter your Client Secret (Consumer Secret)
- Click Save Credentials
- Click Connect with Salesforce
- Log in to Salesforce when prompted and approve access
Once connected, you’ll see the connection status on the CRM settings page.
Step 5: Map Fields to Salesforce
After connecting, configure how Ledly fields map to your Salesforce fields.
- Go to Settings → CRM Integration → Field Mapping
- For each Ledly field, select the corresponding Salesforce field
- Click Save Mapping
Standard Field Mappings
| Ledly Field | Salesforce Lead Field |
|---|---|
email | Email |
first_name | FirstName |
last_name | LastName |
phone | Phone |
Custom Field Mappings
Map Ledly fields (including custom fields) to your Salesforce custom fields:
| Ledly Field | Salesforce Field |
|---|---|
program_code | Program_Interest__c |
start_date | Preferred_Start_Date__c |
| Custom fields | Your custom __c fields |
Field mapping must be configured before leads will sync to Salesforce. Unmapped fields will not be sent.
For detailed mapping options, see the Field Mapping Guide.
Troubleshooting
”Invalid Client ID” Error
- Double-check the Consumer Key was copied correctly
- Wait 10 minutes after creating the Connected App (Salesforce propagation delay)
- Ensure there are no extra spaces in the credentials
”Redirect URI Mismatch” Error
- Verify the Callback URL in your Connected App matches exactly:
https://api.ledly.io/api/salesforce/callback - Check for trailing slashes or http vs https
”User Not Authorized” Error
- If using “Admin approved users”, ensure your profile/permission set is assigned
- Try switching to “All users may self-authorize” temporarily for testing
Token Refresh Failures
- Ensure “Refresh token is valid until revoked” is set in policies
- Check that the
refresh_tokenOAuth scope is included
Security Best Practices
- Rotate credentials periodically - Generate new Consumer Secret every 6-12 months
- Use least privilege - Only grant the OAuth scopes Ledly needs
- Monitor access - Review Connected App usage in Salesforce Setup → Security → Connected Apps OAuth Usage
- Revoke if compromised - If credentials are exposed, immediately revoke in Salesforce and generate new ones
Revoking Access
In Ledly
- Go to Settings → CRM Integration
- Click Disconnect
In Salesforce
- Setup → App Manager → Find
Ledly Integration - Click dropdown → Manage
- Click Edit Policies
- Under OAuth Policies, click Revoke All Tokens
Or to remove completely:
- Setup → App Manager → Find
Ledly Integration - Click dropdown → Delete
Support
If you encounter issues:
- Email: support@ledly.io
- Include your Salesforce org ID (Setup → Company Information)
- Do NOT send credentials via email