Engineering Use Case Guidelines
Use this guide for the dedicated pages under docs-ccg-internal/05-engineering-guide/use-cases/. These pages are Diataxis Reference: an engineer should be able to look up a customer or merchant situation, its expected CCG outcome, and the domain guide that defines the behavior. Start from the Engineering Use Case Template.
Place the page beside related use casesβ
Create one use-case file for the corresponding Business capability page. Mirror the Business grouping under use-cases/: for example, Split Tender payment cases live at use-cases/payments/split-tender/payments.md, and manufacturer-card cases live at use-cases/payment-methods/card/manufacturer-card.md. Give the page an explicit /engineering-guide/use-cases/... slug, a Reference: sidebar label, and audience: [ccg-platform-engineers]. Add it to the Use Cases index.
The use-case page connects the Business outcome to existing service and domain guidance. Keep source-level rules, API contracts, and long flow explanations in their authoritative Engineering or Integration pages; link to them from the cases.
Write cases that can be verifiedβ
- Positive cases show the supported action reaching its intended outcome.
- Negative cases show normal validation, eligibility, decline, or processing failures. State what does not complete and what the engineer should inspect.
- Edge cases cover timing, concurrency, stale state, partial results, or recovery that needs special handling. Omit this section when there is no verified edge case.
For each case, assign a stable UC-[AREA]-NN ID and state the trigger or starting condition, observable result, and authoritative implementation reference. Use a table when several cases share those fields; keep IDs stable when cases move between sections. Add the API or widget version when behavior differs between V1 and V2. Do not infer final success from request acceptance, or claim a time limit, status, retry rule, or automatic recovery without checking the current contract.
Use Business scenarios on the current branch and historical tables on main as an inventory, then verify every technical outcome against current Integration contracts or Engineering domain pages. If a historical case conflicts with current behavior, resolve it with the owning engineering team before publishing it as an expected outcome.
Link both directionsβ
Near the top of the engineering page, use a tip that links to the matching Business rules or closest business context:
:::tip[Business rules]
Review [Split Tender Payments](/docs/business/core-capabilities/payments/split-tender/payments/#business-rules) for the product rules that apply to these use cases.
:::
For the Business-side link, see Connect business outcomes to engineering use cases. Link each case to its authoritative domain or Integration page where the expected behavior is defined.
Review before publishingβ
- Confirm that each case belongs to the matching Business capability and that the Business rule link points to the right section.
- Check positive, negative, and applicable edge outcomes against the current contract and version. Identify the responsible domain when behavior crosses services.
- Check that the Business page links to the complete page as described in the Business guidelines and that no implementation detail leaked into merchant-facing prose.
- Run
node scripts/docs/lintDocLinks.js,node scripts/docs/lintDocStructure.js, andgit diff --check. Run a site build when the documentation change calls for one; a focused prose edit does not require a build.