PREMIUM ADD-ON ✨This integration is only available to users with a specific paying add-on. Please
contact us to get access to Salesforce CRM integration.
Object mapping

I. Integration configuration
Install Salesforce CRM Package
To gain premium access to our Salesforce Package application, please don’t hesitate to contact us. You can initiate the installation process by clicking on the provided link, which will direct you to the installation page where you can follow step-by-step instructions for a seamless integration. If you have any questions or need assistance during the installation, our dedicated support team is here to help you every step of the way.
- We recommend selecting the “Install for all users” option;
- Click on the “Install” button;
- Make sure to check the box to grant access to these third-party websites; and
- Once completed, you’ll have successfully installed the Lago Salesforce App.
Please note that the installation process may take a few minutes to complete.
However, rest assured that you will receive an email confirmation once the installation is finished.
Webhook config: sync real-time data
After installation in Salesforce CRM, set up a webhook URL in Salesforce to receive real-time data from Lago. This involves configuring a new “Site” in Salesforce’s setup section. Note that the four main actions described below should be performed by a Salesforce Admin and is only required during the initial setup.Access the Site section in Salesforce
- Click the gear icon in the upper right to access Salesforce Setup;
- Search and navigate to the Sites section; and
- Create a new Site (see picture below).

Create a new Site in Salesforce
When creating a new site, follow these steps:
- Set a unique Site Label;
- Specify a unique Site Name;
- Optionally, add a Site Description;
- Ensure the Site Contact and Default Record Owner are filled;
- Set the Default Web Address prefix to
getPushNotification; - Choose
SiteLoginas the Active Site Home Page; and - Don’t forget to save the new site: and
- Activate the newly created site by going to the Site Details and clicking the
Activatebutton.

Edit Public Access Settings in Salesforce
To edit Public Access Settings for your new Site:
- Visit the site and click Public Access Settings;
- In the Enabled Apex Class Access section, click “edit”;
- Add
LagoWebHookSubscriptionControllerto Enabled Apex Classes; and - Save your changes.

Paste the Webhook URL into Your Lago App
To set up the webhook URL for real-time data syncing between Lago and Salesforce, follow these steps:
Now, go to your Lago app and past this webhook into the webhook’s settings:
- Return to your newly created site;
- Locate the Custom URLs section;
- Copy the domain name (e.g., lago.my.salesforce-sites.com);
- Add the
https://prefix to this domain name (e.g.,https://lago.my.salesforce-sites.com); and - Append
/services/apexrest/lago/api/Webhooks/incoming/pushDetails/to the domain name (e.g.,https://lago.my.salesforce-sites.com/services/apexrest/lago/api/Webhooks/incoming/pushDetails/).

- Within Lago, navigate to Developers;
- Visit the Webhooks tab;
- Choose
HMACas the mandatory signature type; - Paste your Salesforce webhook URL; and
- Save this webhook endpoint.

Establish and finalize connection

- Access Salesforce and locate the App Launcher;
- Find and open the Lago app you recently installed;
- Within the Lago Base Configuration tab:
- Provide your Lago API Key (located in Lago’s Developer Section)
- Enter your Lago API base URL. Do not insert the
api/v1at the end of the URL. By default, the valid URL ishttps://api.getlago.com/. If you want to change the API base URL to another one (e.g.,https://api.eu.getlago.com/or a custom self-hosted one), please follow option 2.
- “Save and validate” your connection; and
- Click the “Start Sync Data” to finalize the connection between Lago and Salesforce.
- Navigate to Salesforce’s Setup;
- Search for and select Remote Site Settings;
- Find and access the remote site for the Lago App;
- Click the Edit button to modify the remote site’s details;
- Update the Remote Site URL with your preferred URL; and
- Save the changes.
II. Sync data from Lago to Salesforce
If your webhook endpoint is configured correctly, your billing data will flow seamlessly in real-time.Sync customers to Salesforce
To synchronize Lago Customer data with Salesforce Accounts (native object), ensure that your Salesforce Account is created first, and that the Lago Customer’sexternal_salesforce_id is explicitly populated.
- Begin by creating a new Account in Salesforce or accessing an existing one;
- Next, create a customer in Lago and populate the
external_salesforce_idfield for a Lago Customer with the Salesforce Account Id; and - Finally, your Salesforce Account and Lago Customer are synchronized!

Sync subscriptions to Salesforce

Lago Subscriptions custom object.
Here is a list of Subscription fields that are automatically synced.
Note that this subcription is automatically linked to a Salesforce Account:
- Subscription Id;
- Subscription Name;
- Subscription Start Date;
- Subscription Status;
- Subscription Termination Date (synced when the subscription is terminated);
- Subscription Billing Time (either
calendaroranniversary); and - Plan Code.
Sync invoices to Salesforce

Lago Invoices custom object.
Here is a list of Subscription fields that are automatically synced:
- Invoices Number;
- Invoice Payment Status;
- Invoice Type (
subscriptionorone-off); - Invoice Issuing Date;
- Invoice Amount;
- Invoice File Url; and
- Invoice Currency.
Sync credit notes to Salesforce
Whenever a credit note is issued for a Lago Invoice, the credit note details will be automatically synced in real-time with Salesforce using theLago CreditNotes custom object.
III. Actions from Salesforce to Lago
Beyond just syncing data from Lago to Salesforce, you can also initiate actions in Lago directly from Salesforce. You can leverage SalesforceFlows to execute actions in Lago. Lago provides two customizable templates for creating customers from Salesforce Accounts
and directly assigning subscriptions to customers from Salesforce.
Flow 1: Create customers

- Log into your Salesforce instance;
- Access the Setup section via the settings wheel icon in Salesforce;
- Find and select
Flowsunder Process Automation in the sidebar; - Locate and open the
Lago Template - Create Customer in Lago on Account Create; - Click ‘Save As’ to create and save your own version of the template; and
- Do not forget to click the
Activatebutton to activate your flow.

Flow 2: Create subscriptions
Assigning a plan to a customer, adjusting negotiated prices, and initiating the subscription upon winning an opportunity represents a key action from Salesforce to Lago. This enables sales teams to remain within Salesforce, their primary tool, and activate billing processes directly, without the need to switch platforms. To assign a subscription and set prices in Lago directly from Salesforce, use the provided Lago Flow template.- Log into your Salesforce instance;
- Access the Setup section via the settings wheel icon in Salesforce;
- Find and select
Flowsunder Process Automation in the sidebar; - Locate and open the
Lago Template - Create Subscription in Lago on Opp Closed; - Click ‘Save As’ to create and save your own version of the template; and
- Do not forget to click the
Activatebutton to activate your flow.
Validate the flow
The default setting triggers plan assignment when a Salesforce Account links to a Lago customer and the opportunity status changes to closed-won.
You can customize this flow to suit your specific needs. Moreover, you have the option to adjust the subscription fields being synchronized from Salesforce to Lago.

Assign subscription and override prices
- Create an opportunity by assigning an expected closed date and a stage;
- Add a Lago plan to this opportunity as a product (Salesforce will automatically retrieve all plans from Lago in
Standard Price Book); - Specify
1for the quantity of the plan; - Use the custom UI to either assign this plan directly or to override prices; and
- Click on ‘Lago Override Plan’ to finalize the subscription assignment.
By default, the subscription is created when the opportunity is
closed-won. You can assign multiple subscriptions for the same opportunity.Debugging & logs
To ensure seamless data synchronization between Lago and Salesforce, every action and data transfer is meticulously logged. These logs are accessible directly through the Lago package for comprehensive debugging and analysis:- Navigate to ‘Lago Base Configuration’: This is your starting point for accessing the debugging tools. and
- Access Logs: Click on the ‘Logs’ tab to view a detailed record of all activities.