Organization sinks
Maintain company records with community member counts, activity, and tags.
Overview
An organization sink writes company records. Each derived organization becomes a HubSpot Company, Salesforce Account, or warehouse or spreadsheet row. Account teams can see community counts, first-seen dates, and recent activity in their existing system.
Organization sinks use the same setup sequence as person sinks. They start disabled and require verification before activation. Testing checks one record; backfill writes existing organizations.
Organization sinks share connections with person sinks. For example, one HubSpot connection can write both contacts and companies.
Sinks use Datum’s organization ID as the record key. HubSpot’s default domain matching and Salesforce’s website matching could combine company records using Datum’s evidence alone. Datum sends the domain as an ordinary property instead.
Configure
| Write to | What it writes | Keyed on |
|---|---|---|
| HubSpot companies | One Company per organization | ocmgr_organisation_id |
| Salesforce accounts | One Account per organization, using an external ID field | OCMGR_Organisation_Id__c |
| Snowflake organizations | One row per organization | organisation_id |
| Postgres organizations | One row per organization, with insert or update on conflict | organisation_id |
| S3 organizations | One JSON line per organization, with a version | organisation_id |
| Google Sheets organizations | One row per organization in a separate tab, using column A for the ID | organisation_id |
The Salesforce mapping writes Accounts only. It does not change a Contact’s Account. This prevents Datum from reorganizing your CRM relationships.
Postgres uses public.ocmgr_organisations by default. Snowflake uses PUBLIC.OCMGR_ORGANISATIONS. One connection can therefore support both person and organization sinks.
Set organisations_table if your person table uses a custom name:
ocmgr connection update <connectionId> --config '{"organisations_table":"ocmgr_organisations"}' --json
Datum rejects a connection that would put people and companies in the same table. Organization deliveries wait until you correct the configuration.
Instances that block private network access reject Postgres and S3 sinks. Snowflake uses Datum’s SQL API adapter and supports public Snowflake endpoints on hosted instances. These rules apply to both organization and person sinks.
Basics
Create one
- Open Settings → Destinations.
- Open Add destination.
- Choose CRM sync or Warehouse sync.
- Select an organization mapping in Write to.
- Select every organization in About.
The available changes are a new organization, a changed organization and one that stopped being derived. Companies cannot belong to segments. Organization sinks support every organization or a saved organization filter. See Choose which companies.
Organization rows display organizations. Person rows display people.
Verify creates the organization ID property and other ocmgr_ company properties in HubSpot when permissions allow. Salesforce requires manual field creation:
- Open Setup → Object Manager → Account → Fields & Relationships in Salesforce.
- Create a Text(80) field named
OCMGR_Organisation_Id__c. - Select External ID.
- Select Unique.
- Create the other
OCMGR_fields that the mapping writes. - Run Verify again.
Enter an organization’s ID or key, such as domain:acme.io, to test the sink.
Choose Send one organization.
Choose which companies
In the app, use these steps before you create the sink:
- Set the audience of the sink to Organizations matching a filter.
- Build the filter.
- Select Preview audience to see how many organizations match.
This example selects organizations with at least three community members. REST and MCP wrap the filter tree inside filter.filter:
ocmgr sink create "Accounts → HubSpot" --mapping hubspot-companies \
--connection <connectionId> \
--filter '{"field":"organisation.members","op":"gte","value":3}' --json{ "name": "create_sink", "arguments": { "name": "Accounts → HubSpot", "mapping": "hubspot-companies", "connection_id": "<connectionId>", "filter": { "filter": { "field": "organisation.members", "op": "gte", "value": 3 } } } }curl -X POST "$OCMGR_URL/v1/sinks" -H "Authorization: Bearer $OCMGR_API_KEY" \
-H 'content-type: application/json' \
-d '{"name":"Accounts → HubSpot","mapping":"hubspot-companies","connection_id":"<connectionId>","filter":{"filter":{"field":"organisation.members","op":"gte","value":3}}}'| Field | In the app | Type | Example |
|---|---|---|---|
organisation.search |
Name, domain or alias | text | {"field":"organisation.search","op":"contains","value":"acme"} |
organisation.corporate |
Corporate domain | boolean | {"field":"organisation.corporate","op":"is","value":true} |
organisation.key |
Organization key or id | list | {"field":"organisation.key","op":"any_of","value":["domain:acme.io"]} |
organisation.members |
People in this community | number | {"field":"organisation.members","op":"gte","value":3} |
organisation.activity_90d |
Activity (90 days) | number | {"field":"organisation.activity_90d","op":"gt","value":0} |
organisation.kind |
Derivation | enum | {"field":"organisation.kind","op":"any_of","value":["email_domain"]} |
organisation.domain |
Domain | text | {"field":"organisation.domain","op":"is","value":"acme.io"} |
organisation.tags |
Tags | list | {"field":"organisation.tags","op":"any_of","value":["customer"]} |
organisation.first_seen |
First seen | date | {"field":"organisation.first_seen","op":"within_last","value":{"days":90}} |
organisation.last_seen |
Last seen | date | {"field":"organisation.last_seen","op":"not_within_last","value":{"days":180}} |
A new condition in the app starts as Organization key or id; choose another field from the picker. The picker also shows empty Contacts and Activity columns, which don’t apply to organizations.
The filter fields above work in the app, CLI, MCP, and REST API. Editing a sink in the app preserves its filter.
Enrichment headcounts do not support filtering. Most workspaces lack these values, so such a filter could exclude every organization without an obvious reason.
What each company carries
| Field | Meaning |
|---|---|
organisation_id |
Datum’s record key |
key |
domain:acme.io or github:acme, stable across rebuilds |
kind, name, domain, github_login |
The derivation method and organization identifiers |
members |
Community members who work there, excluding your staff |
activity_90d |
Their activity in the last 90 days |
first_seen, last_seen |
Their first and most recent activity |
tags |
Your organization tags |
employees |
The headcount from your enrichment provider, when available |
The members field counts community members, not all employees. Sinks never write members or employees to a CRM’s standard employee count field. Personal data settings do not change these fields. But they decide whether Datum sends a one-person organization at all. Mappings can also include organization custom fields.
Counts always exclude your staff. Sinks never send companies that contain only your staff. An organization that becomes staff-only dissolves.
One-person organizations
A personal domain such as ada-lovelace.com becomes an organization named “Ada Lovelace”, and its domain is part of one person’s email address. When personal data in events is off (the default), organization sinks do not send an organization with at most one community member. Your staff and erased members do not count.
The delivery shows as skipped with the reason personal_organisation. Datum does not create a company record without a name, for two reasons:
- Its name belongs to that person, and the personal data setting decides whether a person’s details leave Datum. With the setting on, Datum sends the organization, and its dissolve also clears the name.
- HubSpot would create a blank company, and Salesforce rejects an account without a name.
The company record appears when a second community member joins. The person’s own contact record still shows their organization. A company that drops from two members to one keeps its last record until it dissolves.
To send one-person organizations too, turn on personal data in events and run a backfill. That setting also sends email addresses in events and member sinks.
When an organization dissolves
An organization dissolves when Datum can no longer derive it. Its last member might leave, its domain might become a recognized freemail provider, or a rebuild might no longer produce it.
Datum announces organisation.dissolved. Every organization sink that previously sent it performs its dissolve action:
- HubSpot and Salesforce clear the key property and set the community count to 0. They preserve every other property, including your team’s entries, unless the organization had only one community member.
- Warehouses and Sheets keep the row’s key and mark it
dissolved. Google Sheets also sets its community count to 0.
Dissolution reaches disabled and archived sinks. This prevents old company records from reporting community members who have left.
One-person organizations
When personal data in events is on, sinks send one-person organizations, so a record named “Ada Lovelace” can reach your CRM. The last time that the sink sent the organization, it possibly had at most one community member. In that case, its dissolve also clears the fields that could name the person:
- HubSpot clears
name,domain,ocmgr_keyandocmgr_github. - Salesforce sets
NametoRedacted, because an account requires a name, and clearsWebsite,OCMGR_Organisation_Key__candOCMGR_Github__c. - Warehouses and Sheets set
organisation_key,name,domainandgithub_loginto null. The row keeps itsorganisation_id.
A company that had two or more community members when the sink last sent it keeps its name. For a tagged company whose count fell to 0, Datum uses the send before the last one. A count of 0 does not show whose name it is.
A tagged organization never dissolves. Its community count becomes 0, and the sink receives an update. The record shows that you still track the company, although no community members work there.
Remove the tag to allow dissolution during the next rebuild.
Organizations have no erasure or merge operation. Erasing a person updates the company records that Datum derived from that person.
From your terminal or agent
ocmgr sink create "Accounts → HubSpot" --mapping hubspot-companies \
--connection <connectionId> --json
ocmgr sink verify <sinkId> --json
ocmgr sink test <sinkId> domain:acme.io --json
ocmgr sink deliveries --organisation <organisationId> --json{ "name": "send_sink_test", "arguments": { "sink": "<sinkId>", "organisation_id": "domain:acme.io" } }curl -X POST "$OCMGR_URL/v1/sinks/<sinkId>/test" -H "Authorization: Bearer $OCMGR_API_KEY" \
-H 'content-type: application/json' -d '{"organisation_id":"domain:acme.io"}'The ocmgr sink backfill command processes 500 organizations per page. See create_sink and send_sink_test for every parameter.
FAQ
Do I need a second HubSpot or Salesforce connection?
No. Company and contact mappings use the same connection.
Why did a company's community headcount drop after a backfill?
Counts exclude your staff. The next update corrects any company count that previously included staff. A backfill corrects all company counts.
Why was a company with one community member skipped?
Its name and domain might belong to that one person. Organization sinks send it once a second member joins, or when you turn on personal data in events. See One-person organizations.
Can an organization sink use a segment?
No. Segments contain people. Use an organization filter such as organisation.members.
What happens when I alias one organization to another?
Every sink that sent the alias dissolves its record. The canonical company includes people from both organizations. Removing the alias restores the separate organization.