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:
    1. Always require explicit shop selection in Scenario/Flex
    2. Mark one PartnerConnection as is_default=true, fall back if not specified
  • Recommendation: Option 2 — backward compatible.

Tracking matrix (placeholder)

IDTitleTrackCCRisk
4.C-14PartnerConnection 1:N migration + serviceC2H
4.C-15Shop selector in Scenario builderC1M
4.C-16Shop selector in FlexMsg pickerC0.5L

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:

  1. Drop existing UNIQUE
  2. Add is_default boolean (true for existing rows)
  3. Add new UNIQUE
  4. 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.