Reference / Sinks

Create a sink

create_sinkocmgr sink createPOST /v1/sinksADMIN

Start writing this community into a CRM, warehouse or analytics project. Amplitude, Segment, Mixpanel and PostHog use reviewed analytics adapters and config.user_key (verified_email by default, requiring events_include_personal_data). Erasures for every non-member_id key, including email and custom-field keys, wait for admin confirmation because vendor deletion also removes the customer’s own product data. Members without a verified address are skipped unless missing_key is member_id. Three things are refused rather than stored, because each would otherwise surface as deliveries that never arrive: a mapping the catalogue does not have, a connection that is not the mapping’s own reviewed piece, and a topic a sink may not subscribe to. It is created **switched off** and should stay off until verify_sink has proved the key property — ocmgr_member_id for CRM and warehouse mappings — exists on the far side; without it every delivery would create a record instead of updating one. filter is who it is about: a segment id, or a saved filter, and {} means the whole community. fields narrows what the mapping declares and can never widen it.

Parameters

namestringREQUIRED

What to call it. Names are how people address a sink.

mapping"amplitude" | "bigquery" | "bigquery-activities" | "bigquery-organisations" | "google-sheets" | "google-sheets-organisations" | "hubspot" | "hubspot-companies" | "mixpanel" | "postgres" | "postgres-activities" | "postgres-organisations" | "posthog" | "s3" | "s3-activities" | "s3-organisations" | "salesforce" | "salesforce-accounts" | "segment" | "snowflake" | "snowflake-activities" | "snowflake-organisations"REQUIRED

Which catalogue mapping to send through: use list_connectors and describe_connector to find the required piece connection and its setup. A crm mapping upserts a record; a warehouse mapping writes a row carrying the key, version and a tombstone flag. An analytics mapping uses its native write-only analytics connection, tracks activities and identifies members, with optional organisation groups. The mapping also decides **who** the sink is about: a member mapping writes one record per person, an organisation mapping one per derived company (hubspot-companies, salesforce-accounts, *-organisations), keyed on the organisation id and never on a domain.

connection_idstring (uuid)REQUIRED

The connection whose stored credential the piece is handed, per call, inside the sandbox. It must be a piece:* connection carrying the mapping’s own piece: a sink writes through reviewed code, and "which code?" is not a question to answer from a row somebody wrote last month.

topics"member.created" | "member.updated" | "member.merged" | "member.split" | "member.redacted" | "organisation.created" | "organisation.updated" | "organisation.dissolved" | "activity.created" | "segment.member_entered" | "segment.member_left"[]

The event topics this sink acts on, from the family its mapping’s subject belongs to — the five member.* ones for a sink about people, the three organisation.* ones for a sink about derived companies. Mixing the two is refused: a mapping has one key, one renderer and one set of actions. Omit it for the whole family, which is what somebody who has not thought about topics yet means. Analytics consumes activity.created and segment changes as well as member changes; optional groups consume organisation changes.

filterobject

Who this sink is about. {} — the default — is the whole community, which is a real answer rather than an oversight.

segmentIdstring (uuid)

Alias for segment_id, matching the read response. Supply only one spelling.

segment_idstring (uuid)

Only members of this segment. A CRM usually wants customers and champions. Refused on an organisation sink: a segment is a list of people, and a company is not in one.

filterany

A saved-filter tree for an audience nobody has made a segment of, in the language of the mapping’s subject: the member vocabulary (ADR 0025), as segments.definition holds one, or the organisation one — {"field":"organisation.members","op":"gte","value":3} is "accounts with three or more people in this community", over organisation.search, organisation.corporate, organisation.key, organisation.members, organisation.activity_90d, organisation.kind, organisation.domain, organisation.tags, organisation.first_seen and organisation.last_seen. Give this or segment_id, never both.

fieldsstring[]

The mapping’s property names this workspace lets travel, narrowing what the mapping declares. Empty — the default — means every field the mapping names. It can never widen a mapping, and it is not the personal-data gate: addresses and URLs also need events_include_personal_data.

configobject
include_titlesbooleandefault false
enabledboolean

Defaults to false and should usually stay there: verify_sink is what proves the key property exists, and only a verified sink may be switched on.

CLI flags

--config <json>

Analytics sink settings (user_key, missing_key, lowercase_email, include_titles, groups, group_type, segment_events)

--mapping <id>REQUIRED

The catalogue mapping, which also decides who the sink is about: hubspot, salesforce, snowflake, postgres, s3, google-sheets write people; hubspot-companies, salesforce-accounts, snowflake-organisations, postgres-organisations, s3-organisations, google-sheets-organisations write derived organisations; amplitude, segment, mixpanel and posthog track activities and identify users

--connection <id>REQUIRED

The reviewed piece or write-only analytics connection holding its credentials

--topics <list>

Comma-separated; omit for the mapping’s own default — every member.* topic for a sink about people, the organisation.* ones its mapping names for a sink about derived organisations

--segment <id>

Only members of this segment

--filter <json>

A saved-filter tree instead of a segment

--fields <list>

Only these of the mapping’s properties; omit for all of them

Also in Sinks