---
id: CAP-PFM-INT-014
title: Deliver subscribed Rhythm changes to integrations
feature: FEAT-PFM-INT-04
product_area: platform
module: integrations
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - CAP-INT-EVT-011
  - CAP-INT-EVT-012
  - CAP-INT-EVT-013
  - CAP-INT-EVT-014
  - CAP-INT-EVT-015
  - CAP-INT-EVT-016
  - CAP-INT-EVT-018
  - CAP-INT-EVT-019
  - CAP-INT-LIB-016
  - CAP-INT-ADP-006
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
intent_sources:
  - 'services-platform:docs/milestones/INTG-M3-webhooks-events-deliveries.md#Objective'
purpose: Administrators arrange delivery of approved Rhythm changes to an installed integration.
outcomes:
  - Accepted subscriptions limit the Rhythm changes an integration receives.
  - Repeated delivery failures become visible and can suspend the subscription.
concepts:
  - CON-PFM-INT-004
actors:
  - ACT-PFM-017
  - ACT-PFM-018
  - ACT-PFM-021
  - ACT-PFM-006
surfaces:
  - console
  - api
  - job
preconditions: []
postconditions: []
permissions:
  - key: platform.integrations.manage
    where_checked: api
    scope: tenant
  - key: platform.integrations.read
    where_checked: api
    scope: tenant
  - key: platform.integration-executions.operate
    where_checked: api
    scope: tenant
rules:
  - id: BR-CAP-PFM-INT-014-01
    proved_by: [ATS-PFM-INT-014-01, ATS-PFM-INT-014-08, TST-PFM-INT-565, TST-PFM-INT-566]
    statement: >-
      Subscription creation requires an enabled installation, an event declared and accepted for its current
      release, a valid shared-condition filter and uniqueness by installation, connection and event type.
    kind: validation
    enforced_at:
      - api
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#refuses
      a subscription to a type the installation has not accepted, naming the type, and writes nothing
    origin: none
  - id: BR-CAP-PFM-INT-014-02
    proved_by: [ATS-PFM-INT-014-02, ATS-PFM-INT-014-10, ATS-PFM-INT-015-09, TST-PFM-INT-480, TST-PFM-INT-566, TST-PFM-INT-575]
    statement: >-
      Rhythm changes create deduplicated deliveries projected to declared event fields without system or actor
      columns, with prior values and changed fields only for event types that declare them.
    kind: invariant
    enforced_at:
      - service
      - database
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#turns
      a CRM change event into a queued delivery of the catalog projection, never the row
    origin: none
  - id: BR-CAP-PFM-INT-014-03
    proved_by: [ATS-PFM-INT-014-03, TST-PFM-INT-566, TST-PFM-INT-575]
    statement: 'Filters run when a change occurs, recording false or unknown matches as skipped without queued work.'
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#records
      a delivery its filter refused as skipped_filter, and queues nothing for it
    origin: none
  - id: BR-CAP-PFM-INT-014-04
    proved_by: [ATS-PFM-INT-014-04, ATS-PFM-INT-014-09, TST-PFM-INT-566, TST-PFM-INT-585]
    statement: >-
      Push delivery obtains a credential lease and records acknowledgement; failures retry at one, five and
      thirty minutes, two and six hours and become dead after six attempts.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#retries
      a classified failure with the async backoff and records the delivery dead after six attempts
    origin: none
  - id: BR-CAP-PFM-INT-014-05
    proved_by: [ATS-PFM-INT-006-11, ATS-PFM-INT-014-05, ATS-PFM-INT-014-08, ATS-PFM-INT-014-11, TST-PFM-INT-566]
    statement: >-
      Fifty consecutive dead deliveries pause a subscription and notify its administrators once; resume resets
      the count and paused subscriptions take no changes.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#pauses
      a subscription after fifty dead deliveries in a row and tells its administrators once
    origin: none
  - id: BR-CAP-PFM-INT-014-06
    proved_by: [ATS-PFM-INT-014-06, ATS-PFM-INT-014-08, TST-PFM-INT-565, TST-PFM-INT-566]
    statement: >-
      Acceptance withdrawal atomically pauses active subscriptions for excluded types and records both trails;
      re-acceptance alone does not resume them.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscription-consent.integration.spec.js#pauses
      the active subscription of the type left out
    origin: 'services-platform:docs/milestones/INTG-M1-find-install-connect.md#D4'
  - id: BR-CAP-PFM-INT-014-07
    proved_by: [ATS-PFM-INT-003-14, ATS-PFM-INT-014-07, ATS-PFM-INT-014-12, TST-PFM-INT-565]
    statement: >-
      Installation suspension skips delivery without changing active subscription status, so later changes are
      delivered after resume.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscription-consent.integration.spec.js#skips
      a subscription whose installation is suspended, and delivers again once it is resumed
    origin: none
  - id: BR-CAP-PFM-INT-014-08
    proved_by: [ATS-PFM-INT-014-09]
    statement: >-
      Operators may restart a dead delivery from its first attempt or replay subscription changes over a
      requested window.
    kind: policy
    enforced_at:
      - api
      - service
    must_prove: false
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscriptions.integration.spec.js#retries
      a dead delivery an operator asks for, from its first attempt
    origin: none
  - id: BR-CAP-PFM-INT-014-09
    proved_by: [ATS-PFM-INT-014-09]
    statement: >-
      Pull integrations read pending deliveries after their cursor, and cursor advancement marks the covered
      deliveries delivered.
    kind: policy
    enforced_at:
      - service
    must_prove: false
    provenance: observed
    source: 'services-platform:modules/integrations/aws/api/gateway.routes.ts:writePullCursor'
    origin: none
  - id: BR-CAP-PFM-INT-014-10
    proved_by: []
    statement: >-
      Subscription creation, edit and removal enter integration and security history without storing filter
      values in those trails.
    kind: invariant
    enforced_at:
      - service
    must_prove: false
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/integration/services/subscriptions/subscription-consent.integration.spec.js#records
      a creation, a change and a removal with their states
    origin: none
scenarios:
  - id: SC-CAP-PFM-INT-014-01
    given: An installed test integration subscribes to contact updates.
    when: A coordinator changes the contact in CRM.
    then: The integration acknowledges the projected change and its changed fields.
    provenance: test
    source: >-
      services-platform:modules/integrations/tests/e2e-adapters/events-dummy.adapters.spec.js#is acknowledged
      by the dummy’s receiver and recorded delivered
edge_cases: []
constraints: []
depends_on:
  - CAP-PFM-INT-003
related:
  - CAP-PFM-INT-015
  - CAP-PFM-INT-006
journeys: []
open_questions:
  - OQ-PFM-INT-002
evidence:
  - >-
    services-platform source inventory: modules/integrations/services/subscriptions/*
    (change-event-handler.ts, delivery-worker.ts, domain-event-projection.ts, subscription-filter.ts),
    persistence/integration-subscriptions.ts, integration-deliveries.ts, aws/api/events.routes.ts; rule-level
    automated test references; docs/integrations/README.md (Subscriptions and deliveries, Consent is the
    adapter's authority for subscriptions).
  - 'macroservice-libraries source inventory: packages/integration-contracts/src/domain-events.ts.'
  - >-
    Operation coverage: listIntegrationSubscriptions, createIntegrationSubscription,
    updateIntegrationSubscription, deleteIntegrationSubscription, replayIntegrationSubscription,
    listIntegrationDeliveries, getIntegrationDelivery, retryIntegrationDelivery, getIntegrationSyncCursor,
    putIntegrationSyncCursor.
  - 'Persistent record coverage: integration_subscriptions, integration_deliveries, integration_delivery_keys.'
  - 'End-to-end definition inventory: events-dummy.adapters.spec.js.'
controls: [TC-AVL-001, TC-AVL-004, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-005, TC-MON-001, TC-MON-002, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-PRV-004, TC-SEC-001, TC-SEC-002, TC-SEC-003, TC-SEC-004, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
exercised_by: [FAS-PFM-INT-04-01, FAS-PFM-INT-04-03, FAS-PFM-INT-04-04, FAS-PFM-INT-04-05]
suites: [TST-PFM-INT-480, TST-PFM-INT-565, TST-PFM-INT-566, TST-PFM-INT-575, TST-PFM-INT-585]
---
# Deliver subscribed Rhythm changes to integrations

## Purpose

Administrators arrange delivery of approved Rhythm changes to an installed integration.

## How It Works

An administrator chooses the Rhythm changes an installed integration should receive. A subscription associates an accepted event type with its delivery destination and optional filter. Rhythm projects the change into the declared event shape. Push workers send queued deliveries and record acknowledgements or failures. A pull integration instead advances through pending deliveries. Repeated failure can pause a subscription and bring it to administrators. Consent withdrawal and installation suspension have different recovery paths. The product should decide the delivery and replay contract through the proposed events milestone before promising reliability beyond the observed implementation.

## Relationships

- Requires adopt an integration with reviewed access to supply the prerequisite configuration or operation.
- Connects with route integration events to their application owners through shared integration records.
- Connects with recognize integration problems and trace changes through shared integration records.
