Tesorio connects to Salesforce through an External Client App and an integration user that can read your accounts and contacts. You set them up in Salesforce, then enter the app's details in Tesorio.
Before you start
A Tesorio admin: a user whose permission group includes the Administration module.
A Salesforce admin. They can be the same person.
Your ERP already connected to Tesorio, and you know how Salesforce accounts link to your ERP customers: either your ERP customers hold the Salesforce Account ID, or a Salesforce account field holds the ERP customer ID. See Salesforce overview.
Connect the right Salesforce org. Once Tesorio has imported its data, the connection can't move to another org.
Choose how Tesorio signs in. With the default sign-in, the integration user signs in to Salesforce once, when you connect. With the Client Credentials Flow, nobody signs in; use it if your Salesforce org requires SSO for every user.
In Salesforce
1. Create a permission set
In Setup, search for Permission Sets and click New.
Enter a Label, for example Tesorio API Integration. For License, select Salesforce API Integration. Click Save.
Open Object Settings. For Accounts, click Edit and check Read, View All Records and View All Fields. Click Save.
Do the same for Contacts.
If you don't want to share every field, select only the fields Tesorio needs. On Accounts: Account Name, Account Number and Account Owner, plus the field that holds your ERP customer ID, any account fields that look up contacts, and any custom fields you want in Tesorio. On Contacts: Account Name, First Name, Last Name and Email.
2. Create a profile and the integration user
In Setup, search for Profiles and click New Profile. Clone an existing profile, choose the Salesforce Integration license and save it.
In Setup, search for Users and click New User. Choose the profile you just created and enter an email address you can access. Click Save.
On the user's page, assign the permission set from step 1.
If you use the default sign-in, click Reset Password to give the user a password.
Use a dedicated user for Tesorio, not a person's own login. If that person leaves and their user is turned off, the connection stops.
3. Create the External Client App
If your team already has the app and you're switching to the Client Credentials Flow, go to step 4.
In Setup, search for External Client Apps and click New External Client App.
Enter an External Client App Name, an API Name (letters, numbers and underscores only) and a Contact Email, usually your Salesforce admin's.
Check Enable OAuth Settings.
In Callback URL, enter https://dashboard.tesorio.com/oauth/salesforce/callback
Under OAuth Scopes, add Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).
Check Require Secret for Web Server Flow and Require Secret for Refresh Token Flow. Leave the other boxes unchecked, unless step 4 below asks for one. If Require Proof Key for Code Exchange (PKCE) is checked, uncheck it.
Under OAuth Policies, set the refresh token policy to Refresh token is valid until revoked, so Tesorio's access doesn't expire.
Click Save.
4. Turn on the Client Credentials Flow (optional)
Only if you chose the Client Credentials Flow:
In the External Client App, under OAuth Settings, check Enable Client Credentials Flow.
Under OAuth Policies, set Run As to the integration user.
Click Save.
The Callback URL is still needed to save the app, but this flow doesn't use it. If Tesorio is already connected, turn on Use Client Credentials Flow in Tesorio, as in Reconnect in Tesorio below.
5. Copy the details Tesorio needs
Instance URL: in Setup, search for My Domain and copy the Current My Domain URL, for example https://yourcompany.my.salesforce.com. Don't use login.salesforce.com or test.salesforce.com.
Consumer Key and Consumer Secret: in External Client App Manager, open the Tesorio app. Under Settings > OAuth Settings, click Consumer Key and Secret and copy both.
In Tesorio
Open Administration > Data Sources. New customers also see Salesforce in Time to Connect.
Click Add app, then Salesforce.
Enter the Instance URL, Consumer key and Consumer secret.
If you use the Client Credentials Flow, turn on Use Client Credentials Flow.
Click Connect & authorize.
With the default sign-in, a Salesforce window opens. Sign in as the integration user and click Allow, then click Done in Tesorio. If you're already signed in to Salesforce as yourself in this browser, sign out of Salesforce first, or Salesforce may connect your own user instead. If your browser blocks the window, click the link Tesorio shows instead.
On the Salesforce row, click Set up fields. Add the Account fields your team uses. If a Salesforce account field holds your ERP customer ID, add it and set its Imported as to the Tesorio field that holds the same ID, for example Customer Number. Tesorio imports only the fields you add here. Click Confirm fields.
Click Start onboarding. Tesorio first tests that it can read your accounts, contacts and users, then starts the first import.
Check the first import
The Salesforce row shows the status of the import. Click the arrow at the start of the row and open the History tab to see how it went.
If the test fails, open the Test connection tab to see what Tesorio couldn't read.
Tesorio matches Salesforce accounts to the customers that come from your ERP. It doesn't create new customers. When the import is done, open a few customers in Tesorio and check their Salesforce details.
From then on, Tesorio syncs on your company's sync schedule. See Set a Sync Schedule.
If the connection stops working
Tesorio signs in to Salesforce with the External Client App your team set up. When that sign-in stops working, Tesorio stops syncing with Salesforce until someone updates it. Your data in Tesorio stays, but it isn't updated.
How you'll know
The people on your sync failure list get the email Tesorio Sync - No valid Credentials Alert. To choose who gets it, see Set a Sync Schedule.
Tesorio shows the banner Some integration credentials are invalid. Admins see an Update credentials link in it. Other users see Please contact your administrator.
On Administration > Integrations, the Sync card says the Salesforce credentials are invalid, with an Update Credentials button.
On Administration > Data Sources, the Salesforce status is Credentials invalid, and the row says Salesforce rejected the saved credentials. Syncs are paused until they are updated.
Who fixes it
You need two people, who can be the same person:
A Tesorio admin: a user whose permission group includes the Administration module.
Your Salesforce administrator, because most fixes start in Salesforce.
💡 Tip: Using a dedicated integration user in Salesforce, not a person's own login, avoids most of these breaks. When that person leaves and their user is turned off, the connection stops.
What usually causes it
The Consumer Secret of your External Client App was changed, or the app was deleted.
Salesforce ended Tesorio's access: someone revoked it, or the app's refresh token policy made it expire.
The integration user was turned off, or can no longer sign in, for example because your org now requires SSO.
With the Client Credentials Flow: the flow was turned off, or the Run As user was changed or turned off.
Reconnect in Salesforce
Check that the integration user is active.
In External Client App Manager, open the Tesorio app. Under Settings > OAuth Settings, click Consumer Key and Secret and copy both.
Under OAuth Policies, set the refresh token policy to Refresh token is valid until revoked, so Tesorio's access doesn't expire.
If you use the Client Credentials Flow, check that Enable Client Credentials Flow is on and Run As is set to the integration user.
If your org requires SSO for every user, switch to the Client Credentials Flow. It needs no Salesforce sign-in. See step 4 under In Salesforce above.
Reconnect in Tesorio
Click Update Credentials on the Administration > Integrations page, or in the banner.
Enter your Instance URL (your My Domain URL, for example
https://yourcompany.my.salesforce.com), the Consumer Key and the Consumer Secret.Tick Use Client Credentials Flow if you use it.
Click Connect. With the default flow, Salesforce asks you to sign in: sign in as the integration user and allow access.
You can also do this on Administration > Data Sources: click Update on the Salesforce row. There you can leave the Consumer secret blank to keep the saved one. The Instance URL can't be changed after data has been imported, because a connection can't move to another Salesforce org.
Use one of these two ways, so Tesorio updates your existing connection. If you created a new External Client App and enter its Consumer Key anywhere else, Tesorio adds a second Salesforce connection instead.
When it works
Tesorio confirms the connection, and syncs start again at the next scheduled time. To sync now, click Start Sync on Administration > Integrations.
If you see an error
Missing code or state parameter, please try again: Salesforce didn't send Tesorio back a sign-in. Check that the app's Callback URL is exactly
https://dashboard.tesorio.com/oauth/salesforce/callback, and that you clicked Allow. If the message mentions a code challenge, uncheck Require Proof Key for Code Exchange (PKCE) in the app.Error during Salesforce OAuth process: Salesforce rejected the sign-in. Check the Consumer Key and Consumer Secret, and that the integration user can sign in.
Invalid credentials. Please try again.: Tesorio couldn't match the Salesforce sign-in to the one you started. Start again from Tesorio and finish the sign-in in the same browser, while you're signed in to Tesorio as an admin.
... is not a Salesforce instance URL.: enter your My Domain URL, for example
https://yourcompany.my.salesforce.com.This connection already holds data from ...; it can't be moved to another org.: the Instance URL belongs to a different Salesforce org from the one Tesorio already imported. Enter the original org's My Domain URL.
The provided Salesforce credentials does not have the required object permissions: check that the integration user can read Accounts and Contacts. With the Client Credentials Flow, Tesorio also shows this message when the Consumer Secret is wrong or no Run As user is set, so check those too.
If you still can't reconnect, contact Tesorio support and include the error message.



