IntegrationsSalesforce

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

  1. Log in to your Salesforce org
  2. Click the gear iconSetup
  3. In the Quick Find box, search for App Manager
  4. Click New Connected App (top right)

Basic Information

FieldValue
Connected App NameLedly Integration
API NameLedly_Integration (auto-fills)
Contact EmailYour admin email

API (Enable OAuth Settings)

  1. Check Enable OAuth Settings

  2. Set Callback URL to:

    https://api.ledly.io/api/salesforce/callback
  3. 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)
  4. Leave other settings as default

  5. Click Save

⚠️

After saving, changes can take up to 10 minutes to take effect in Salesforce.


Step 2: Get Your Credentials

  1. After saving, click Continue
  2. On the Connected App detail page, click Manage Consumer Details
  3. You may need to verify your identity (email code or authenticator)
  4. 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

  1. Go back to App Manager
  2. Find your Ledly Integration app
  3. Click the dropdown arrow → Manage
  4. Click Edit Policies
SettingRecommended Value
Permitted UsersAll users may self-authorize
IP RelaxationRelax IP restrictions
Refresh Token PolicyRefresh token is valid until revoked
  1. Click Save

Step 4: Enter Credentials in Ledly

  1. Log in to Ledly at app.ledly.io
  2. Go to SettingsCRM Integration
  3. Select your environment (Production or Sandbox)
  4. Enter your Client ID (Consumer Key)
  5. Enter your Client Secret (Consumer Secret)
  6. Click Save Credentials
  7. Click Connect with Salesforce
  8. 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.

  1. Go to SettingsCRM IntegrationField Mapping
  2. For each Ledly field, select the corresponding Salesforce field
  3. Click Save Mapping

Standard Field Mappings

Ledly FieldSalesforce Lead Field
emailEmail
first_nameFirstName
last_nameLastName
phonePhone

Custom Field Mappings

Map Ledly fields (including custom fields) to your Salesforce custom fields:

Ledly FieldSalesforce Field
program_codeProgram_Interest__c
start_datePreferred_Start_Date__c
Custom fieldsYour 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_token OAuth scope is included

Security Best Practices

  1. Rotate credentials periodically - Generate new Consumer Secret every 6-12 months
  2. Use least privilege - Only grant the OAuth scopes Ledly needs
  3. Monitor access - Review Connected App usage in Salesforce Setup → Security → Connected Apps OAuth Usage
  4. Revoke if compromised - If credentials are exposed, immediately revoke in Salesforce and generate new ones

Revoking Access

In Ledly

  1. Go to SettingsCRM Integration
  2. Click Disconnect

In Salesforce

  1. Setup → App Manager → Find Ledly Integration
  2. Click dropdown → Manage
  3. Click Edit Policies
  4. Under OAuth Policies, click Revoke All Tokens

Or to remove completely:

  1. Setup → App Manager → Find Ledly Integration
  2. 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