# Configuration

Configure to automate your co-sell flow.

---

## Overview
Once you have completed integrations with your CRM and the cloud partners,
you will need to configure the field mappings, templates, and other options
before starting making referrals.

Co-sell settings act as the translation layer between your CRM (Salesforce, HubSpot, or
Dynamics 365) and cloud partner portals — AWS Partner Central, Azure Co-Sell, and Google Cloud Partner Network.
Once configured, your sales team can register deals and track referrals without leaving
their CRM or manually re-entering data in each partner portal.

:::info
- Visit [Fours Integrations](https://console.suger.io/settings?tab=integrations) to find and configure supported partners.
- Configurations affect both Fours Console and Suger Connector in CRM software.
- Click the <img src="/img/cosell/configuration/history_button.png" alt="History button for change log and audit records" style="height:28px;display:inline" /> button at any time to access the change log and review data audit records.
:::

### Prerequisites

Before you begin, make sure:

- You have admin access to **Fours Console > Settings**.
- Salesforce, HubSpot, or Dynamics 365 is already connected under **Settings > Integrations**.

## Display Setting of Co-sell Intelligence

Co-sell Intelligence surfaces AWS, Azure, and GCP engagement signals (Low/Medium/High)
directly in your CRM widget.

  > <img src="/img/cosell/configuration/intelligence_configs.png" alt="Co-sell Intelligence display settings overview" style="max-width:880px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

:::info
**Co-sell Intelligence signals are enabled by Fours.** The enable toggles — the master
**Enable Cosell Intelligence Signals** switch and the per-partner **AWS Signals**,
**Azure Signals**, and **GCP Signals** switches — are not available to customers in
**Settings > Co-sell**; the panel renders nothing for your team. To turn these signals on
or off, or to change which cloud partners they cover, contact
[support@suger.io](mailto:support@suger.io).
:::

Once Fours has enabled them, signals surface per cloud partner. A partner that has not
been switched on shows no data even while Co-sell Intelligence itself is on, so tell
support which of AWS, Azure, and GCP you want covered.

### Three different "enrichment" features

Three features share the word *enrichment* but do different things. Keep them apart when
you configure or troubleshoot:

| Feature | What it fills | When it runs |
| --- | --- | --- |
| **[Auto-Enrich Referrals](#auto-enrich-referrals)** | Blank **referral** fields — company address, website, contact details — on the referral you are about to share | At share time, when the referral is previewed or prepared |
| **CRM intelligence-signal enrichment** | Intelligence **signals** written into mapped fields on your Salesforce Account/Opportunity or HubSpot Deal/Company records | On a schedule, every **2 hours** (previously every 12 hours) |
| **[AWS lead enrichment](/cosell/cosell-leads/#create-leads-from-salesforce-accounts)** | New AWS **leads**, created from your Salesforce Accounts, with what AWS knows about each company | Once a day at 03:15 UTC while its automation is on. Set it up under **Lead Enrichment Mapping Configs**, the last section of **Settings > Co-sell** |

![The co-sell configuration's Settings tab — the Auto-Share Referrals and Auto-Enrich Referrals toggles, each with its own description](images/50-cosell-settings-toggles.png)

Auto-Enrich never touches your CRM objects — it only completes the outgoing referral.
Intelligence-signal enrichment never touches referral fields — it only writes signals
into the CRM fields you have mapped for them. Lead enrichment fills neither: it reads your
Salesforce Accounts and creates new AWS leads from them.

#### The 14 intelligence signals

Intelligence-signal enrichment writes 14 values:

| Cloud partner | Signals |
| --- | --- |
| **AWS** | AWS Engagement Score · AWS Marketplace Count · AWS Marketplace Review Count · AWS Marketplace Purchase Count |
| **Azure** | Azure Engagement Score · Azure Event Score · Azure Usage Score · Azure Marketplace Count · Azure Marketplace Review Count · Azure Marketplace Purchase Count |
| **GCP** | GCP Engagement Score · GCP Marketplace Count · GCP Marketplace Review Count · GCP Marketplace Purchase Count |

The engagement score rates how likely the customer is to be won through that partner's
co-sell motion. The marketplace counts describe the customer's own footprint on that
marketplace — products listed, reviews on those products, and purchases made. Azure adds
two extra scores: **Event Score** (how many interactions the customer has had with
Microsoft) and **Usage Score** (how much the customer uses Azure services).

Each signal is written only to the Salesforce or HubSpot field you map it to. Signals
with no mapped field are simply not written.

## Create a new configuration

Each configuration is a dedicated bridge between one CRM source and one cloud partner network.

1. Go to [Fours Settings](https://console.suger.io/settings).
2. Choose "Co-Sell" in the submenu, and click the `New Config` button.
  > <img src="/img/cosell/configuration/create_new_configuration.png" alt="New Config button in the Co-sell settings menu" style="max-width:880px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />
3. Choose the **CRM Partner** and the **Cloud Partner** to proceed.

   | Picker | Options |
   | --- | --- |
   | **CRM Partner** | `SALESFORCE`, `HUBSPOT`, `DYNAMICS365` |
   | **Cloud Partner** | `AWS`, `AZURE`, `GCP`, and `SUGER` |

   Each picker lists only the partners your organization has actually connected, so a CRM or
   cloud you have not integrated does not appear. `SUGER` is offered as a cloud partner only
   when Partner Management (PRM) is enabled for your organization.

:::warning
Only one active configuration is allowed per hyperscaler (e.g., one for AWS, one for GCP). You can't run two AWS configs side by side, even across different CRMs. To change an existing configuration, edit it rather than creating a second one.
:::

![A sample Settings > Co-sell page with all configurations](images/set-up-co-sell-in-settings-3.png)

## Outbound Setting
The Outbound Sync section defines the data flow **from your CRM platform to Cloud Partners**, indicating that information is pushed outward from the CRM system.

### Field Mapping
Field mapping configuration is used to control how fields are pre-filled when you create a new referral share from CRM to Cloud Partners. If the auto-share referrals setting is turned on, this configuration will be applied to all automatically shared referrals.

It also affects the Suger Connector in CRM software.

In the configuration table, the title of each row represents the field name in the Cloud Partner. You can use the search dropdown to select which CRM field should be mapped to it.
You can add or remove Cloud Partner fields to customize your own mapping rules.

Some fields may be marked with an asterisk (*), which means they are required fields and must be filled in before submission.

Use **Picklist Value Mapping** (if available) or **Expression Mode** to define complex data-mapping rules, including conditional logic, value conversions, and cross-field mappings.

See the related section for detailed documentation and examples.

For each partner field, choose one of four mapping methods:

| Mapping Method | Use case | Example |
| --- | --- | --- |
| **Default Value** | A hard-coded value sent for every referral. Best for information that's mandatory for the partner but identical across your company — Partner ID, alliances team alias, sales-lead email, listing ID. | `Sales_Lead_Email` → `alliances@company.com` |
| **Direct & Picklist Mapping** | Links a CRM field 1:1 to a partner field. For dropdowns, map every active CRM value to a partner-approved value. Best for standard fields like Close Date, or aligning deal stages to partner stages. | `Opportunity.CloseDate` → `Partner.Target_Close_Date` |
| **Expression Mode** | A dynamic logic engine using Go Templates (`text/template`) syntax — calculations, concatenations, fallbacks, and cross-field lookups. | `{{- multiply .Amount 0.8 -}}` (net revenue) or `{{.Name}} {{.Account.Name}}` (unique title) |
| **AI Generate** | Describe the value you want in a natural-language prompt and Fours generates it with AI when the referral is shared. You can reference source fields with `{{.FieldName}}`. Available on five supported AWS ACE fields: Industry Vertical, Partner Primary Need from AWS, Postal Code, Customer Business Problem, and Estimated AWS Monthly Recurring Revenue. | `Write a business problem statement based on {{.Description}}` |

:::info
For the **Customer Business Problem** field, Fours automatically instructs the AI to produce 500–1,800 characters and truncates any output over 1,800 characters. The built-in rule takes precedence over any other length guidance in the AI prompt.
:::

:::warning
You must map every active CRM stage (e.g., "Discovery") to a partner-approved value (e.g., "Prospecting"), or the sync will fail during stage transitions.
:::

![Picklist value mapping between CRM stages and partner stages](images/understand-the-fields-mapping-in-co-sell-2.png)

### Sync Fields

The Sync Fields configuration controls **whether Fours will update an item to Cloud Partners at the next scheduled sync time** when a corresponding field value changes in the CRM.

To enable syncing for a specific field, turn on the **Enable Syncing** toggle on the right side of the field.

> <img src="/img/cosell/configuration/enable_syncing.png" alt="Enable Syncing toggle in the Sync Fields table" style="max-width:880px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

You can configure the following options:

* **Conditional sync with Expression Mode:** Click the {} icon next to a field to enable Expression Mode, which allows you to define **conditional synchronization rules** based on custom logic. Refer to the section below for details on using Expression Mode.
* **Picklist values mapping:** Use this feature to define custom value mappings between CRM and Cloud Partner fields. Refer to the related section below for details on using Picklist values mapping.
* **Add a Cloud Partner field:** Scroll down the page and search for a field name under the selected Cloud Partner in the lower-left panel. Click the field to add it to the configuration list.

> <img src="/img/cosell/configuration/add_field.png" alt="Adding a Cloud Partner field to the sync configuration" style="max-width:880px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

### Settings
The referral automation settings allow you to automatically manage the referral sharing workflow from your CRM to Cloud Partner.

![A sample co-sell configuration with both Auto-Enrich and Auto-Share toggles enabled](images/set-up-co-sell-in-settings-5.png)

#### Auto-Share Referrals

Automatically share all eligible opportunities from your CRM to Cloud Partner.
When this option is enabled, any opportunity that meets the sharing criteria will be submitted without manual action.

:::info
**Auto-share runs every 3 hours.** This cadence is fixed and identical for every cloud
partner — there is no per-configuration schedule to set. An opportunity that becomes
eligible between runs is picked up on the next cycle.
:::

##### <img src="/img/salesforce.svg" alt="" style="width:24px;display:inline;margin-right:4px" /> Salesforce Only – Conditional Criteria Setting

The **Criteria** field under **Auto-Share Referrals** narrows auto-share to the records you
want. Only records that meet the condition are included in the next auto-share cycle.

You can express that condition two ways, using the segmented tabs at the top of the
Criteria editor:

| Tab | What you get |
| --- | --- |
| **Builder** | A visual condition tree — pick a field, an operator, and a value, and combine rows with AND / OR groups. No SOQL syntax to remember. |
| **Advanced (SOQL)** | The raw **Salesforce SOQL** predicate, evaluated in the context of the selected Salesforce object. |

:::note
The two tabs are two views of **one** value. Whatever you build visually is saved as the
SOQL string — the visual tree itself is never stored. When you reopen the configuration,
Fours re-parses the saved SOQL back into the Builder.
:::

Some SOQL cannot be represented as a visual tree — subqueries, function calls, and unary
`NOT`. When Fours cannot parse the saved predicate it keeps you on the **Advanced (SOQL)**
tab and shows: *"This query can't be edited in the Builder — keep it in Advanced (SOQL)."*
The predicate still works; it just has no Builder equivalent.

**Operators available in the Builder**

The operator list depends on the type of the field you pick:

| Field type | Operators |
| --- | --- |
| **String / picklist** | `=`, `!=`, contains, not contains, starts with, not starts with, ends with, not ends with, is blank, is not blank, `IN`, `NOT IN` |
| **Number / date / datetime** | `=`, `!=`, `>`, `<`, `>=`, `<=` |
| **Boolean** | `=`, `!=` |

**Date values** can be entered two ways:

| Mode | What you pick |
| --- | --- |
| **Absolute** | A specific date from the calendar picker. |
| **Relative** | A rolling Salesforce date literal: `TODAY`, `YESTERDAY`, `LAST_N_DAYS:7`, `LAST_N_DAYS:30`, `LAST_N_DAYS:90`, `LAST_90_DAYS`, `NEXT_90_DAYS`, `THIS_QUARTER`, `THIS_MONTH`. |

Use Relative when you want the window to move with time — for example, opportunities
created in `LAST_N_DAYS:30` stays current without editing the criteria each month.

**How Advanced (SOQL) is evaluated:**  
Fours embeds your predicate into a SOQL query.

- By default, `<SalesforceObject>` is **Opportunity**. Other object can also be used by calling object name.
- For SOQL syntax and operators, refer to the [official guide](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm).
- Field availability: **Salesforce → Setup → Object Manager → \<Object\> → Fields & Relationships**.  Use the **Field Name**.

:::note
* Field names must match CRM field names exactly (case-sensitive).
* Use **single quotes** for strings. 
* Invalid syntax will cause the auto-share to fail.
* Use the **Preview matches** button to check which records match the current criteria before saving changes.
:::

**Preview matches**

Click **Preview matches** to run the current criteria against Salesforce without saving.
The **Opportunities matching your criteria** panel lists what came back, with one row per
opportunity:

| Column | What it shows |
| --- | --- |
| **ID** | The Salesforce opportunity ID |
| **Name** | The opportunity name |
| **Stage** | The current Salesforce stage |
| **Amount** | The opportunity amount |

An empty result means the criteria matches nothing right now — worth checking before you
enable auto-share and wonder why nothing is being shared.

##### <img src="/img/hubspot.svg" alt="" style="width:24px;display:inline;margin-right:4px" /> HubSpot Only – List Setting
The Segment feature in HubSpot (previously called List) can be used as a **sync filter**.

To apply this filter, search for and add the **Segment ID** (also referred to as List ID) to include only items belonging to that segment in the sync process.

See [HubSpot documentation](https://knowledge.hubspot.com/segments/create-active-or-static-lists) for more details.

You can find the Segment ID in:
**HubSpot → CRM → Segments → \<Segment Name\> → Details → ILS Segment ID**

---

#### Auto-Enrich Referrals

Save time and improve data quality by automatically filling in missing company and contact information when sharing referrals with Cloud Partners.
The Auto-Enrich feature uses **Fours AI** to complete incomplete records, ensuring your referrals contain all necessary details for successful partner engagement.

:::note
Auto-Enrich fills blank **referral** fields at share time. It is a different feature from
**CRM intelligence-signal enrichment**, which writes engagement and marketplace signals
into your CRM records on a schedule — see
[Three different "enrichment" features](#three-different-enrichment-features).
:::

##### How It Works
When you preview or prepare a referral before sharing it with a Cloud Partner, **Fours AI** automatically enriches missing data such as company address, website, and contact information.
This process runs seamlessly in the background — you’ll see the updated information directly in your preview.

Only empty fields are enriched; existing data in your CRM remains unchanged.

##### Minimum Information Required
For enrichment to work effectively, your CRM record must contain at least:

**Company information:**
- Company name, or
- Company website/domain

**Contact information:**
- Contact email address, or
- Contact first and last name (with company information)

If these fields are missing, Fours AI cannot retrieve additional information for that record.

##### What Fields Can Be Enriched

| Cloud Partner | Company Information | Contact Information |
|----------------|--------------------|---------------------|
| **AWS** | Company name and website<br/>Full address (country, state, city, postal code)<br/>Industry classification | Email address<br/>First and last name<br/>Job title |
| **Azure** | Company name<br/>Full address (country, state, city, street address, postal code) | Email address<br/>First and last name<br/>Job title |
| **GCP** | Organization name and domain<br/>Full address (country, state/province, city, street, postal code)<br/>Industry classification<br/>Region and employee count | Email address<br/>First and last name (given name and family name) |


:::note
- Only empty fields are enriched; existing CRM data is never overwritten.
- Enrichment accuracy depends on available company and contact data.
- Some fields may vary by partner integration.
:::

---

#### Auto-Delete Referrals

Enable Auto-Delete to automatically remove referrals that are rejected by **the Cloud Partner**.

When this option is turned on, once a referral is rejected, Fours will delete the corresponding **opportunity/deal** in your CRM and soft-delete the referral in the Fours Console.

By default, soft-deleted referrals are **hidden from view** and **cannot be reused or referenced**.

---

#### Auto-Link Referrals (AWS only)

Auto-Link attaches an accepted AWS Marketplace private offer to the AWS referral for the same deal,
so the ACE opportunity records the offer the deal transacted through. It is switched on for your
whole organization, on the AWS ACE integration rather than in this configuration: in
**Settings > Integrations**, click **Edit** on your AWS ACE integration and turn on
**Auto-Link Referrals**. It works only on an ACE integration that uses the Partner Central API.

> <img src="/img/cosell/funding/ace_enable_funding_application.png" alt="Edit Integration dialog for AWS ACE (Partner Central API), with the Auto-Link Referrals switch turned on at the top, above Auto-Accept Referrals and the other ACE switches" style="max-width:512px;width:100%;display:inline;margin:0 auto;box-shadow:5px 5px 5px #eee" />

An offer and a referral belong to the same deal when both carry the same Salesforce opportunity,
HubSpot deal, or Dynamics 365 opportunity. Fours links them:

- **When the buyer accepts the offer**, if the matching referral is already in Fours.
- **Every 4 hours**, for any accepted offer that is still unlinked — for example because its
  referral reached Fours after the offer was accepted, or because the link was removed.

```d2
direction: down
accepted: "Buyer accepts the AWS\nMarketplace private offer"
run: "Every 4 hours:\naccepted offers still unlinked"
match: "Approved AWS referral\nfor the same deal?" { shape: diamond }
wait: "Not linked yet —\nthe next run tries again"
has: "ACE opportunity already\nhas an offer?" { shape: diamond }
keep: "Left as it is"
linked: "Offer linked to the\nACE opportunity"
accepted -> match
run -> match
match -> wait: "no"
match -> has: "yes"
has -> keep: "yes"
has -> linked: "no — at any ACE stage"
```

A referral can be linked when its AWS review status is **Approved** and no offer is linked to it
yet, **at any ACE stage, including Launched**: sellers often launch the opportunity before the
buyer accepts the offer, and AWS accepts the link. Each accepted offer is linked to one referral
at most, and a CPPO resale authorization you issue to a channel partner is never linked. When the
ACE opportunity already has an offer, Fours leaves it as it is.

Because the 4-hour run links any matching accepted offer that is still unlinked, a link that is
removed — in AWS Partner Central, or with **Unlink Offer** — is made again by a later run once
Fours has synced the removal, for as long as Auto-Link is on.

:::note
Changing the linked offer **by hand** follows the same rules. **Link Offer** and **Unlink Offer**, on
the referral's [AWS Marketplace transactions](/cosell/cosell-ace-fields/#aws-marketplace-transactions)
tab, work once the referral's review status is **Approved**, at **any** stage — including **Launched**
and **Closed Lost**. (**Approved** is the AWS-native review status, not Fours' unified status — see
[Status & Stage](/cosell/cosell-status/) for the mapping.) The offer you link must belong to the AWS
account your ACE integration is connected as, or carry no seller account of its own; an offer from
another of your AWS Marketplace accounts is refused with a message naming both accounts.
:::

## Inbound Setting
The Inbound Sync section defines the data flow **from your Cloud Partners to the CRM platform**, indicating that information is sent to the CRM system. Fours continuously applies updates and changes made by Cloud Partners to the corresponding records in your CRM.

In the Inbound Sync configuration, each tab (such as Opportunity, Opportunity(Salesforce)/Deals(HubSpot), Account(Salesforce)/Companies(HubSpot), and Contacts) represents an object that will be synchronized.
When a new referral is received from a Cloud Partner, Fours automatically maps and writes the referral data into the corresponding fields of these CRM objects based on your field mapping configuration.

The Settings tab defines general sync behaviors, while all other tabs specify which CRM objects and fields the inbound data should be populated into.

:::note
Inbound sync runs for AWS, Azure, and GCP. See [Referral Syncing](/cosell/cosell-syncing/) for how
often each partner's inbound sync runs.
:::

### Objects Tab  
<p style="font-size:0.9em;color:#666;margin-top:-6px;margin-bottom:10px">
Tab names such as Opportunity (Salesforce) / Deals (HubSpot), Account (Salesforce) / Companies (HubSpot), Contacts, and more.
</p>

Setting in these tabs is to control how fields are pre-filled when you create a new referral share from Cloud Partners to CRM. If the auto-share referrals setting is turned on, this configuration will be applied to all automatically shared referrals.

In the configuration table, the title of each row represents the field name in the CRM. You can use the search dropdown to select which Cloud Partner's field should be mapped to it.
You can add or remove CRM fields to customize your own mapping rules.

Use **Picklist Value Mapping** (if available) or **Expression Mode** to define complex data-mapping rules, including conditional logic, value conversions, and cross-field mappings.

See the related section for detailed documentation and examples.

#### Mapped values your CRM does not accept

A CRM dropdown field accepts only its own options. While you edit an inbound mapping into Salesforce
or HubSpot, for AWS, Azure, or GCP, Fours checks what each field would receive against your CRM's
own field definitions and lists the values it will refuse in a **These values may not reach your CRM** panel.
Each line names the field, the value, and the options the field accepts. It flags:

- a source field mapped straight to a dropdown with no picklist mapping, so the partner's values are
  sent as-is;
- a picklist mapping, a **Default Value**, or an **Expression Mode** expression with no template
  fields, that sends a value the field doesn't have.

The panel is advisory, and you can still save. The usual fix is a
[Picklist Value Mapping](#picklist-value-mapping) that translates the partner's values into the
field's own.

When an inbound sync then writes a referral into your CRM, a value the field can't accept is
**left out of that write** rather than sent. The other mapped fields still land, where before one
refused value could void a whole HubSpot write and leave every mapped field on the deal empty.
Nothing already on the record is cleared.

```d2
direction: right
value: "Mapped value\nfor a CRM field"
check: "Does the field\naccept it?" { shape: diamond }
write: "Written with the\nother mapped fields"
omit: "Left out of this write\nother fields still land\nnothing is cleared"
value -> check
check -> write: "yes"
check -> omit: "no"
```

| CRM | What Fours checks | What it doesn't |
| --- | --- | --- |
| **HubSpot** | Dropdown properties, against the options the property lists. A date property also receives a proper date rather than a raw timestamp. | Properties whose options HubSpot doesn't list, including **Deal Stage**, whose values belong to the pipeline. |
| **Salesforce** | Restricted picklists. An inactive picklist value counts as not accepted. | Unrestricted picklists and text fields, which accept any value. |

Values are matched exactly, with no case folding and no label matching, so translate them with a
picklist mapping rather than relying on a near match.

#### <img src="/img/salesforce.svg" alt="" style="width:24px;display:inline;margin-right:4px" /> Salesforce Only – Add Objects

> <img src="/img/cosell/configuration/add_salesforce_object.png" alt="Adding a Salesforce object to the sync configuration" style="max-width:674px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

When syncing with Salesforce, you can use this field to search for and add more objects to sync, once the related field mappings have been completed. Mapping to custom Salesforce objects is supported, but typically requires a Solutions Engineering request to scope the trigger logic and data flow correctly. This isn't available for HubSpot.

### Setting

#### Auto-Accept Referrals

Automatically accept inbound referrals from **AWS** and **Azure**. Referrals from Google Cloud are never auto-accepted.

Auto-accept is switched on per cloud, on the integration rather than on this page:

- **AWS** — turn on **Auto-Accept Referrals** when you edit the AWS ACE integration. Fours accepts an engagement invitation that is still **Pending** and has not expired.
- **Azure** — turn on **Auto-Accept Referrals** when you edit the Azure Marketplace integration; the switch appears once **Enable Cosell** is on. Fours accepts a referral whose substatus is **Pending**.

Each accept Fours attempts runs as its own workflow, listed under **Metrics → Logs** with the **Auto-accept** workflow type — see [Inbound Sync](/cosell/cosell-syncing/). On AWS the accept goes to ACE, which completes it on its side; on Azure it starts an outbound sync that carries it to Microsoft.

```d2
direction: right
ref: "Inbound referral\nfrom AWS or Azure"
check: "Pending, and\nAuto-Accept on?" { shape: diamond }
manual: "You accept or\nreject it yourself"
run: "Auto-accept run\n(Metrics → Logs)"
aws: "AWS: accept\nsent to ACE"
azure: "Azure: outbound sync\nto Microsoft"
col: "Auto Accepted ✓\n(when it was sent)"
ref -> check
check -> manual: "no"
check -> run: "yes"
run -> aws
run -> azure
aws -> col
azure -> col
```

To see which referrals Fours accepted, add the **Auto Accepted** column from the **Columns** menu of the Cloud Partners referral table; it is hidden by default. A check marks a referral Fours auto-accepted, and hovering it shows when the accept was sent. The check means the accept was sent — the cloud partner confirms it separately. Referrals you accept yourself never get a check, and on Azure an accept gets one only when it started a new sync to Microsoft: if a sync for the referral is already running, or your referral approval holds it, the accept is saved and the run completes without a check.

#### Auto-Delete Referrals

Enable Auto-Delete to automatically remove referrals that are rejected by **YOU (the ISV)**.

When this option is turned on, once a referral is rejected, Fours will delete the corresponding **opportunity/deal** in your CRM and soft-delete the referral in the Fours Console.

By default, soft-deleted referrals are **hidden from view** and **cannot be reused or referenced**.

#### Auto-Sync Contacts

Automatically synchronize contact information received from Cloud Partners to your CRM system.

When enabled, contact details from inbound referrals (such as name, title, email, or phone number) are added or updated in your CRM’s contact records. Set **SyncMode** to "None" if you prefer to manage contacts manually.

:::note
For AWS, contact information typically syncs 10–30 minutes after a referral is accepted, not immediately.
:::

## CRM-Specific Setup

The mapping methods and automations above apply to every connected CRM. A few setup steps are specific to each one.

### <img src="/img/salesforce.svg" alt="" style="width:24px;display:inline;margin-right:4px" /> Salesforce

Before configuring, confirm the Fours Salesforce package is installed and the Integration User is connected in your Fours Console:

- **Integration User access**: Salesforce must be connected to Fours with the **Suger Integrator** permission set, and that user needs **Read** and **Edit** access to any Salesforce fields you intend to map.
- **Widget installation**: The Suger Quick Panel must be added to your **Opportunity** page layout.

When defining outbound field mappings, pay special attention to these Salesforce fields:

- **Owner attribution**: Map `Owner.Email` so the correct sales rep is credited in the AWS/Azure/GCP portal.
- **Customer website**: `Account.Website` is used as the primary key for account matching and Auto-Enrichment.
- **Customer location**: AWS and Azure require valid country codes. Make sure `Billing.Country` is mapped correctly.
- **Close date**: `CloseDate` — partners reject dates in the past or more than two years in the future.
- **ACE IDs**: The `Partner CRM Unique ID` (Opportunity ID) is usually mapped by default and doesn't require manual configuration.
- **Project details**: `Description` maps to "Customer Problem" — the primary field partner managers read.

**Fields on related records.** In the Salesforce field picker, a lookup field — such as the
opportunity's account or its primary campaign source — has an arrow. Open it to list the fields of
the record it points to, and pick one of those to map a value such as `Account.Website` or
`Campaign.Name`; the picker shows each field's path under its name. A lookup opens when it points to
a custom or external object, or to one of these standard objects: Account, Campaign, Case, Contact,
Content Document, Content Version, Contract, Lead, Opportunity, Opportunity Contact Role,
Opportunity Product, Order, Price Book, Quote, Record Type, or User. A lookup to any other object,
such as Opportunity History or Product, lists no fields.

### <img src="/img/hubspot.svg" alt="" style="width:24px;display:inline;margin-right:4px" /> HubSpot

Before configuring, confirm HubSpot is connected and verified under **Settings > Integrations**, and that the Suger App is added to your HubSpot Deal "Default View" (see [Set up the Fours App in HubSpot](/hubspot-app/hubspot-app-configuration/)).

To let Fours record which cloud partners each deal has been shared with, set up a **Referral State** property. The steps below are the short version; [HubSpot → Referral State](/integrations/hubspot/#referral-state) has the full setup and the deal filters it enables.

**In HubSpot — create a property group (if needed):**

1. Go to **Settings**, then **Properties** under **Data Management**.
2. Select **Deal properties** from the object dropdown, then open the **Groups** tab.
3. Reuse an existing group, or click **New Group** and create one.

![HubSpot Deal properties Groups tab](images/configure-co-sell-settings-for-hubspot-1.png)

**In HubSpot — create the property:**

1. On the **Properties** tab, click **New Property**.
2. Confirm the object type is **Deal**, and choose your group.
3. Label the property "Referral State" (or any name you prefer).
4. Set the field type to **Multiple Checkboxes**.
5. Add at least three options whose internal values are exactly **AWS**, **Azure**, and **GCP**, including case — **Verify** checks for those three values.
6. Click **Create**.

**In the Fours Console — register the property:**

1. Go to [**Settings > Integrations**](https://console.suger.io/settings?tab=integrations) **> HubSpot card**, and click **Edit**.
2. In the **Advanced** section, find **Deal Referral State Property**.
3. Enter the property's **Label** (not its Internal Name). If it isn't listed, click the refresh icon to reload it.
4. Click **Verify**, then **Save**.

![Deal Referral State Property field in the HubSpot integration Advanced settings](images/configure-co-sell-settings-for-hubspot-2.png)

5. Back on the HubSpot integration, click **Sync** to populate the referral state on existing deals. This can take several minutes.

:::tip
Once populated, you can filter Co-Sell deals by Referral State: operator **IS NULL** finds deals never shared with a partner; **IS IN** + selected partners finds deals already shared.
:::

**Customer contact.** The default outbound mappings for AWS, Azure, and GCP fill the referral's
customer contact from the deal's contact properties (`contacts.firstname`, `contacts.lastname`,
`contacts.email`, …). A deal can carry several contacts, so Fours reads one. A deal with one
associated company, or none, uses its first contact. When the deal has two or more companies, Fours
reads the first contact on the deal that is associated with the deal's primary company; if none of
the deal's contacts is, Fours leaves the customer contact empty — associate the customer's contact
with the deal's primary company in HubSpot to fill it. See
[Which deal contact becomes the customer contact](/integrations/hubspot/#which-deal-contact-becomes-the-customer-contact).

## Test Field Mapping

Use the <img src="/img/cosell/configuration/test_button.png" alt="Test button for field mapping validation" style="height:28px;display:inline" /> button to verify whether your field mapping configuration works as expected. 

**Test Mapping is available on the Outbound field-mapping step only.** There is no
equivalent test on the Inbound tabs, though they do flag mapped values your CRM will refuse
while you edit — see [Mapped values your CRM does not accept](#mapped-values-your-crm-does-not-accept).
To check anything else about inbound behaviour, watch what an actual inbound referral writes into
your CRM.

The test lists referrals created in your **CRM**, ready to be converted for the cloud
partner. Click any row to inspect its **source data** and the **converted data** mapped to
the target schema. Review each key–value pair to ensure the mapping behaves as expected
based on your configuration.

:::tip
The share page is your sandbox before finalizing any mapping — if data looks wrong or empty there, it'll be wrong in the partner portal. Open any opportunity and click **Share** to catch problems before they reach the partner. See [Outbound Referral](/cosell/cosell-outbound/).
:::

## Picklist Value Mapping

> <img src="/img/cosell/configuration/picklist_value_mapping.png" alt="Stage Name picklist mapping from Salesforce to Microsoft stages" style="max-width:735px;width:100%;display:inline;margin:0 auto;box-shadow: 5px 5px 5px #eee" />

Some fields support Picklist Value Mapping, which allows you to define value correspondences between your CRM and Cloud Partner Platform.

This feature is used to create **simple one-to-one mappings** between different picklist values.

For example, the image above shows a Stage Name mapping where Salesforce stages are mapped to their corresponding Microsoft stages.

In other fields, you may need to enter values manually instead of selecting them from dropdown lists.

Users can add or remove mapping rows as needed to customize how each value aligns between the CRM and Cloud Partner.

### Prevent a duplicate Closed Won

A stage-mapping row can carry an optional **Validation rule** that runs *before* the stage
transition is applied. Today one rule is offered: **Prevent duplicate Closed Won**.

It guards against a deal being counted as won twice — once in one cloud's co-sell portal, and
again in another — when the same CRM opportunity has already transacted elsewhere.

**Where to set it.** In the outbound configuration for **AWS**, open the stage picklist mapping
and find the row whose **target** stage is `Launched` (AWS's closed-won equivalent). A
**Validation rule** dropdown appears next to that row, defaulting to **None**. Set it to
**Prevent duplicate Closed Won**. The dropdown is offered only on that row: it does not appear on
other stage rows, on inbound configurations, or on clouds that do not support the rule.

**What it does.** When a referral is about to move into the guarded stage, Fours looks for an
**accepted offer in a different cloud** — AWS, Azure, or GCP — attached to the *same* CRM record
as this referral. If it finds one, the stage update is **skipped**.

```d2
direction: down
update: "Referral update arrives\nstage moving to the guarded stage"
configured: "Validation rule set on\nthis stage-mapping row?" { shape: diamond }
linked: "Referral linked to a\nCRM opportunity / deal?" { shape: diamond }
lookup: "Look for an ACCEPTED offer\nin another cloud (AWS · Azure · GCP)\non the same CRM record"
found: "Conflict found?" { shape: diamond }
apply: "Stage update applied\nthen synced outbound to the partner"
skip: "Update SKIPPED SILENTLY\nnot saved · not synced outbound\nno error returned"
banner: "Cross Cloud Conflict banner\nshown on the referral"

update -> configured
configured -> apply: "no"
configured -> linked: "yes"
linked -> apply: "no — rule cannot run"
linked -> lookup: "yes"
lookup -> found
found -> apply: "no"
found -> skip: "yes"
skip -> banner
```

Three things are worth knowing about that skip:

- **It is silent.** Nothing is persisted, no outbound sync runs, and **no error is returned** —
  the request looks like it succeeded. The referral simply stays in its previous stage.
- **It needs a CRM link.** A referral not linked to a Salesforce opportunity, HubSpot deal, or
  Dynamics 365 opportunity has no record to match on, so the rule cannot run and the update
  proceeds normally.
- **It is configuration-only.** There is no row action or picklist entry for it in the referral
  list — you enable it here and observe it there.

Because the skip is silent, the referral detail page raises a **Cross Cloud Conflict** banner
naming the conflicting offer. That banner is how you find out. See
[Status & Stage](/cosell/cosell-status/#cross-cloud-conflict) for how to read and resolve it.

## Expression Mode

Expression Mode lets you build advanced field-mapping logic—such as conditional rules, value transforms, fallbacks, and simple calculations—when syncing data between your CRM and Cloud Partner.

### How to enable

Click the `{}` button to the right of a field’s dropdown to switch that field to Expression Mode.

### What you can do
- Conditional mapping (if/else)
- Default/fallback values for empty fields
- String/number transforms and simple calculations
- Cross-field lookups (read one field to populate another)

#### Example — set a default country when empty

The snippet below writes the company country if present; otherwise it uses USA.

```
{{- if .companies.country -}}
  {{ .companies.country }}
{{- else -}}
  USA
{{- end -}}
```

#### Syntax

Expression Mode uses Go Templates (text/template).

**Reference:** https://pkg.go.dev/text/template

#### Validation & troubleshooting
- Invalid template syntax will cause the sync to fail for that field.
- Use the `Test` function to verify output before saving.
- Ensure referenced paths (e.g., .companies.country) exist in your inbound/outbound payload.

:::tip
Expression Mode applies per field. Other fields continue to use their own mapping or expressions independently.
:::

## Sync Timing & History

Once a referral is shared or accepted, Fours keeps it in sync across your CRM, Fours, and the cloud partner for the life of the deal.

- **Outbound syncs** (CRM → partner) run roughly every 6 hours.
- **Inbound syncs** (partner → CRM) run roughly every 3 hours, with new inbound referrals usually detected within minutes.
- You can trigger either sync manually at any time — actions taken directly in the Fours widget (such as sharing a new referral) run immediately rather than waiting on the schedule.

Referrals in an inactive state (Draft, Rejected, Expired, or Deleted) are not synced in either direction. Closed referrals (Closed Won / Closed Lost / Closed Error) are no longer pushed **outbound**, but they still receive **inbound** updates from the cloud partner. If the same field is updated in both your CRM and the partner portal between sync cycles, the most recent change wins — turn off a field's Sync Fields toggle if it shouldn't sync at all.

Click the **History** button on the Co-sell page for a timestamped log of configuration changes, including who changed the mapping logic and when. You can also review sync runs under Metrics > Logs, filtering Workflow Type to Sync.

## Troubleshooting Common Issues

| Issue | Cause | Resolution |
| --- | --- | --- |
| Engagement Scores missing in CRM | Co-sell Intelligence has not been enabled for your org, or your org exceeded its retrieval quota | Contact [support@suger.io](mailto:support@suger.io) to have the signals enabled, then check usage in the **Quotas** tab |
| Can't create a second config for the same partner | Only one active configuration is allowed per hyperscaler | Edit the existing config instead of creating a new one, or deactivate it first |
| "This configuration was modified by another user…" when saving | Two people had the same configuration open and the other person saved first | Reload the configuration to pick up their change, reapply your edit, and save again. Agree who owns a configuration before a joint editing session |
| "This field is already synced by another filler" | Two field fillers both claim sync on the same partner field — a field can be claimed by only one | Remove the duplicate claim: decide which filler should own the field and turn sync off on the other |
| Field empty on the share page | The mapping points to a CRM field that's blank on that record | Populate the missing data in your CRM and reload the share page, or add a Default Value in the configuration |
| Field highlighted in red on the share page | Data validation failure (e.g., text in a date field, invalid country code) | Use Expression Mode to reformat the data, or switch to a source field matching the partner's required data type |
| "unsupported partner: X" | Incorrect capitalization in Expression Mode or Apex actions | Use ALL CAPS for partner references: `AWS`, `AZURE`, `GCP`. In HubSpot, the checkbox option values must also match character-for-character |
| Referral status not updating in HubSpot | The Referral State property Label in Fours doesn't match the property in HubSpot | Re-enter the property's Label (not Internal Name) under **Integrations > HubSpot > Advanced > Deal Referral State Property** |
| Auto-Share failed to trigger | Invalid SOQL predicate (Salesforce) or incorrect ILS Segment ID (HubSpot) | Salesforce: click **Preview matches** to test the criteria, use single quotes for strings. HubSpot: verify the ID matches the ILS Segment ID in Segment details |
| Sync failed after a stage change | A CRM stage was moved to a value not defined in Picklist Mapping | Locate the Stage field in the configuration and map every active CRM picklist value |
| Enrichment didn't fill fields | Missing a valid company website or domain on the CRM record | Populate the Website field on the Account/Company record — Fours uses it as the enrichment primary key |
| A change hasn't appeared yet | Waiting on the scheduled sync | Outbound runs roughly every 6 hours, inbound roughly every 3 hours. Trigger a manual sync if you need it sooner |
| Referral shows "Create Failed" / "Update Failed" | Sync error | Hover over the status in the referral list, or open the referral's detail page, for the specific partner error message |
| After an inbound sync, one mapped field stays empty on the CRM record while the others fill | The partner's value isn't one the CRM field accepts, so Fours left it out of the write | Check the mapping's **These values may not reach your CRM** panel, then add a [picklist mapping](#picklist-value-mapping) that translates the value. See [Mapped values your CRM does not accept](#mapped-values-your-crm-does-not-accept) |
| "Couldn't load HubSpot fields" or "Couldn't load Salesforce fields" on an AWS configuration | Fours could not read your CRM's field list — usually the CRM connection needs to be reauthorized | Reauthorize the CRM under **Settings > Integrations**, then reopen the configuration. Until then the rest of the mapping still shows, but the CRM field pickers are empty |
| "Couldn't load this configuration" or "Couldn't load this field mapping", and **Save** is disabled | The saved mapping didn't load, so the form on screen isn't your real mapping | Reload the page. **Save** stays disabled so an empty form can't overwrite the mapping you saved |
| No leads arrive from lead enrichment | Automation is off, the sync filter matches nothing, the mapping predates the Account source, or the matching Accounts can't be submitted | Check the readiness panel and **Validate** in the lead-enrichment mapping, then **Metrics > Logs**. See [Create Leads from Salesforce Accounts](/cosell/cosell-leads/#create-leads-from-salesforce-accounts) |

## Frequently Asked Questions

**Q: Why isn't the Engagement Score showing in my CRM?**
Either Co-sell Intelligence has not been enabled for your organization, or your organization has exceeded its retrieval quota. Co-sell Intelligence signals are enabled by Fours, not by your team — contact [support@suger.io](mailto:support@suger.io) to have them switched on, and check your usage in the **Quotas** tab.

**Q: A score shows in the Fours widget, so why is it empty in my report?**
Check which score you are looking at. The **Suger Predicted Engagement Score** in the Fours widget is Fours' own prediction, calculated for display and stored against the customer's domain rather than on the referral — so it is blank in reports, list views, formula fields and automation. Only the partner's own score for that opportunity, shown on the referral as **Engagement Score**, is written to the record. A blank report column means AWS has not scored that opportunity yet. See [Co-sell Insights](/cosell/co-sell-insights/).

**Q: How do I turn Co-sell Intelligence signals on or off myself?**
You can't — the enable toggles are managed by Fours and are not exposed in your **Settings > Co-sell** page. Contact [support@suger.io](mailto:support@suger.io) with which cloud partners you want covered.

**Q: What happens if I delete a Co-sell configuration?**
Deletion is immediate and permanent. All associated mapping logic and access tokens are removed, with no way to recover it.

**Q: How do I handle fields with different names in different CRMs?**
Co-Sell configuration is unique per hyperscaler. You define the logic once for AWS pointing to Salesforce fields, and once for AWS pointing to HubSpot fields — full flexibility per CRM.

**Q: Does Fours support currency conversion in Expression Mode?**
Yes. Since some partners (like AWS) require revenue in specific currencies, you can write an expression that multiplies your CRM amount field by a conversion rate before it's sent to the partner.

**Q: What happens if I move a deal to a CRM stage I haven't mapped?**
The sync will fail for that update. Every active stage in your CRM should be mapped to a partner-approved value in Picklist Mapping.

**Q: Can I map data from custom objects instead of standard Opportunity/Deal objects?**
Mapping to custom Salesforce objects is supported, but typically requires a Solutions Engineering request to scope the trigger logic and data flow. This isn't available for HubSpot.

**Q: Will Auto-Enrich overwrite data my sales reps have already entered?**
No. Enrichment only populates fields that are currently empty. If a field already has data, Fours treats your CRM as the source of truth and skips it.

**Q: Can I automate deal sharing for only a subset of my team?**
Yes. Use Auto-Share criteria — the Builder or Advanced (SOQL) for Salesforce, Segments for HubSpot — to limit automation to specific owners, regions, or product lines. Use **Preview matches** (Salesforce) to verify which records currently match before enabling it.

**Q: Why does a referral status show as "Expired"?**
A referral enters Expired when it isn't approved or rejected within the partner's time limit. This applies to AWS and Azure; GCP has no documented Expired state.

**Q: Where can I see why a referral failed to sync?**
Hover over a **Create Failed** or **Update Failed** status in the referral list, or open the referral's detail page, for the specific error message from the cloud partner. Some failures leave the status unchanged and put a red **!** on the status tag instead; hover over it for the reason. See [Failures that don't change the status](/cosell/cosell-status/#failures-that-dont-change-the-status).

**Q: Do Fours roles (Admin, Editor, Viewer) inherit from Salesforce or HubSpot?**
No. Fours roles are console-specific and don't inherit from CRM profiles or roles. Manage Fours permissions under **Settings > Users & Roles**.

:::info
For the unified Fours Status lifecycle and how it maps to each partner's native statuses and stages, see [Status & Stage](/cosell/cosell-status/).
:::
