37338-vm/new_definition.json
2026-01-11 08:54:28 +00:00

132 lines
6.1 KiB
JSON

{
"start_node_id": "awaiting_call",
"eligibility_rules": [
{
"type": "person_property_equals",
"params": {
"property": "role",
"value": "guest"
}
}
],
"nodes": {
"awaiting_call": {
"ui_hints": {
"title": "Follow-up Call",
"status": "active",
"reason": "Ready to log a new call attempt with the guest.",
"next_step": "Fill out the form below to log the details of your call.",
"form_schema": [
{ "name": "call_date", "label": "Call Date", "type": "datetime-local", "default": "now", "required": true },
{
"name": "outcome_status",
"label": "Call Outcome",
"type": "select",
"required": true,
"options": [
{ "value": "", "label": "-- Select Outcome --" },
{ "value": "no_answer", "label": "No Answer" },
{ "value": "wants_to_join", "label": "Wants to Join" },
{ "value": "declined", "label": "Declined" },
{ "value": "call_later", "label": "Call Later" }
]
},
{ "name": "note", "label": "Notes", "type": "textarea" },
{ "name": "next_contact_date", "label": "Next Contact Date", "type": "datetime-local", "condition": { "field": "outcome_status", "value": "call_later" }, "required": true }
]
}
},
"outcome_router": { "ui_hints": { "status": "processing" } },
"waiting_for_next_contact": {
"ui_hints": {
"title": "Call Scheduled",
"status": "paused",
"reason": "A follow-up call is scheduled for a future date.",
"next_step": "Click 'Log Next Call Attempt' to log the call now or on the scheduled date."
}
},
"decide_after_no_answer": {
"ui_hints": {
"title": "No Answer Logged",
"status": "paused",
"reason": "The guest did not answer the last call.",
"next_step": "Decide whether to try again or end the follow-up process."
}
},
"end_positive": { "ui_hints": { "title": "Wants to Join", "status": "completed", "reason": "Guest wants to join. New member process started.", "next_step": "" } },
"end_negative_declined": { "ui_hints": { "title": "Declined", "status": "terminated", "reason": "Guest declined to join.", "next_step": "" } },
"end_negative_no_answer": { "ui_hints": { "title": "Process Ended", "status": "terminated", "reason": "Process ended after no answer.", "next_step": "" } },
"end_negative_terminated": { "ui_hints": { "title": "Process Terminated", "status": "terminated", "reason": "Process manually terminated by user.", "next_step": "" } }
},
"transitions": [
{
"id": "submit_outcome",
"from": "awaiting_call",
"to": "outcome_router",
"name": "Log Call Attempt",
"actions": [
{ "type": "set_data", "params": { "keys": ["call_date", "outcome_status", "note", "next_contact_date"] } }
]
},
{
"id": "route_wants_to_join",
"from": "outcome_router",
"to": "end_positive",
"name": "Route to Positive End",
"condition": { "field": "outcome_status", "value": "wants_to_join" },
"actions": [
{ "type": "start_process", "process_code": "wprowadzenie-nowego-cz-onka" }
]
},
{
"id": "route_declined",
"from": "outcome_router",
"to": "end_negative_declined",
"name": "Route to Declined",
"condition": { "field": "outcome_status", "value": "declined" }
},
{
"id": "route_no_answer",
"from": "outcome_router",
"to": "decide_after_no_answer",
"name": "Route to No Answer",
"condition": { "field": "outcome_status", "value": "no_answer" }
},
{
"id": "route_call_later",
"from": "outcome_router",
"to": "waiting_for_next_contact",
"name": "Route to Call Later",
"condition": { "field": "outcome_status", "value": "call_later" }
},
{ "id": "continue_attempts", "from": "decide_after_no_answer", "to": "awaiting_call", "name": "Try Again" },
{ "id": "end_attempts", "from": "decide_after_no_answer", "to": "end_negative_no_answer", "name": "End Process" },
{ "id": "log_next_attempt", "from": "waiting_for_next_contact", "to": "awaiting_call", "name": "Log Next Call Attempt" },
{
"id": "terminate_from_awaiting_call",
"from": "awaiting_call",
"to": "end_negative_terminated",
"name": "Zakończ proces",
"actions": [ { "type": "set_data", "params": { "keys": ["termination_note"] } } ],
"form_schema": [ { "name": "termination_note", "label": "Reason for Termination (optional)", "type": "textarea" } ]
},
{
"id": "terminate_from_decide",
"from": "decide_after_no_answer",
"to": "end_negative_terminated",
"name": "Zakończ proces",
"actions": [ { "type": "set_data", "params": { "keys": ["termination_note"] } } ],
"form_schema": [ { "name": "termination_note", "label": "Reason for Termination (optional)", "type": "textarea" } ]
},
{
"id": "terminate_from_waiting",
"from": "waiting_for_next_contact",
"to": "end_negative_terminated",
"name": "Zakończ proces",
"actions": [ { "type": "set_data", "params": { "keys": ["termination_note"] } } ],
"form_schema": [ { "name": "termination_note", "label": "Reason for Termination (optional)", "type": "textarea" } ]
}
]
}