HOCO B2B
Team tasksAnis

SRV-34 — V2 — Carrier API & WhatsApp Business integrations

Shipment creation and tracking webhooks with the selected carrier(s); WhatsApp Business templates for confirmations and reminders.

FieldDetails
Task codeSRV-34
PhaseP4 — V2 evolutions
Product scopeV2
StatusPlanned
StartTue 2 Feb 2027
DueSun 7 Feb 2027
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort3 person-day(s) planned · 6 from scratch · size M
Area · appServer · server
Depends onSRV-32
UnblocksSRV-37
Milestones—

Summary

Shipment creation and tracking webhooks with the selected carrier(s); WhatsApp Business templates for confirmations and reminders.

Description

Carrier API integration and the WhatsApp Business API are V2 (cahier §11, §14.2; DLV-05, NOT-08). In V1, carriers are assigned manually with a tracking number and WhatsApp is only a share link and the regional support button. This task adds a carrier adapter interface (create shipment, label, cancel, tracking webhooks with signature checks) implemented for the carrier(s) HOCO selects, maps carrier statuses to DeliveryStatus, and adds a WHATSAPP channel adapter to the notification service using approved WhatsApp Business templates for order confirmations, status updates and payment reminders, with opt-in tracking and per-conversation cost monitoring. Out of scope: changes to the regional support routing (V1, SRV-24).

Subtasks

#SubtaskOwner
1Carrier adapter interface (createShipment, getLabel, cancel, parseWebhook) and registry per Carrier with API credentials in env groupsAnis
2Implementation for the selected carrier(s): shipment creation on READY, label PDF, tracking number stored on DeliveryAnis
3Tracking webhook endpoint with signature verification, idempotent processing and status mapping to DeliveryStatus/OrderStatusAnis
4Fallback to manual mode when the carrier API fails, with alert to the delivery managerAnis
5WhatsApp Business API account setup, template submission and approval (fr/ar)Anis
6WHATSAPP channel adapter in the notification service with opt-in records and delivery statusesAnis
7Rules for WhatsApp messages: order confirmed, shipped, delivered, payment reminder; cost dashboardAnis

Deliverables

  • apps/server/src/modules/integrations/carriers/{adapter.ts,<carrier>.ts,webhooks.router.ts}
  • apps/server/src/modules/notifications/adapters/whatsapp.ts
  • Approved WhatsApp template list and carrier integration notes in /docs/srs/integrations

Acceptance criteria

  • Marking an order READY with an API carrier creates the shipment and stores the tracking number automatically (DLV-05)
  • A carrier delivered webhook moves the delivery and the order to DELIVERED once, even if sent twice (DLV-05)
  • A reseller who opted in receives the WhatsApp template when the order is confirmed; one who did not receives none (NOT-08)
  • A carrier API outage switches the delivery to manual mode and alerts the delivery manager

Requirements covered

RequirementTitleRelease
DLV-05Carrier API integration (shipment creation, tracking webhooks)V2
NOT-08WhatsApp Business API automated messagesV2

API surface

Endpoint groupOperations
Orders & delivery21

Test measures

  • Contract tests against the carrier sandbox
  • Webhook replay and signature tests
  • WhatsApp sandbox test with template messages

Risks

  • Carrier APIs and WhatsApp template approvals take time and cost per message — start provider onboarding at the start of P4 and keep manual modes available

KPI

  • Delivered by Sun 7 Feb 2027 within 3 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page