Reten Docs
Activities Guide

Activities Guide

Understand activities, types, channels, and lifecycle in the Reten platform.

Activities are the core domain object in Reten. An activity is a unit of work or communication assigned to a commerce (business/store).

Activity Types

TypeDescriptionRequires
TASKActionable items executed by field operatorsRoute + operator assignment via task details
MESSAGECommunications sent to commerces via a channelChannel configuration only

Channels

Activities are dispatched through channels representing different communication methods:

ChannelCodeDescription
SalesmanSALESMANIn-person visit by a field salesperson
Call CenterCALLCENTERPhone call from a call center agent
WhatsAppWHATSAPPWhatsApp message
EmailEMAILEmail communication
SMSSMSSMS text message
PushPUSHPush notification

Activity Lifecycle

Activities follow a strict status machine:

                           ┌──► DISPATCHED ──────► COMPLETED
                           │        │
READY ─┬──────────────────►┤        └──────────► FAILED
       │                   │
       ├──► UNRESOLVED ────┘  (retry-resolution succeeds → READY)

       ├──────────────────────────────────────► CANCELED

       └──────────────────────────────────────► FAILED

Status Values

StatusDescription
READYCreated and waiting to be dispatched
UNRESOLVEDCreated but target user or attribute resolution failed — requires retry or manual intervention
DISPATCHEDSent to an external provider/channel
COMPLETEDSuccessfully finished
CANCELEDManually canceled by an admin
FAILEDFailed during dispatch or execution

Valid Transitions

FromToTrigger
READYUNRESOLVEDTarget user or attribute resolution fails during creation
READYDISPATCHEDSuccessful dispatch to provider
READYCANCELEDManual cancellation
READYFAILEDMax dispatch attempts (3) exceeded
UNRESOLVEDREADYSuccessful retry via PATCH /api/activities/:id/retry-resolution
DISPATCHEDCOMPLETEDResult received with COMPLETED or TRANSFERRED status
DISPATCHEDFAILEDResult received with NOT_EXECUTED status

Key Properties

Each activity has:

  • Commerce assignment — 1:1 link to a target commerce
  • Channel — Communication method
  • Status — Current lifecycle state
  • Idempotency key — Unique per tenant, prevents duplicate creation
  • Schedulingscheduled_at and optional suggested_execution_time timestamps
  • Dispatch trackingdispatch_config_id, provider_activity_id, dispatch_attempt_count
  • Target users — Resolved contact persons within the commerce
  • Attributes — Key-value data resolved via configurable policies

What's Next