{
    "name": "WA Уведомление о встрече для клиента",
    "description": "Процесс Routena, массово импортированный из Sensei.",
    "source": {
        "system": "sensei",
        "process_id": "20960",
        "entry_node_id": "481324",
        "sensei_process_id": "20960",
        "sensei_version_id": "338318",
        "sensei_version_kind": "deployed",
        "is_copy": false
    },
    "start": "sensei_1105210",
    "nodes": {
        "sensei_1105210": {
            "type": "if",
            "config": {
                "conditions": [
                    [
                        {
                            "operator": "not_empty",
                            "left": {
                                "source": "lead_field",
                                "field_name": "Смс не отправлять"
                            },
                            "right": {
                                "source": "literal",
                                "value": null
                            }
                        }
                    ],
                    [
                        {
                            "operator": "contains",
                            "left": {
                                "source": "lead_source_name"
                            },
                            "right": {
                                "source": "literal",
                                "value": "Интерфейс"
                            }
                        }
                    ]
                ]
            },
            "on_true": "sensei_481308",
            "on_false": "sensei_481386"
        },
        "sensei_481386": {
            "type": "multicondition",
            "config": {
                "branches": [
                    {
                        "code": "branch_0",
                        "name": "Прошедшие дата и время",
                        "next": "sensei_481307",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "before_days",
                                    "left": {
                                        "source": "lead_field",
                                        "field_name": "Дата и время встречи"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": 1
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_1",
                        "name": "Наступит менее чем чз 2 часа",
                        "next": "sensei_481308",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "after_days",
                                    "left": {
                                        "source": "lead_field",
                                        "field_name": "Дата и время встречи"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 0,
                                            "max": 2
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_2",
                        "name": "Иначе",
                        "next": "sensei_481387",
                        "otherwise": true
                    }
                ]
            }
        },
        "sensei_481387": {
            "type": "multicondition",
            "config": {
                "branches": [
                    {
                        "code": "branch_0",
                        "name": "онлайн",
                        "next": "sensei_481310",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "equal",
                                    "left": {
                                        "source": "lead_field",
                                        "field_name": "Тип встречи"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": "Онлайн"
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_1",
                        "name": "офис",
                        "next": "sensei_481317",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "equal",
                                    "left": {
                                        "source": "lead_field",
                                        "field_name": "Тип встречи"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": "В офисе"
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_2",
                        "name": "Иначе",
                        "next": "sensei_481308",
                        "otherwise": true
                    }
                ]
            }
        },
        "sensei_481308": {
            "type": "end",
            "config": {
                "result_code": "sensei_result_8d64deeabed8",
                "result_name": "Отправка уведомления не требуется"
            }
        },
        "sensei_481317": {
            "type": "field",
            "config": {
                "fields": [],
                "local_parameters": [
                    {
                        "key": "local_param_16019",
                        "name": "Дата и время уведомления",
                        "value": {
                            "source": "lead_field",
                            "field_name": "Дата и время встречи",
                            "add_seconds": -7200
                        },
                        "date_only": false
                    },
                    {
                        "key": "local_param_16020",
                        "name": "Исходное время встрече",
                        "value": {
                            "source": "lead_field",
                            "field_name": "Дата и время встречи"
                        },
                        "date_only": false
                    }
                ],
                "status_update": null
            },
            "next": "sensei_481318"
        },
        "sensei_481318": {
            "type": "wait",
            "config": {
                "mode": "until",
                "until": {
                    "source": "context",
                    "key": "local_param_16019"
                }
            },
            "next": "sensei_481319"
        },
        "sensei_481319": {
            "type": "if",
            "config": {
                "conditions": [
                    [
                        {
                            "operator": "after_days",
                            "left": {
                                "source": "lead_field",
                                "field_name": "Дата и время встречи"
                            },
                            "right": {
                                "source": "literal",
                                "value": {
                                    "min": 0,
                                    "max": null
                                }
                            }
                        },
                        {
                            "operator": "equal",
                            "left": {
                                "source": "context",
                                "key": "local_param_16020"
                            },
                            "right": {
                                "source": "literal",
                                "value": "{{Сделка.Дата и время встречи}}"
                            }
                        }
                    ]
                ]
            },
            "on_true": "sensei_969507",
            "on_false": "sensei_481308"
        },
        "sensei_969507": {
            "type": "noop",
            "next": "sensei_481315"
        },
        "sensei_969506": {
            "type": "telegram",
            "config": {
                "text": "Клиент хочет перенести встречу",
                "recipient": "responsible"
            },
            "next": "sensei_481315"
        },
        "sensei_481315": {
            "type": "end",
            "config": {
                "result_code": "sensei_result_d9f08871c7a9",
                "result_name": "Напоминания отправлено за 2 часа до встречи"
            }
        },
        "sensei_481310": {
            "type": "field",
            "config": {
                "fields": [],
                "local_parameters": [
                    {
                        "key": "local_param_16019",
                        "name": "Дата и время уведомления",
                        "value": {
                            "source": "lead_field",
                            "field_name": "Дата и время встречи",
                            "add_seconds": -7200
                        },
                        "date_only": false
                    },
                    {
                        "key": "local_param_16020",
                        "name": "Исходное время встрече",
                        "value": {
                            "source": "lead_field",
                            "field_name": "Дата и время встречи"
                        },
                        "date_only": false
                    }
                ],
                "status_update": null
            },
            "next": "sensei_481311"
        },
        "sensei_481311": {
            "type": "wait",
            "config": {
                "mode": "until",
                "until": {
                    "source": "context",
                    "key": "local_param_16019"
                }
            },
            "next": "sensei_481312"
        },
        "sensei_481312": {
            "type": "if",
            "config": {
                "conditions": [
                    [
                        {
                            "operator": "after_days",
                            "left": {
                                "source": "lead_field",
                                "field_name": "Дата и время встречи"
                            },
                            "right": {
                                "source": "literal",
                                "value": {
                                    "min": 0,
                                    "max": null
                                }
                            }
                        },
                        {
                            "operator": "equal",
                            "left": {
                                "source": "context",
                                "key": "local_param_16020"
                            },
                            "right": {
                                "source": "literal",
                                "value": "{{Сделка.Дата и время встречи}}"
                            }
                        }
                    ]
                ]
            },
            "on_true": "sensei_969505",
            "on_false": "sensei_481308"
        },
        "sensei_969505": {
            "type": "noop",
            "next": "sensei_481315"
        },
        "sensei_481307": {
            "type": "end",
            "config": {
                "result_code": "sensei_result_72b4ee557e61",
                "result_name": "Отправлять уведомление не требуется"
            }
        }
    },
    "process_key": "client_meeting_wa_notification"
}
