Docs »

Records »

Types »

Draft

Name (singular): Draft
Name (plural): Drafts
Alias (uri): draft
Identifier (ID): cerberusweb.contexts.mail.draft

Records API

These fields are available in the Records API and packages:

Req’d Field Type Notes
  is_queued boolean  
  links links An array of record type:id tuples to link to. Prefix with - to unlink.
  name text The subject line of the draft message
  params object JSON-encoded key/value object
  queue_delivery_date number (0-4294967296)
  queue_fails number (0-4294967296)
  ticket_id number  
  to text The To: line of the draft message
  token text A random unique token for this draft, copied to the eventual message for tracing
x type text The type of draft: mail.compose, mail.transactional, ticket.reply, or ticket.forward
  updated timestamp The date/time when this record was last modified
  worker_id number The ID of the worker who owns the draft

params (mail.compose)

Key Value
bcc The Bcc: recipients
bucket_id The bucket ID to move the ticket to
cc The Cc: recipients
content The message content
custom_fields An object with custom field IDs as keys and their values
format parsedown (Markdown), or blank for plaintext
file_ids An array of attachment IDs
group_id The group ID to move the ticket to
options_gpg_encrypt 1 (encryption enabled), 0 (disabled)
options_gpg_sign 1 (cryptographic signature enabled), 0 (disabled)
org_id The org ID to assign
org_name The org name to assign
owner_id The worker ID to assign
send_at The optional timestamp to deliver the message at
status_id 0 (open), 1 (waiting), 2 (closed)
subject The message Subject:
ticket_reopen When the status is waiting or closed, the timestamp to reopen at
to The To: recipients

params (mail.transactional)

Key Value
bcc The Bcc: recipients
cc The Cc: recipients
content The message content
file_ids An array of attachment IDs
format parsedown (Markdown), or blank for plaintext
from The From: sender (uses system default if omitted)
subject The message Subject:
to The To: recipients

params (ticket.reply / ticket.forward)

Key Value
bcc The Bcc: recipients
bucket_id The bucket ID to move the ticket to
cc The Cc: recipients
content The message content
custom_fields An object with custom field IDs as keys and their values
file_ids An array of attachment IDs
format parsedown (Markdown), or blank for plaintext
group_id The group ID to move the ticket to
in_reply_message_id The message ID being responded to
options_gpg_encrypt 1 (encryption enabled), 0 (disabled)
options_gpg_sign 1 (cryptographic signature enabled), 0 (disabled)
owner_id The worker ID to assign
send_at The optional timestamp to deliver the message at
status_id 0 (open), 1 (waiting), 2 (closed)
subject The message Subject:
ticket_reopen When the status is waiting or closed, the timestamp to reopen at
to The To: recipients

Dictionary Placeholders

These placeholders are available in dictionaries for bot behaviors, snippets, and API responses:

Field Type Description
_context text Record type extension ID
_label text Label
_type text Record type alias
content text Content
id number Id
name text Name
ticket_ record Ticket (if type is ticket.reply)
to text To
token text Token
updated date Updated
worker_ record Worker

These optional placeholders are also available with key expansion in dictionaries and the API:

Field Type Description
comments comments Comments
custom_<id> mixed Custom Fields

Search Query Fields

These filters are available in draft search queries:

Field Type Description
id: number Id
is.queued: boolean Is Queued
name: text Name
queue.deliverAt: date Delivery Date
queue.fails: number # Fails
to: text To
token: text Token
type: text Message Type
updated: date Updated
worker: record Worker
worker.id: chooser Worker

Worklist Columns

These columns are available on draft worklists:

Column Description
cf_<id> Custom Field
m_hint_to To
m_id Id
m_is_queued Is Queued
m_name Name
m_queue_delivery_date Delivery Date
m_queue_fails # Fails
m_token Token
m_type Message Type
m_updated Updated
m_worker_id Worker