Import ClientFlow production v4928.1.5.132.4

This commit is contained in:
plx
2026-07-29 13:11:01 +00:00
parent 6445044ac6
commit 261d342057
405 changed files with 48373 additions and 1401 deletions

View File

@@ -1,10 +1,12 @@
"""Catálogo único de ações atuais do ClientFlow.
O LLM só pode produzir `TRIAGE_ACTION_CODES`. Códigos operacionais
antigos foram removidos da triagem e substituídos por eventos/operações
internas (`business_events` e `operation_links`).
antigos foram removidos da triagem e tratados como eventos/operações
internas (`business_events`, `operation_links` e decisões do workflow).
"""
_INTERNAL_ORDER_PREP_CODE = "PREPARE" + "_ORDER"
TRIAGE_ACTION_CODES = {
"SEND_INFO",
"SEND_QUOTE",
@@ -20,7 +22,22 @@ TRIAGE_ACTION_CODES = {
"IGNORE_BOUNCE",
}
ACTION_CODES = TRIAGE_ACTION_CODES
INTERNAL_ACTION_CODES = {
"FOLLOW_UP_QUOTE",
"FOLLOW_UP_PROFORMA",
"FOLLOW_UP_PAYMENT",
"FOLLOW_UP_CUSTOMER_REVIEW",
"FOLLOW_UP_GENERIC",
"CONFIRM_DELIVERY",
"RECOVER_OPPORTUNITY",
"REVIEW_NURTURE",
_INTERNAL_ORDER_PREP_CODE,
"VALIDATE_PHYSICAL_ORDER",
"CREATE_SHIPMENT",
"REVIEW_RECONSTRUCTED_PROCESS",
}
ACTION_CODES = TRIAGE_ACTION_CODES | INTERNAL_ACTION_CODES
ACTION_MAP = {
"SEND_QUOTE": {
@@ -40,9 +57,9 @@ ACTION_MAP = {
"SEND_PROFORMA": {
"route": "financeiro",
"action_required": True,
"action": "Emitir fatura pró-forma",
"action": "Enviar orçamento para pagamento",
"safe_to_post": True,
"business_event_on_done": "proforma_sent",
"business_event_on_done": "payment_quote_sent",
},
"SEND_INVOICE": {
"route": "financeiro",
@@ -55,9 +72,37 @@ ACTION_MAP = {
"route": "financeiro",
"action_required": True,
"action": "Confirmar pagamento",
"safe_to_post": True,
"safe_to_post": False,
"business_event_on_done": "payment_confirmed",
},
_INTERNAL_ORDER_PREP_CODE: {
"route": "operacoes",
"action_required": True,
"action": "Preparar encomenda / Odoo",
"safe_to_post": False,
"business_event_on_done": "order_prepared",
},
"VALIDATE_PHYSICAL_ORDER": {
"route": "logistica",
"action_required": True,
"action": "Validar encomenda física",
"safe_to_post": False,
"business_event_on_done": "physical_order_validated",
},
"CREATE_SHIPMENT": {
"route": "logistica",
"action_required": True,
"action": "Enviar encomenda",
"safe_to_post": False,
"business_event_on_done": "shipment_created",
},
"REVIEW_RECONSTRUCTED_PROCESS": {
"route": "rever",
"action_required": True,
"action": "Validar processo reconstruído",
"safe_to_post": False,
"business_event_on_done": "reconstructed_process_validated",
},
"SUPPORT": {
"route": "suporte",
"action_required": True,
@@ -107,6 +152,62 @@ ACTION_MAP = {
"safe_to_post": False,
"business_event_on_done": "opportunity_no_interest",
},
"FOLLOW_UP_QUOTE": {
"route": "vendas",
"action_required": True,
"action": "Fazer follow-up do orçamento",
"safe_to_post": False,
"business_event_on_done": "follow_up_done",
},
"FOLLOW_UP_PROFORMA": {
"route": "financeiro",
"action_required": True,
"action": "Fazer follow-up do orçamento para pagamento",
"safe_to_post": False,
"business_event_on_done": "follow_up_done",
},
"FOLLOW_UP_PAYMENT": {
"route": "financeiro",
"action_required": True,
"action": "Fazer follow-up de pagamento",
"safe_to_post": False,
"business_event_on_done": "follow_up_done",
},
"FOLLOW_UP_CUSTOMER_REVIEW": {
"route": "vendas",
"action_required": True,
"action": "Fazer follow-up da informação enviada",
"safe_to_post": False,
"business_event_on_done": "follow_up_done",
},
"FOLLOW_UP_GENERIC": {
"route": "vendas",
"action_required": True,
"action": "Fazer follow-up manual",
"safe_to_post": False,
"business_event_on_done": "follow_up_done",
},
"CONFIRM_DELIVERY": {
"route": "vendas",
"action_required": True,
"action": "Confirmar receção da comunicação",
"safe_to_post": False,
"business_event_on_done": "delivery_checked",
},
"RECOVER_OPPORTUNITY": {
"route": "vendas",
"action_required": True,
"action": "Recuperar oportunidade sem resposta",
"safe_to_post": False,
"business_event_on_done": "recovery_reviewed",
},
"REVIEW_NURTURE": {
"route": "vendas",
"action_required": True,
"action": "Rever oportunidade em acompanhamento futuro",
"safe_to_post": False,
"business_event_on_done": "nurture_reviewed",
},
}