{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/onboard-io/json-schema/onboard-io-workflow-serializer-schema.json",
  "title": "WorkflowSerializer",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/onboard-io-openapi.json#/components/schemas/WorkflowSerializer",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "name": {
      "type": "string"
    },
    "workflow_type": {
      "type": "string",
      "enum": [
        "quick_action",
        "event",
        "scheduled"
      ],
      "x-onboard-source": "serializer-or-model-choices"
    },
    "workflow_actions": {
      "type": "string"
    },
    "workflow_actions_display": {
      "type": "string",
      "readOnly": true
    },
    "trigger": {
      "type": "string",
      "enum": [
        "map-created",
        "map-updated",
        "map-status-updated",
        "map-owner-updated",
        "map-task-created",
        "map-task-assignee-updated",
        "map-task-due-date-updated",
        "map-task-status-updated",
        "map-section-completed",
        "discussion-message-created",
        "customer-created",
        "customer-updated",
        "custom-form-submitted",
        "document-completed",
        "document-voided"
      ],
      "description": "Only required when workflow_type=event",
      "x-onboard-source": "serializer-or-model-choices"
    },
    "trigger_display": {
      "type": "string",
      "readOnly": true
    },
    "internal_description": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "modified_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "created_by": {
      "type": "string",
      "readOnly": true
    },
    "button_color": {
      "type": "string"
    },
    "button_placement": {
      "type": "string",
      "enum": [
        "map",
        "map_task"
      ],
      "x-onboard-source": "serializer-or-model-choices"
    },
    "button_title": {
      "type": "string"
    },
    "is_enabled": {
      "type": "boolean"
    },
    "filters": {
      "type": "object"
    },
    "filters_rql": {
      "type": "string"
    },
    "workflow_events": {
      "type": "string",
      "readOnly": true
    },
    "is_hidden": {
      "type": "boolean"
    },
    "schedule_type": {
      "type": "string",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ],
      "x-onboard-source": "serializer-or-model-choices"
    },
    "schedule_day": {
      "type": "integer",
      "description": "Day of the week as an integer (0 for Monday, 6 for Sunday)"
    },
    "schedule_time": {
      "type": "string",
      "format": "time"
    }
  },
  "required": [
    "name",
    "workflow_type"
  ]
}