Workflow
Workflow
Flujo automatizado compuesto por pasos conectados.
Identificador único del workflow.
wf_1B2M2Y8AsgTpgAmY7PhCfgNombre del workflow.
Flujo de revisión legal DSRDescripción del workflow.
Orquesta revisión legal y transición de estadoEstado de publicación del workflow.
Possible values: [draft, published]
draftCantidad total de ejecuciones históricas del workflow.
42created_by objectnullable
Identificador único del usuario de empresa que creó el workflow.
cusr_1B2M2Y8AsgTpgAmY7PhCfgNombre del usuario de empresa.
Catalina SepúlvedaEmail del usuario de empresa.
catalina@company.comsettings object
failure_alerts object
Envía un correo cuando una ejecución del workflow termina en estado failed.
falseID del paso inicial. Debe apuntar a un bloque trigger.
66f01d4f1d0b5a4f7a9c1111steps object[]
Pasos que componen el workflow.
- WorkflowStepActionBlock
- WorkflowStepConditionBlock
- WorkflowStepFilterBlock
- WorkflowStepSplitBlock
- WorkflowStepJoinBlock
- WorkflowStepSwitchBlock
- WorkflowStepDelayedActionBlock
- WorkflowStepDsrStateTransitionActionBlock
- WorkflowStepEmailActionBlock
- WorkflowStepFormBlock
- WorkflowStepHttpRequestActionBlock
- WorkflowStepProcessDsrTriggerBlock
- WorkflowStepTriggerBlock
- WorkflowStepWebhookTriggerBlock
ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111ActionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00ZID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111ConditionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zconditions object[]required
66f01d4f1d0b5a4f7a9c6666Expresión evaluable sobre metadata del contexto. Soporta operadores ==, !=, >, >=, <, <=, contains, not contains, starts with, ends with, empty, not empty; y rutas anidadas con notación de punto (ej. person.profile.locale).
legal_review_approved == truePaso destino cuando la condición es verdadera.
66f01d4f1d0b5a4f7a9c4444false66f01d4f1d0b5a4f7a9c5555ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111FilterBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zcondition objectrequired
66f01d4f1d0b5a4f7a9c6666Expresión evaluable sobre metadata del contexto. Soporta operadores ==, !=, >, >=, <, <=, contains, not contains, starts with, ends with, empty, not empty; y rutas anidadas con notación de punto (ej. person.profile.locale).
legal_review_approved == truePaso destino cuando la condición es verdadera.
66f01d4f1d0b5a4f7a9c4444falseID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111SplitBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zbranch_slots object[]
66f01d4f1d0b5a4f7a9c444466f01d4f1d0b5a4f7a9c2222ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111JoinBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Z66f01d4f1d0b5a4f7a9c3333ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111SwitchBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zconditions object[]required
66f01d4f1d0b5a4f7a9c6666Expresión evaluable sobre metadata del contexto. Soporta operadores ==, !=, >, >=, <, <=, contains, not contains, starts with, ends with, empty, not empty; y rutas anidadas con notación de punto (ej. person.profile.locale).
legal_review_approved == truePaso destino cuando la condición es verdadera.
66f01d4f1d0b5a4f7a9c4444false66f01d4f1d0b5a4f7a9c5555ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111DelayedActionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00ZPossible values: >= 1 and <= 524160
10approval.delay_valuePossible values: [minutes, hours, days, weeks]
daysID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111DsrStateTransitionActionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00ZPossible values: [resolve]
resolvePossible values: [approved, partially_approved, rejected]
approvedFalta validar {{data_subject_request.contact_information.email}}Hola {{data_subject_request.contact_information.email}}, tu solicitud fue resuelta.ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111EmailActionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zlegal@company.comRevisión pendienteRevisa la solicitud pendienteID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111FormBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00ZConfirm legal reviewInternal reviewer handoffCollect an internal decision before continuing.Send formPossible values: [specific_company_user, dsr_assignee]
specific_company_usercusr_1B2M2Y8AsgTpgAmY7PhCfgfields object[]required
Clave estable para almacenar la respuesta del campo.
decisionEtiqueta visible del campo en el formulario.
DecisionPossible values: [text, textarea, boolean, select]
selecttrueOpciones permitidas cuando type es select.
["approve","reject"]ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111HttpRequestActionBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zhttps://api.example.com/orders/{{order.id}}Possible values: [GET, POST, PUT, PATCH, DELETE]
POSTheaders object[]
Nombre del header.
AuthorizationValor del header.
Bearer {{token}}{"status":"approved"}Possible values: >= 1 and <= 120
15expected_response_schema object[]
Ruta del campo en payload, con notación de punto para anidados.
reviewer.idPossible values: [string, integer, number, boolean, object, array, any]
stringIndica si el campo es obligatorio para disparar el workflow.
trueresponse_extractors object[]
Ruta del campo en el body de respuesta JSON.
result.ticket_idNombre de la variable extraída en metadata.
ticket_idPossible values: [string, integer, number, boolean, object, array, any]
stringIndica si el valor extraído es obligatorio.
trueID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111ProcessDsrTriggerBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zsettings object
ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111TriggerBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zsettings object
ID del paso (Mongoid embedded document id).
66f01d4f1d0b5a4f7a9c1111WebhookTriggerBlockSiguiente paso para secuencia lineal.
66f01d4f1d0b5a4f7a9c22222024-03-21T10:00:00Z2024-03-21T10:05:00Zsettings object
Token público generado para recibir llamadas webhook.
whk_YWJjMTIzZXhhbXBsZV90b2tlbgexpected_payload_schema object[]
Campos del payload esperados para disparar el workflow.
Ruta del campo en payload, con notación de punto para anidados.
reviewer.idPossible values: [string, integer, number, boolean, object, array, any]
stringIndica si el campo es obligatorio para disparar el workflow.
true2024-03-21T10:00:00Z2024-03-21T10:05:00Z{
"id": "wf_1B2M2Y8AsgTpgAmY7PhCfg",
"name": "Flujo de revisión legal DSR",
"description": "Orquesta revisión legal y transición de estado",
"status": "draft",
"runs_count": 42,
"created_by": {
"id": "cusr_1B2M2Y8AsgTpgAmY7PhCfg",
"name": "Catalina Sepúlveda",
"email": "catalina@company.com"
},
"settings": {
"failure_alerts": {
"enabled": false
}
},
"starting_step_id": "66f01d4f1d0b5a4f7a9c1111",
"steps": [
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"conditions": [
{
"id": "66f01d4f1d0b5a4f7a9c6666",
"expression": "legal_review_approved == true",
"step_id": "66f01d4f1d0b5a4f7a9c4444",
"_destroy": false
}
],
"else_step_id": "66f01d4f1d0b5a4f7a9c5555"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"condition": {
"id": "66f01d4f1d0b5a4f7a9c6666",
"expression": "legal_review_approved == true",
"step_id": "66f01d4f1d0b5a4f7a9c4444",
"_destroy": false
}
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"branch_slots": [
{
"id": "66f01d4f1d0b5a4f7a9c4444",
"step_id": "66f01d4f1d0b5a4f7a9c2222"
}
]
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"split_step_id": "66f01d4f1d0b5a4f7a9c3333"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"conditions": [
{
"id": "66f01d4f1d0b5a4f7a9c6666",
"expression": "legal_review_approved == true",
"step_id": "66f01d4f1d0b5a4f7a9c4444",
"_destroy": false
}
],
"else_step_id": "66f01d4f1d0b5a4f7a9c5555"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"delay_minutes": 10,
"delay_variable_path": "approval.delay_value",
"delay_variable_unit": "days"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"action": "resolve",
"terminal_state": "approved",
"rejection_reason_template": "Falta validar {{data_subject_request.contact_information.email}}",
"email_content_template": "Hola {{data_subject_request.contact_information.email}}, tu solicitud fue resuelta."
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"to": "legal@company.com",
"subject": "Revisión pendiente",
"body": "Revisa la solicitud pendiente"
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"title": "Confirm legal review",
"description": "Internal reviewer handoff",
"form_description": "Collect an internal decision before continuing.",
"submit_button_label": "Send form",
"recipient_type": "specific_company_user",
"recipient_company_user_token": "cusr_1B2M2Y8AsgTpgAmY7PhCfg",
"fields": [
{
"key": "decision",
"label": "Decision",
"type": "select",
"required": true,
"options": [
"approve",
"reject"
]
}
]
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"url": "https://api.example.com/orders/{{order.id}}",
"method": "POST",
"headers": [
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
],
"body": "{\"status\":\"approved\"}",
"timeout_seconds": 15,
"expected_response_schema": [
{
"path": "reviewer.id",
"type": "string",
"required": true
}
],
"response_extractors": [
{
"path": "result.ticket_id",
"key": "ticket_id",
"type": "string",
"required": true
}
]
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"settings": {}
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"settings": {}
},
{
"id": "66f01d4f1d0b5a4f7a9c1111",
"type": "string",
"next_step_id": "66f01d4f1d0b5a4f7a9c2222",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z",
"settings": {},
"public_webhook_token": "whk_YWJjMTIzZXhhbXBsZV90b2tlbg",
"expected_payload_schema": [
{
"path": "legal_review_approved",
"type": "boolean",
"required": true
},
{
"path": "reviewer.id",
"type": "string",
"required": true
}
]
}
],
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:05:00Z"
}