Skip to main content

Plays

The plays table stores signal-triggered playbooks. When a signal fires, a play can be recommended and executed as a series of ordered tasks.

Play Fields

FieldTypeSourceDescription
idUUIDSystemUnique identifier
nameVARCHAR(300)TemplatePlay name
template_idVARCHAR(100)SystemTemplate identifier for play type
stateENUMSystemPlay lifecycle state
trigger_signal_idUUIDSystemSignal that triggered this play (FK to signals)
account_idUUIDSystemTarget account (FK to accounts)
owner_idUUIDSystemPlay owner/executor (FK to users)
sla_hoursINTEGERTemplateSLA for play completion (default: 72 hours)
started_atTIMESTAMPSystemWhen execution started
completed_atTIMESTAMPSystemWhen all tasks completed
created_atTIMESTAMPSystemRecord creation time

Play States

StateDescription
DRAFTCreated but not yet started
ACTIVEIn progress, tasks being executed
PAUSEDTemporarily paused
COMPLETEDAll tasks finished
ABANDONEDPlay canceled before completion

Play Tasks

The play_tasks table stores ordered steps within a play.
FieldTypeSourceDescription
idUUIDSystemUnique identifier
play_idUUIDSystemParent play (FK to plays, cascade delete)
titleVARCHAR(300)TemplateTask title
descriptionTEXTTemplateTask instructions
order_numINTEGERTemplateExecution order (1-based)
completedBOOLEANUserWhether the task is done
completed_atTIMESTAMPSystemCompletion timestamp
assigned_toUUIDSystemTask assignee (FK to users)

Task System

The platform also has a general tasks table for platform-driven actions (not just play tasks):
FieldTypeDescription
idUUIDUnique identifier
org_idUUIDOrganization tenant
titleVARCHAR(500)Task title
descriptionTEXTTask details
source_typeENUMnba, signal, play, mql_handoff, manual
source_idVARCHAR(200)ID of triggering entity
source_contextJSONBSnapshot of source data at creation
account_idUUIDRelated account
contact_idUUIDRelated contact
lead_idUUIDRelated lead
opportunity_idUUIDRelated opportunity
renewal_idUUIDRelated renewal
assigned_toUUIDAssignee
assigned_byUUIDWho created the task
statusENUMpending, in_progress, completed, dismissed
priorityENUMcritical, high, medium, low
categoryENUMcall, email, meeting, review, play_execution, lead_qualification, escalation
due_dateTIMESTAMPDue date
completed_atTIMESTAMPCompletion timestamp
dismissed_atTIMESTAMPDismissal timestamp
dismissed_reasonTEXTWhy the task was dismissed
role_contextVARCHAR(50)Which role view created this task