# Acme Analytics: integration stack (fictional example of martech-context/stack.md)

This is the file the worked example reads first. It shows the fields an integration design needs; a real one holds no secrets, tokens or customer records. Acme Analytics is a fictional B2B SaaS company on www.example.com with about 48,000 company records.

## Tools, accounts and owners

- HubSpot Professional: marketing and customer success. Owner: RevOps lead. Account time zone: America/New_York (the daily API limit resets at midnight there).
- Salesforce Enterprise: sales pipeline. Owner: sales operations manager. Production org and one full sandbox.
- Stripe Billing: subscriptions and invoices in live mode, plus a sandbox. Owner: finance systems lead.
- Segment: product events from the web app. Owner: data engineer.
- BigQuery: warehouse for reporting and modelled account state. Owner: data engineer.
- Hightouch: reverse ETL from BigQuery to HubSpot and Customer.io. Owner: data engineer.
- n8n (self-hosted): automation for the demo request flow. Owner: marketing operations.
- Customer.io: lifecycle messages. Owner: lifecycle marketing manager.
- Mixpanel: product analytics. Owner: head of product.
- Google Ads: offline conversions from closed revenue. Owner: head of paid media.

## Integration identities (names only)

- `acme-billing-sync`: HubSpot private app used by the billing worker (company read and write).
- `acme-hightouch`: HubSpot private app used by Hightouch (company write on PQL fields only).
- `Salesforce service user`: n8n credential for the demo flow. The agency set it up with a marketing manager's login; moving it to a service identity is open.
- `acme-ads-uploader`: Google Ads API access for the offline conversion job.
- Secrets live in the runtime's secret manager and the n8n credential store. Nothing here is a secret.

## Keys and identity

- `acme_account_id`: the internal account ID, seven-digit text with leading zeros (for example 0001009). Never store it as a number.
- Stripe customer metadata carries `acme_account_id`. Stripe customer IDs and HubSpot company IDs meet only through the crosswalk.
- Salesforce IDs: always the 18-character form in exports and joins.
- Several customers share a domain (agencies, holding companies), so domain is not a key.

## Flows handed over by the agency

- billing_to_crm: Stripe subscriptions to HubSpot company billing fields (custom worker).
- demo_to_salesforce: website demo form to Salesforce lead and owner task (n8n).
- lifecycle_sync: HubSpot and Salesforce native connector for lifecycle stage and renewal date.
- pql_to_tools: BigQuery PQL model to HubSpot companies and Customer.io people (Hightouch).
- product_events: Segment to Mixpanel and BigQuery.
- ads_offline: closed-won Salesforce opportunities to Google Ads offline conversions (scheduled job).

## Decisions (see decisions.md)

- 2026-06-02: Stripe owns every billing field in HubSpot; people do not edit them.
- 2026-06-02: HubSpot owns lifecycle stage; Salesforce receives it.
- Open: who owns the renewal date. Billing knows the period end; sales negotiates contract renewals. Owner of the question: RevOps lead.
- Open: whether demo requests should create an owner task in Salesforce or in HubSpot.
