# Local integration workflow examples — Stacks

> Five synthetic integration examples with explicit outcomes, permissions and limits.

Markdown version of https://stackscrm.com/developers/workflows — append `.md` to any page URL on this site (homepage: https://stackscrm.com/index.md). Index: https://stackscrm.com/llms.txt · Full site in one file: https://stackscrm.com/llms-full.txt

---

[← For agents & developers](https://stackscrm.com/developers)

# Five local workflow examples

These examples use a synthetic workspace, a dedicated scoped key and the shared service behind REST/MCP. They are local regression fixtures, not demonstrations of a hosted client or a provider sandbox. No customer receives a message and no card is charged.

1. **Lead to follow-up:** create a company, contact, linked deal and internal task. Inspect all returned IDs and relationships. An explicit retry key protects the contact creation. Four operations: 8 observed units.
2. **Relationship context:** read the contact’s company, deals, tasks and invoice context in one bounded response. The key needs every included module. This call adds 3 units; a restricted combined request fails as a whole.
3. **Invoice status:** read a synthetic sent invoice, explicitly record an offline payment in its ledger, then read its paid state. This is manual payment recording, not payment-provider evidence. Three operations add 4 units. Separate signed-callback regressions cover provider payment confirmation.
4. **Calendar inspection:** read an existing appointment and inspect its contact and scheduled time. This adds 1 unit. It does not claim an API booking or rescheduling capability.
5. **Respect the communication boundary:** create an internal task about an unsubscribed contact, then verify that a key without send permission cannot send email. The task adds 2 units; the denied send adds zero. No approval or delivery is queued.

The complete example records 18 observed API units. Built-in AI is not called. Commercial quotas remain observe-only; provider, consent, permission and approval rules still apply where relevant.

## Reproduce in the repository

Use the isolated Docker test stack described in the repository’s test instructions. Run `tests/agent_workflows_test.php`; it creates and removes its own Alpha/Beta fixture databases and reports the actual PHP version. Do not point the fixture at a customer database. The default regression runner includes it automatically.

Authentication over real local HTTP is covered separately by the API/MCP protocol tests. A local service pass does not establish compatibility with Claude, ChatGPT, Cursor or another hosted client. Choose a compatible transport and test your intended client before relying on it.
