Coming soon · Contract draft

CRM Accounts & Contacts

Planned

A canonical CRM boundary for account/contact identity, relationships, PII controls, notes, imports, and provider mappings.

Reviewable specification — not callable

Documentation-first contract draft. The proposed additions on this page are not callable or available yet. Paths, payloads, scopes, names, and examples are intentionally concrete so customers can review the intended contract before and during implementation.

Canonical owner

RevOps canonical account and contact services

Contract posture

P1 · Documentation first · implementation follows approval

Contract metadata

Draft version

0.2 review draft

Review owner

Commercial/Knowledge + Developer Platform

Last reviewed

July 14, 2026

Target wave

Wave 4 · Commercial lifecycle

Contract dependencies

  • Canonical identity and provider mapping policy
  • Field-level visibility rules
  • Transactional event outbox

What this unlocks

Integrate canonical CRM data

Read a stable domain model for crm accounts & contacts without depending on GUI routes or database shapes.

Control PII fields

Create a reviewable proposal and apply only the bounded commands the canonical owner permits.

Reconcile provider identity

React to durable lifecycle facts and connect external systems with explicit direction and provenance.

Lifecycle and invariants

CRM Accounts & Contacts exposes a bounded lifecycle with explicit commands and named authority at every transition.

activemergedarchived
FromToCommandAuthority
activemergedMerge duplicateCanonical CRM services
activearchivedArchive recordCanonical CRM services

Lifecycle invariants

  • Provider IDs never replace canonical IDs.
  • PII fields are separately visible and auditable.

Authority boundaries

The interfaces expose canonical capabilities; they do not become a second owner of domain rules or state.

DigitalStack owns

  • Canonical account/contact identity
  • Relationship and merge history
  • Field-level visibility and provider mapping

Explicitly not building

  • Provider IDs as canonical IDs
  • Unscoped PII search
  • Silent merges by an agent

Surface decisions

Deliberate additions, retained boundaries, and removals from the proposed external contract.

add

Canonical CRUD, search, notes, merge, import, and provider mapping

Commercial integrations need stable identity and relationships.

keep

Field-level PII controls and immutable merge history

CRM usefulness must not weaken privacy or traceability.

remove

Unscoped PII search and silent provider-driven merges

Neither is compatible with tenant isolation and canonical identity.

Interface plan

REST API

Planned

Versioned crm accounts & contacts resources, commands, idempotency, and operation status.

Reads + explicit commands

GraphQL

Planned

Composable Account reads with mutations delegated to the same canonical domain service.

Composable reads + bounded delegated mutations

MCP / Agent API

Planned

Bounded read, draft, and confirmed apply tools with evidence and audit attribution.

Read + proposal/confirmed commands only

Webhooks

Planned

Past-tense account lifecycle facts with minimal payloads.

Past-tense durable facts only

Connected Apps

Planned

Salesforce / HubSpot / CSV plus consumer clients, with declared direction and authority.

Declared direction and field authority required

Cross-interface parity

Each surface delegates to the named canonical owner; a blank surface is an intentional denial of authority, not missing documentation.

CapabilityRESTGraphQLMCPWebhookCanonical owner
Primary readGET /crm/accountsaccount(id: ID!): Accountget_crm_accounts_contactsRevOps canonical account and contact services
Primary commandPOST /crm/accountsdraftAccountChange(input: DraftAccountChangeInput!): AccountChangeProposal!draft_crm_accounts_contacts_changeaccount.createdRevOps canonical account and contact services

Proposed scopes

Proposed scopes are not grantable yet.

crm:readplanned scope
Read governed crm accounts & contacts resources.
crm:writeplanned scope
Create and edit bounded crm accounts & contacts fields.
crm:operateplanned scope
Run explicit crm accounts & contacts lifecycle commands.

Behavioral contract

Cross-cutting rules every implementation and interface must satisfy.

Canonical delegation

Every interface delegates to RevOps canonical account and contact services; no resolver, gateway, worker, or connector reimplements domain rules.

Least-privilege principals

Scopes are evaluated with tenant, role, field-visibility, and principal-type constraints before data is read or changed.

Safe writes

Mutations use explicit confirmation where required, optimistic concurrency, idempotency, and durable actor attribution.

Transactional facts

Webhook facts are emitted from the canonical commit path, versioned, minimal, and safe to redeliver.

Declared provider authority

Every Connected App declares direction, field authority, provenance, and conflict behavior before activation.

REST API

Proposed endpoints

Planned
GET/api/v1/crm/accounts

List crm accounts & contacts

Return an authorized, paginated collection with stable filters and provenance.

crm:read

POST/api/v1/crm/accountsconfirmation

Create Account

Create one canonical resource with idempotency and actor attribution.

crm:write

GET/api/v1/crm/accounts/{id}

Retrieve Account

Return canonical detail, lifecycle state, permissions, and allowed actions.

crm:read

PATCH/api/v1/crm/accounts/{id}confirmation

Update Account

Update bounded editable fields using optimistic versioning.

crm:write

POST/api/v1/crm/accounts/{id}/mergeconfirmation

merge Account

Run one explicit domain command after validation and authorization.

crm:operate

merge a Account

curl --request POST \
+  --url https://www.digitalstack360.com/api/v1/crm/accounts/account_123/merge \
+  --header "Authorization: Bearer $DSTACK_API_KEY" \
+  --header "Content-Type: application/json" \
+  --header "Idempotency-Key: crm-accounts-contacts-merge-v2" \
+  --data '{
    "expected_version": 2,
    "reason": "Confirmed through the reviewed integration workflow"
  }'
Planned response
{
  "data": {
    "id": "account_123",
    "status": "merged",
    "version": 3,
    "operation_id": "op_01k4..."
  }
}

GraphQL

Proposed graph

Planned

Types

Account
AccountConnection
AccountChangeProposal
Operation

Queries

account(id: ID!): Account
accountList(filter: AccountFilter, pagination: PaginationInput): AccountConnection!

Mutations

draftAccountChange(input: DraftAccountChangeInput!): AccountChangeProposal!
applyAccountChange(input: ApplyAccountChangeInput!): AccountPayload!
Planned GraphQL query
query AccountDetail($id: ID!) {
  account(id: $id) {
    id
    status
    version
    updatedAt
    allowedActions { id label requiresConfirmation }
    source { kind externalId }
  }
}

MCP / Agent API

Proposed tools

Planned

Get CRM Accounts & Contacts

get_crm_accounts_contacts
Planned

Read the authorized crm accounts & contacts state, provenance, and allowed actions.

Scope
crm:read
Input
Resource id or a bounded filter.
Output
Canonical detail with source provenance and allowed actions.
Write boundary
Read only.

Draft CRM Accounts & Contacts change

draft_crm_accounts_contacts_change
Planned

Build a reviewable proposal from explicit user intent and DigitalStack evidence.

Scope
crm:write
Input
Target, requested outcome, expected version, and optional evidence references.
Output
A persisted proposal, validation results, and conflicts.
Write boundary
Creates a proposal; it does not mutate canonical state.

Apply CRM Accounts & Contacts change

apply_crm_accounts_contacts_change
Planned

Apply a reviewed proposal through the canonical service.

Scope
crm:operate
Input
Proposal id, expected version, idempotency key, and explicit confirmation.
Output
Updated canonical resource and audit reference.
Write boundary
Confirmation, optimistic versioning, and idempotency required.
Planned agent workflow
User: Review the proposed crm accounts & contacts change and help me apply it.

1. Call get_crm_accounts_contacts to inspect current state, provenance, and allowed actions.
2. Call draft_crm_accounts_contacts_change to create a proposal without changing canonical state.
3. Show validation results, conflicts, and the exact command to the user.
4. After explicit confirmation, call apply_crm_accounts_contacts_change with the proposal version.

Never infer authority from access to the MCP client.

Webhooks

Proposed event catalog

Planned

Event types

account.createdplanned event

A canonical Account was created.

payload: account_id, status, created_at

account.updatedplanned event

Governed Account fields changed.

payload: account_id, changed_fields, version, occurred_at

account.mergedplanned event

The merge command completed.

payload: account_id, prior_status, status, occurred_at

Planned event example
{
  "event_id": "evt_01k4...",
  "type": "account.merged",
  "event_version": 1,
  "occurred_at": "2026-07-16T14:22:04Z",
  "workspace_id": "ws_abc123",
  "resource": {
    "type": "account",
    "id": "account_123"
  },
  "actor": {
    "id": "user_123"
  },
  "payload": {
    "account_id": "account_123",
    "prior_status": "draft",
    "status": "merged"
  },
  "source": null
}

Connected Apps

Proposed connection roles

Planned

Claude / ChatGPT / IDE clients

Consumer application

Read, explain, and submit bounded crm accounts & contacts proposals through MCP.

Authority: Client access never implies domain approval or unrestricted mutation authority.

Salesforce / HubSpot / CSV

Synchronization provider

Import and reconcile commercial identity and changes.

Authority: Per-field direction, merge policy, and provenance are explicit.

Open contract decisions

Resolve before implementation approval

  • Which contact fields are provider-authoritative versus DigitalStack-authoritative by default?

Proof obligations

Must remain trueFailure indicator
RevOps canonical account and contact services remains the singular canonical owner.An interface or connector persists a second authoritative lifecycle state.
Draft and apply remain separate actions.An agent or integration silently converts inferred intent into a canonical mutation.
Every write is attributable, versioned, and idempotent.A retry duplicates work or stale state overwrites a newer human decision.
Connected App direction and field authority are explicit.Provider data silently becomes canonical or conflicts are resolved without policy.