mirror of
https://github.com/hoshikawa2/first_contas.git
synced 2026-07-09 18:24:20 +00:00
211 lines
5.3 KiB
YAML
211 lines
5.3 KiB
YAML
name: pro_rata
|
|
version: 2
|
|
start: preparar
|
|
|
|
nodes:
|
|
- id: preparar
|
|
action: preparar_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
planos: $.input.planos
|
|
has_plano_controle: $.input.has_plano_controle
|
|
|
|
- id: formatar
|
|
action: formatar_pro_rata
|
|
input:
|
|
mensagem_base: $.vars.preparar.mensagem
|
|
pause:
|
|
enabled: true
|
|
when:
|
|
eq: [$.vars.preparar.await_user_input, true]
|
|
return_from: $.output.mensagem
|
|
expected_input:
|
|
key: resposta_usuario
|
|
allowed_values: ["SIM", "NAO", "OUTRO"]
|
|
normalize: upper_strip
|
|
resume_from: decisao_esclarecimento
|
|
|
|
- id: decisao_esclarecimento
|
|
action: no_op
|
|
input: {}
|
|
|
|
- id: ofertar_ajuste
|
|
action: formatar_pro_rata
|
|
input:
|
|
mensagem_base: $.vars.preparar.mensagem_oferta_ajuste
|
|
pause:
|
|
enabled: true
|
|
return_from: $.output.mensagem
|
|
expected_input:
|
|
key: resposta_usuario
|
|
allowed_values: ["SIM", "NAO", "OUTRO"]
|
|
normalize: upper_strip
|
|
resume_from: decisao_ajuste
|
|
|
|
- id: decisao_ajuste
|
|
action: no_op
|
|
input: {}
|
|
|
|
- id: reperguntar_esclarecimento
|
|
action: formatar_pro_rata
|
|
input:
|
|
mensagem_base: $.vars.preparar.mensagem_reperguntar_esclarecimento
|
|
pause:
|
|
enabled: true
|
|
return_from: $.output.mensagem
|
|
expected_input:
|
|
key: resposta_usuario
|
|
allowed_values: ["SIM", "NAO", "OUTRO"]
|
|
normalize: upper_strip
|
|
resume_from: decisao_esclarecimento
|
|
|
|
- id: reperguntar_ajuste
|
|
action: formatar_pro_rata
|
|
input:
|
|
mensagem_base: $.vars.preparar.mensagem_reperguntar_ajuste
|
|
pause:
|
|
enabled: true
|
|
return_from: $.output.mensagem
|
|
expected_input:
|
|
key: resposta_usuario
|
|
allowed_values: ["SIM", "NAO", "OUTRO"]
|
|
normalize: upper_strip
|
|
resume_from: decisao_ajuste
|
|
|
|
- id: registrar_nao_controle
|
|
action: registrar_atendimento_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
mensagem_base: $.vars.formatar.mensagem
|
|
caminho: nao_controle
|
|
|
|
- id: registrar_aceitou
|
|
action: registrar_atendimento_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
mensagem_base: $.vars.preparar.mensagem_pos_aceite
|
|
caminho: aceitou
|
|
ic: VEB.003
|
|
|
|
- id: registrar_recusou_ajuste
|
|
action: registrar_atendimento_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
social_sec_no: $.input.social_sec_no
|
|
mensagem_base: $.vars.preparar.mensagem_ajuste_recusado
|
|
caminho: recusou_ajuste
|
|
ic: VEB.003
|
|
|
|
- id: executar_contestacao
|
|
action: executar_contestacao_plano_controle
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
social_sec_no: $.input.social_sec_no
|
|
customer_id: $.input.customer_id
|
|
current_invoice_number: $.input.current_invoice_number
|
|
current_invoice_due_date: $.input.current_invoice_due_date
|
|
customer_type: $.input.customer_type
|
|
customer_status: $.input.customer_status
|
|
invoice_status: $.input.invoice_status
|
|
adjust_reason: $.input.adjust_reason
|
|
refund_option: $.input.refund_option
|
|
manual_conta_certa_indicator: $.input.manual_conta_certa_indicator
|
|
items: $.vars.definir_devolucao.items
|
|
invoice_amount_open: $.vars.definir_devolucao.invoice_amount_open
|
|
invoice_amount: $.vars.definir_devolucao.invoice_amount
|
|
devolucao: $.vars.definir_devolucao
|
|
|
|
- id: definir_devolucao
|
|
action: definir_devolucao_ajuste_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
planos: $.input.planos
|
|
invoice_id: $.input.invoice_id
|
|
customer_id: $.input.customer_id
|
|
invoice_detail: $.input.invoice_detail
|
|
invoice_period: $.input.invoice_period
|
|
invoice_emissao: $.input.invoice_emissao
|
|
|
|
- id: orientar_pagamento
|
|
action: orientar_pagamento_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
devolucao: $.vars.executar_contestacao.devolucao
|
|
|
|
- id: registrar_atendimento
|
|
action: registrar_atendimento_pro_rata
|
|
input:
|
|
msisdn: $.input.msisdn
|
|
social_sec_no: $.input.social_sec_no
|
|
mensagem_base: $.vars.orientar_pagamento.mensagem
|
|
devolucao: $.vars.orientar_pagamento.devolucao
|
|
caminho: nao_aceitou
|
|
ic: VEB.004
|
|
|
|
edges:
|
|
- from: preparar
|
|
to: formatar
|
|
|
|
- from: formatar
|
|
to: decisao_esclarecimento
|
|
priority: 10
|
|
when:
|
|
eq: [$.vars.preparar.await_user_input, true]
|
|
|
|
- from: formatar
|
|
to: registrar_nao_controle
|
|
priority: 20
|
|
|
|
- from: decisao_esclarecimento
|
|
to: registrar_aceitou
|
|
priority: 10
|
|
when:
|
|
eq: [$.input.resposta_usuario, SIM]
|
|
|
|
- from: decisao_esclarecimento
|
|
to: ofertar_ajuste
|
|
priority: 20
|
|
when:
|
|
eq: [$.input.resposta_usuario, NAO]
|
|
|
|
- from: decisao_esclarecimento
|
|
to: reperguntar_esclarecimento
|
|
priority: 30
|
|
|
|
- from: decisao_ajuste
|
|
to: definir_devolucao
|
|
priority: 10
|
|
when:
|
|
eq: [$.input.resposta_usuario, SIM]
|
|
|
|
- from: decisao_ajuste
|
|
to: registrar_recusou_ajuste
|
|
priority: 20
|
|
when:
|
|
eq: [$.input.resposta_usuario, NAO]
|
|
|
|
- from: decisao_ajuste
|
|
to: reperguntar_ajuste
|
|
priority: 30
|
|
|
|
- from: definir_devolucao
|
|
to: executar_contestacao
|
|
|
|
- from: executar_contestacao
|
|
to: orientar_pagamento
|
|
|
|
- from: orientar_pagamento
|
|
to: registrar_atendimento
|
|
|
|
- from: registrar_nao_controle
|
|
to: END
|
|
|
|
- from: registrar_aceitou
|
|
to: END
|
|
|
|
- from: registrar_recusou_ajuste
|
|
to: END
|
|
|
|
- from: registrar_atendimento
|
|
to: END
|