Phase 4 — Multi-shop per LINE OA (OPTIONAL, ~1 day, ~3 sessions)
ONLY if business needs one Curva LineAccount to drive multiple Pasukuru shops.
Goal: Promote PartnerConnection from 1:1 to 1:N. Scenario builder + Flex picker get shop selector.
Exit gate: One LineAccount has 3 connected Pasukuru shops. Admin can build separate Scenarios per shop. Flex Msg can mix products from different shops.
Decisions in this phase
4.D-1 — Should we even do Phase 4?
- Status: open — DEFER until customer asks
- Owner: r_goto / Cocon-inc product
- Context: Adds complexity. No customer asked yet. Easier to add later than to prematurely build.
- Recommendation: DEFER. Mark as future work. Complete Phase 0-3, ship, observe, decide.
If Phase 4 happens:
4.D-2 — Default shop per LineAccount?
- Options:
- Always require explicit shop selection in Scenario/Flex
- Mark one PartnerConnection as
is_default=true, fall back if not specified
- Recommendation: Option 2 — backward compatible.
Tracking matrix (placeholder)
| ID | Title | Track | CC | Risk |
|---|---|---|---|---|
| 4.C-14 | PartnerConnection 1:N migration + service | C | 2 | H |
| 4.C-15 | Shop selector in Scenario builder | C | 1 | M |
| 4.C-16 | Shop selector in FlexMsg picker | C | 0.5 | L |
Total: 3.5 CC sessions.
Schema migration outline
Current:
PartnerConnection (line_account_id, partner='kuru', UNIQUE)
Target:
PartnerConnection (line_account_id, partner='kuru', partner_shop_id, is_default)
UNIQUE (line_account_id, partner, partner_shop_id)
Migration:
- Drop existing UNIQUE
- Add
is_defaultboolean (true for existing rows) - Add new UNIQUE
- Update services + queries to handle multi-row case
Risk: every Curva integration query touches this. H-risk. Need exhaustive test.
Decision: defer
Recommend NOT planning details until decision 4.D-1 = yes.
This file exists as placeholder + skeleton. Hydrate when needed.