Connect Salesforce
You need a Salesforce administrator. It takes about ten minutes. CoSell works with your org through an app you own (an external client app); nothing is installed from AppExchange and no HabileLabs account ever has access to your org.
Make the app
Salesforce has restricted the creation of new connected apps since Spring '26, so make an external client app. A connected app you already have keeps working: use its consumer key and secret the same way.
- Setup → App Manager → New External Client App. Give it a name (CoSell) and a contact email, keep the distribution state Local, and enable OAuth.
- Callback URL: the value shown in CoSell under Settings → CRM → Salesforce (for example
https://api.cosell.habilelabs.io/oauth/salesforce/callback). - Scopes: Manage user data via APIs (api) and Perform requests at any time (refresh_token, offline_access).
- Leave Refresh Token Rotation off. CoSell keeps a rotated token when it is given one, but with rotation on, two renewals at the same moment invalidate each other and the connection has to be made again.
- Save. In External Client App Manager, choose Edit Settings for the app, open OAuth Settings and click Consumer Key and Secret to copy both.
Choose how CoSell proves itself
Integration user (recommended). In the app's OAuth settings select Enable Client Credentials Flow; then, in
its Policies, enable the flow and set Run As to a user you make for CoSell. Give that user a permission set
with API Enabled, Modify All on Opportunity, Account, Contact, Lead and Note, Convert Leads (CoSell converts
leads through Salesforce's own conversion), and Customize Application (CoSell creates its read-back fields on
activation). Nothing expires when a person leaves, and no consent screen is needed. In CoSell choose Integration
user, paste your My Domain URL (https://acme.my.salesforce.com, or
https://acme--name.sandbox.my.salesforce.com for a sandbox), the consumer key and secret, and press Connect
Salesforce. Salesforce refuses this flow on login.salesforce.com and test.salesforce.com: it must be your My
Domain URL. Anyone holding the consumer key and secret can act as that user, so rotate the secret if it leaks.
Sign in as a user. CoSell opens Salesforce's consent screen and keeps the refresh token the signed-in user grants. What that user may see and change is what CoSell may. Choose Sign in as a user in CoSell instead.
What activation does
- Creates the read-back fields on Opportunity as custom fields, in Salesforce's naming:
ACE_Opportunity_ID__c,ACE_Partner_Central_URL__c,ACE_Review_Status__c,ACE_Review_Comments__c,ACE_Stage__c,ACE_Origin__c,ACE_AWS_Seller__c,ACE_Engagement_Score__c,ACE_Involvement_Type__c,ACE_Sync_Status__c,ACE_Last_Synced_At__c,ACE_Sync_Error__c,ACE_Expected_Spend__c,ACE_Marketplace_Offers__c, and the ACE_Co_Sell__c checkbox that marks an opportunity for AWS. - Reads the org's currency (multi-currency orgs through
CurrencyType) and its active users, so deal owners can follow AWS.
Give the integration user access to the new fields. Salesforce shows a user only the fields its field-level
security allows, and a field created through the API is not promised to be visible to anyone. After activation, give
the integration user's permission set Read and Edit access to the ACE_… fields on Opportunity (and add them
to page layouts and other profiles as you would any custom field). Activation lists every field it created but cannot
see; press Re-activate once access is granted.
If the integration user lacks Customize Application, activation reports which fields it could not create. Create them by hand with those API names, then press Re-activate.
CoSell records a deal's contact as the opportunity's primary contact role, which is how Salesforce itself keeps an opportunity's contact after it is created.
The AWS inputs
The default mapping reads the AWS-specific inputs from custom fields of the same names: AWS_Use_Case__c,
AWS_Delivery_Model__c, AWS_Primary_Needs__c, AWS_Sales_Activities__c, Customer_AWS_Account_ID__c,
Competitor__c. Create the ones you want sellers to fill, or map your own fields under Settings → Mapping. Stage
names are read from the StageName picklist; map them to ACE stages under Mapping → Stages.
How changes reach CoSell
Every few minutes CoSell reads the opportunities changed since its last look. To hear about a change at once, add one of these on Opportunity:
- A Flow with an HTTP callout to the webhook URL shown in CoSell, posting
{ "ids": ["<Opportunity Id>"] }with the headerx-cosell-tokenset to the webhook token CoSell showed when you connected. - An Outbound Message (Setup → Outbound Messages; Enterprise, Performance, Unlimited and Developer editions) sent
from a record-triggered Flow or an existing workflow rule, to the same URL with
?token=<webhook token>appended (Outbound Messages cannot set headers). Keep Id among the fields to send. CoSell answers the acknowledgement Salesforce expects; until it does, Salesforce retries for up to 24 hours.
Nothing else is required. A webhook token can be reissued any time under Settings → CRM → Generate webhook token.
Keeping CoSell CRM beside Salesforce
A workspace that started on CoSell CRM keeps it when Salesforce is connected: Opportunities, Leads, Accounts and Contacts show what CoSell follows in Salesforce and what is kept in CoSell CRM, and CoSell CRM's opportunities co-sell too. Each record lives in one CRM. The Records kept in CoSell CRM card under Settings → CRM says whether the team adds records in CoSell CRM as well and where referrals, leads and imports from AWS are created (CoSell CRM). With Add records in CoSell CRM set to No, its records are kept but leave the lists.