# Referral Syncing

Keep your referrals up to date across your CRM and cloud partners — automatically.

---

## Overview

After you share an opportunity or accept an inbound referral, Fours keeps that referral **continuously in sync** across three systems — your **CRM** (Salesforce, HubSpot, or Dynamics 365), **Fours**, and the **cloud partner** (AWS, Azure, or GCP) — for the entire life of the deal.

A change made in one place is automatically reflected in the others, with no manual re-entry. Syncing runs in the background on a regular schedule, and you can also trigger it on demand.

```d2
direction: down
crm: "Your CRM\nSalesforce · HubSpot · Dynamics 365"
suger: "Fours\nthe referral record"
partner: "Cloud partner\nAWS ACE · Azure · GCP"

crm -> suger: "outbound sync\nscheduled every ~6h\n(7-day modified window)"
suger -> partner: "outbound push\nsame run"
partner -> suger: "inbound sync\nscheduled every ~3h"
suger -> crm: "inbound write-back\nsame run"

group: "Real-time partner events" {
  eb: "AWS EventBridge"
  ps: "GCP Pub/Sub\nCREATED and UPDATED"
}
eb -> suger: "immediate re-sync"
ps -> suger: "immediate re-sync"
```

:::info
Syncing is different from **sharing** and **accepting**, which create a referral in the first place. See [Outbound Referral](/cosell/cosell-outbound/) and [Inbound Referral](/cosell/cosell-inbound/) for those steps. This page covers what happens _afterward_ — keeping the referral up to date.
:::

## Where to Find Everything

The co-sell page is organized as a row of tabs. What you see depends on which CRMs your
organization has connected:

| Tab | Contents |
| --- | --- |
| **Salesforce** | Your Salesforce opportunities and their referrals. Shown when Salesforce is connected. |
| **HubSpot** | Your HubSpot deals and their referrals. Shown when HubSpot is connected. |
| **Dynamics 365** | Your Dynamics 365 opportunities and their referrals. Shown when Dynamics 365 is connected. |
| **Cloud Partners** | Referrals grouped by partner, selected with the chips **AWS · AZURE · GCP · SUGER**. |
| **Metrics** | Sync and workflow reporting — see below. |

One CRM tab appears per connected CRM, so an organization on a single CRM sees one, and
an organization on all three sees three. **Cloud Partners** and **Metrics** always follow
them.

### Metrics sub-tabs

**Metrics** is itself split into three sub-tabs:

| Sub-tab | What it shows |
| --- | --- |
| **Performance** | How your co-sell motion is performing over time. |
| **Actions** | Outstanding actions across your referrals. |
| **Logs** | The per-run record of every sync and workflow, with status, provider, and timestamp. |

Most of the troubleshooting on this page uses **Logs**.

## How Syncing Works

Fours syncs referrals in two directions:

**Outbound — from your CRM to the cloud partner.**
When you update an opportunity/deal in your CRM (for example, the close date, stage, or deal value), Fours pushes those changes out to the cloud partner's co-sell portal. You control exactly which fields are kept in sync from the [Sync Fields](/cosell/cosell-configuration/#sync-fields) configuration.

**Inbound — from the cloud partner to your CRM.**
When the cloud partner updates a referral on their side (for example, the status changes, a stage advances, or new details are added), Fours pulls those changes back into the matching opportunity/deal in your CRM.

Only fields that actually changed are updated. Fours compares the latest values on each side and leaves everything else untouched, so syncing never overwrites unrelated data in your CRM.

## How Often It Syncs

Syncing happens automatically in the background:

- **Inbound** (partner → CRM) — about every **3 hours**. Partner-side changes are usually picked up much sooner: **AWS** and **GCP** deliver event notifications to Fours (AWS EventBridge, GCP Pub/Sub) that trigger an immediate sync of the affected referral, and Fours additionally polls for new **AWS** and **Azure** referrals about every **10 minutes**.
  - **GCP Pub/Sub** now processes `CREATED` events as well as `UPDATED`, so a referral Google originates lands in Fours in near real time instead of waiting for the next scheduled run. A **partner-sourced** `CREATED` event is deliberately skipped — it is either your own outbound create still in flight or one made directly in the GCP console — and is picked up by the scheduled inbound sync instead.
  - **AWS EventBridge** referral events also push the resulting referral straight to the `Suger__Referral__c` mirror in Salesforce, rather than waiting for the next scheduled backfill.
- **Outbound** (CRM → partner) — about every **6 hours**.

To keep scheduled syncs fast, most of them are **incremental** — each run only looks at what changed recently:

- The scheduled **outbound** sync only re-syncs opportunities/deals that your CRM reports as modified within the last **7 days** — based on the record's last-modified timestamp (Salesforce: `SystemModstamp`; HubSpot: `hs_lastmodifieddate`). Exception: if your [Sync Fields](/cosell/cosell-configuration/#sync-fields) configuration was changed within the past **2 days**, the scheduled run performs a **full sync** instead, so the new mappings are applied to every referral.
- The scheduled **inbound** sync window depends on the cloud partner:

| Partner | Scheduled inbound window |
| --- | --- |
| **AWS** | Referrals the partner modified within the last **30 days** (based on the ACE opportunity's `LastModifiedDate`). |
| **Azure** | Referrals modified within the last **24 hours**. |
| **GCP** | Referrals modified within the last **7 days**. The window is deliberately wider than the 3-hour cadence so a missed or failed run heals itself on the next cycle without a manual full sync. |

A [manual sync](#run-a-sync-manually) has no such window — it re-syncs everything.

### The dates on a referral are the partner's dates

**Created Date** and **Last Modified** on the referrals table show the **partner's own timestamps** — what AWS ACE, Microsoft Partner Center and the GCP console show for the same opportunity — not when Fours happened to write the row.

A Fours-internal referral has no partner side, so those rows fall back to Fours' own timestamp. Sorting and filtering follow the same rule, so a descending sort no longer floats rows with no partner date to the top.

The same rule applies in the Console, the [Salesforce referral table](/salesforce-app/salesforce-app-cosell/), and the HubSpot deal card.

## Run a Sync Manually

You don't have to wait for the next scheduled sync. From the co-sell referrals table, open **More actions** — the one dropdown that now holds all three bulk operations:

- **Inbound Sync** — pull the latest referrals and updates from a cloud partner into Fours. Use this if a referral is missing or seems delayed.
- **Outbound Sync** — push your CRM opportunities to the cloud partner's co-sell portal right away.
- **Bulk link opportunities** — *Match referrals to Salesforce / HubSpot.* Matches many referrals to CRM records in one background job, rather than opening each referral and linking it by hand. (Per-referral linking is still available on the lead detail page — see [Leads](/cosell/cosell-leads/).)

The menu hides any option your integrations do not support, and does not render at all when none of the three apply.

Unlike the scheduled sync, a manual sync is a **full sync**: it re-reads the current CRM values of every active referral, with no recent-change window. This makes it the way to push changes the scheduled sync can't detect — such as formula field updates (see [Troubleshooting](#troubleshooting)).

Each option lets you choose the cloud partner (AWS, Azure, or GCP). Once a sync starts, Fours runs it in the background.

**A manual GCP inbound sync takes precedence.** Because the scheduled GCP inbound sync is
incremental, a manual full sync is the only thing that reaches an opportunity that fell outside
the 7-day window — so it is exactly the lever to pull when something is missing. If a scheduled
run is already in flight for your organization, the manual full sync **replaces** it rather than
being dropped. Nothing is lost: a full sync covers everything the replaced run would have, and
the schedule resumes on its next tick.

**AWS leads sync separately.** Leads have their own inbound sync — a manual full sync from the
lead table, and a scheduled run every 3 hours, offset from the referral sync. See
[AWS Partner Central Leads](/cosell/cosell-leads/).

:::note
**Fours partner-to-partner referrals are excluded from Inbound Sync.** A `SUGER` referral
has no external partner system to pull from — Fours already holds both companies' copies
and keeps them in step itself — so it never appears as an Inbound Sync option.
:::

You can check the status of any sync — automatic or manual — in the **Logs** table under **Metrics → Logs**. Set the **Workflow Type** filter to **Sync** for per-referral sync runs, or **Batch Sync** for the scheduled and manually triggered batch runs that process many referrals at once. Each entry shows the run's status (such as _Completed_ or _Failed_), provider, and timestamp.

Set **Workflow Type** to **Auto-accept** to see one run for each AWS or Azure [auto-accept](/cosell/cosell-configuration/#auto-accept-referrals) Fours attempted on an eligible referral; **All** includes these runs too, and searching a referral's name or ID finds them. An AWS accept that errors fails its run and is not retried.

## What Gets Synced

- **Referral fields** — the fields you configured under [Sync Fields](/cosell/cosell-configuration/#sync-fields) (outbound) and your inbound field mappings.
- **Status & stage** — the partner's status and stage are mapped to Fours' unified status. See [Status & Stage](/cosell/cosell-status/).
- **Contacts** — customer contact details are synced into your CRM. For AWS, contact information is shared 10–30 minutes after a referral is accepted; see [Inbound Referral](/cosell/cosell-inbound/).

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.

## Troubleshooting

**My change hasn't appeared yet.** Automatic sync runs every few hours. If you need it sooner, run a manual sync.

**A formula (calculated) field changed in my CRM but never synced.** Salesforce computes formula fields at read time — when a formula's inputs change (for example, a field on the related Account), the opportunity record itself is not modified, so Salesforce [does not update its last-modified timestamp](https://help.salesforce.com/s/articleView?id=005239151&language=en_US&type=1). The scheduled outbound sync relies on that timestamp to detect changes, so formula-only updates are invisible to it — the partner side keeps the old value. To fix: run a manual **Outbound Sync** (a full sync that reads the current formula values), or add a Salesforce Flow that touches the opportunity whenever the formula's inputs change so the scheduled sync picks it up.

**A field changed back to a different value.** When the same field is updated in both your CRM and the partner portal between syncs, the most recent change wins. If a field shouldn't be synced at all, adjust your [Sync Fields](/cosell/cosell-configuration/#sync-fields) configuration.

**A referral shows "Update Failed".** Hover over the status to see the error message, fix the underlying data, and the next sync will retry. See [Status & Stage](/cosell/cosell-status/) for error troubleshooting.

**A CRM change never reached AWS, and the referral shows a red !.** This applies to AWS referrals that AWS has approved or sent back as Action Required. Before pushing a CRM change to AWS, Fours checks it against AWS's update rules for the opportunity's stage. A change that fails the check is skipped: the referral's status and data stay as they were, and a red **!** appears on its status tag, with a reason that starts with `CRM sync rejected:`. Hover over the tag to read it, or open the referral, where the same reason appears in the banner at the top of the page. For example, from *Committed* onwards AWS no longer accepts "Other" as the solution, so moving the deal to *Launched* while "Other" is its only solution is rejected with *Once the opportunity reaches Committed stage or beyond, 'Other' is no longer accepted — please select a valid solution identifier.* To fix it, correct the field in your CRM. The next scheduled outbound sync, or a manual **Outbound Sync**, re-checks the record, pushes the change, and clears the red **!**.

```d2
direction: down
change: "CRM change"
check: "Passes Fours' AWS\nupdate check?" { shape: diamond }
push: "Pushed to AWS"
skip: "Change skipped\nstatus and data unchanged\nred ! with CRM sync rejected: reason"
fix: "Correct the field in your CRM"

change -> check
check -> push: "yes"
check -> skip: "no"
skip -> fix
fix -> check: "next outbound sync"
```

**My CRM deal is Closed Won, but the Fours co-sell is still open.** Fours tried to close the Fours partner-to-partner co-sell as Won, and one of the Close Won checks blocked it. The co-sell's detail page names the reason. See [CRM Closed Won didn't close the co-sell](/cosell/cosell-status/#crm-closed-won-didnt-close-the-co-sell).
