This runbook covers the mechanisms supplied by @adocommercekit/id. It is not legal advice. The merchant remains the personal-data controller and must have Indonesian counsel approve purposes, notices, retention periods, legal holds, processors, data-subject handling, and incident decisions before publication.
Shared responsibility
| Responsibility | Adocommerce Kit / package | Host merchant |
|---|---|---|
| Consent evidence | Append-only purpose, notice version, action, time, and minimized evidence | Write the notice, establish the lawful basis, present it, identify the customer, and call grant/withdraw |
| Rights requests | Authorized submit/list/export/correction/deletion workflow, single-use identity challenges, and per-kind SLA deadlines | Connect challenge evidence to a high-assurance host authenticator, implement Bouncer policy, verify scope, approve/reject, communicate, and retain case evidence |
| Portability | Minimized core customer/order JSON plus consent/request receipts and verified-download enforcement | Secure delivery channel, additional host-system data, and response-deadline operations |
| Retention | Dry-run candidate plan, idempotent anonymization, and legal-hold exclusion | Set counsel-approved periods, schedule a durable job, review dry runs, place/release holds, and retain required records |
| Rechecks purpose and notice consent before enqueue and send; redacted logs | Approved templates, pinned Graph API, recipient mapping, processor terms, and optional fallback | |
| Incident response | Data minimization and evidence-friendly identifiers | Detection, containment, impact/legal assessment, notification, regulator/data-subject communication, and post-incident work |
Required configuration
- Replace the deny-all
pdp.authorizecallback inconfig/commerce_id.tswith a Bouncer-backed policy. Authorization is mandatory for every rights operation. Independently authorizeapproveandreject; owning a customer record must not grant those operator actions. - Set
pdp.identity.expiresAfterMinutesandmaxAttempts, retain the defaultmaxOpenChallenges: 1andcooldownSeconds: 60unless a reviewed policy changes them, then connectPdpIdentityVerificationService.verify()to the merchant’s high-assurance password, MFA, or recovery process. The package stores challenge state but never invents identity evidence. - Set counsel-approved
pdp.slaDaysvalues for export, correction, and deletion. Every submitted request exposes an immutablerequestedAtand calculateddueAt. - Version each privacy notice. Never silently reuse a notice version after changing purpose, processor, channel, retention, or material wording.
- Use a production queue for retention and notification work. Inline dispatch is development/test-only.
- Set a counsel-approved retention policy version and duration. Run
PdpRetentionService.execute(policy, { dryRun: true })and review customer identifiers before enabling execution. - Place legal holds before approving deletion or running retention when records must be preserved.
- Do not put raw addresses, access tokens, instruction secrets, provider payloads, or message recipients in logs.
Run the published migrations, including the remediation migration adding overdue_notified_at to PDP requests, before deploying the SLA worker. The provider schedules hourly PDP_SLA_JOB (commerce.id.pdp-sla.v1). It emits the durable outbox event PdpRequestOverdue once for overdue open requests (submitted, approved, or blocked_legal_hold) and records the notification timestamp. Connect that event to the merchant’s operator escalation and response process; it does not itself notify a regulator or resolve the request.
Core’s 019_customer_privacy migration adds customers.anonymized_at. Publish/review it through the core upgrade workflow and run it before deletion or retention invokes CustomerService.anonymize().
Consent lifecycle
- Call
ConsentReceiptService.grant()only after recording an affirmative action for one named purpose and notice version. - Call
withdraw()when the customer revokes the purpose. Receipts are appended; existing rows are never rewritten. - Check
hasValidPurpose(customerId, purpose, noticeVersion)at the point of use.@adocommercekit/whatsappperforms this check both before enqueue and before send. - A new notice version has no inherited grant. Collect new evidence when the merchant’s legal basis requires it.
Data-subject requests
- Authenticate the requester using the merchant’s normal high-assurance account or guest process.
- Create a purpose-bound challenge with
PdpIdentityVerificationService.create(), verify host evidence withverify(), and pass the resulting challenge ID toPdpRightsService.submit(). Issuance enforces the open-challenge limit and cooldown. Each verification attempt is atomically claimed before invoking host evidence verification, so concurrent calls cannot bypassmaxAttempts. A challenge expires, locks after the bounded attempts, and can be consumed only once for its exact customer and purpose. - Submit an
export,correction, ordeletionrequest with the current notice version and only the fields required to process it. SurfacedueAtto the requester and operators. - A separately authorized operator reviews the request and any fraud, tax, dispute, warranty, accounting, or legal-hold constraints. Call
approve()orreject()under their distinct authorization actions; rejection requires a non-empty resolution note. Customer ownership alone is not operator authorization. - For an immediate verified portability download, call
PdpRightsService.exportVerified(). Deliver the JSON over TLS; do not email it by default. - For correction, record the approved fields and call
completeCorrection(). Do not overwrite immutable order or tax evidence without a separately reviewed accounting correction. - For deletion, place any required hold first.
completeDeletion()returnsblocked_legal_holdinstead of anonymizing while a hold is active. - Record completion or rejection in the merchant case system and communicate the outcome using counsel-approved wording and deadlines.
Retention and anonymization
- Treat each policy change as a new version: direct
PdpRetentionPolicyusesversion,inactiveBefore: Date, and optionalbatchSize; scheduled retention configuration usespolicyVersionandinactiveAfterDays. - Dry-run first. Compare candidates to open orders, disputes, returns, refunds, warranties, tax/accounting obligations, fraud investigations, and legal holds.
- Candidate selection uses the latest customer update, order placement, or cart update, not account age alone, and excludes non-terminal orders, non-terminal returns, and legal holds. Planning inspects customers with a non-null email in batches of 100 by default (bounded to 1–1000). These guards do not replace the host’s wider accounting/dispute review.
- Execute in bounded batches through the durable jobs port. The
(customer_id, policy_version)record makes retries idempotent. - Core anonymization records
anonymizedAt, clears customer and saved-address identifying fields, redacts order address snapshots while retaining country codes, and clears order/cart email and metadata. It deletes local vaulted payment customer/method records and scrubs payment instructions, provider payloads, intent secrets/errors, and identifiable outbox/outgoing webhook bodies. Financial ledger rows remain. - The Indonesia extension handles
CustomerAnonymizedto scrub rights-request payloads/resolution notes, delete identity challenges, and clear free-form consent evidence. Consent purpose, notice version, action, and timestamp facts remain preserved for statutory evidence. Host models, external processors (including provider-side vaults), backups, analytics, files, support tools, and provider dashboards remain host responsibilities. - Test restoration and erasure behavior against the merchant’s backup policy. “Deleted from the primary database” must not be represented as universal erasure.
Personal-data incident: 3 × 24-hour operating clock
The host incident commander starts the clock at the legally reviewed awareness point. The statutory interpretation and recipients must be confirmed by counsel for the incident; the software does not make that determination.
0–4 hours: detect, preserve, contain
- Open an incident record with UTC awareness time, reporter, systems, data classes, and initial scope.
- Preserve access, queue, deployment, database, and provider audit evidence. Never copy secrets or raw personal data into chat or general issue trackers.
- Revoke or rotate exposed credentials, stop the affected integration, isolate compromised accounts, and preserve a controlled forensic path.
- Assign incident commander, security lead, privacy/legal lead, communications lead, and processor contacts.
4–24 hours: assess
- Determine affected customers, data elements, volume, duration, access/exfiltration evidence, geography, processors, and ongoing risk.
- Query by internal identifiers; export only the minimum evidence set. Keep raw addresses and message recipients out of telemetry.
- Have counsel determine notification obligations, recipients, required content, and the start of the 3 × 24-hour period under applicable law and guidance.
- Notify affected processors and obtain their incident timelines and containment evidence.
24–48 hours: prepare and validate
- Draft regulator and data-subject notices with what happened, exposed data, timing, containment, likely impact, and concrete protective actions.
- Reconcile the recipient set, avoid duplicates, validate translations, and obtain legal and executive approval.
- Test delivery through an approved incident channel. Do not reuse marketing consent as the legal basis for mandatory incident communication.
48–72 hours: notify and record
- Send required notices within the counsel-confirmed deadline and retain delivery evidence, failures, retries, versions, and approval timestamps.
- Provide a monitored response channel and escalation path for affected people.
- Record any delayed or omitted notification decision with counsel’s rationale and supporting facts.
After notification
- Continue containment and recovery; notification is not closure.
- Complete root-cause analysis, affected-record reconciliation, processor follow-up, credential rotation, and control fixes.
- Test the correction against the original failure and add a durable regression check where appropriate.
- Run a retrospective with owners and dates. Update notices, retention, incident contacts, data maps, and this runbook when the operating model changes.
Operational evidence
Archive counsel approval, native-language review, region source/license/checksum, PDP scenario results, dry-run retention evidence, legal-hold scenarios, authorized and unauthorized export tests, WhatsApp consent-withdrawal and retry evidence, and a dated incident tabletop. Sanitized artifacts must contain no credentials, instruction secrets, raw addresses, recipients, or provider payloads.
Continue
- Configure WhatsApp notifications with PDP consent.
- Review the broader Indonesia capability map.
- Use deployment and operations for queues, logs, backups, and incident prerequisites.