DocumentaçãoDocumentationDocumentaciónOne Conecta
ÍndiceIndexÍndice
Baixar .mdDownload .mdBajar .md
Você está vendo esta documentação online. No topo você também pode baixar o PDF (mesmo conteúdo desta página, no idioma e modo atuais) e o Markdown (Funcional ou Técnica).You are viewing this documentation online. At the top you can also download the PDF (same content as this page, in the current language and mode) and the Markdown (Functional or Technical).Está viendo esta documentación en línea. Arriba también puede bajar el PDF (mismo contenido de esta página, en el idioma y modo actuales) y el Markdown (Funcional o Técnica).
Transação gRPC · DispatchergRPC transaction · DispatcherTransacción gRPC · Dispatcher

Relatório de caixaCash payment reportInforme de caja

A transação de escrita que informa ao backend um recebimento de pagamento feito em campo — o valor, o método, a conta e a data — quando o rep registra um pagamento durante uma entrega ou um pedido pronta-entrega. É um relatório enxuto, com oito campos num payload plano; todo o contrato wire é montado no builder. The write transaction that reports a collected payment to the backend — the amount, the method, the account and the date — when the rep records a payment during a delivery or a prompt (van-sale) order. It's a lean report, eight fields in a flat payload; the whole wire contract is assembled in the builder. La transacción de escritura que informa al backend un pago cobrado — el monto, el método, la cuenta y la fecha — cuando el rep registra un pago durante una entrega o un pedido de venta directa. Es un informe escueto, ocho campos en un payload plano; todo el contrato wire se arma en el builder.

PúblicoAudiencePúblico
QA · Suporte · Produto · DevQA · Support · Product · DevQA · Soporte · Producto · Dev
CamadaLayerCapa
Escrita · DispatcherWrite · DispatcherEscritura · Dispatcher
AtualizadoUpdatedActualizado
18/08/20262026-08-18
Disponível emAvailable inDisponible en BR CL
01

O que é e quando aconteceWhat it is and when it happensQué es y cuándo ocurre

Quando o representante de vendas registra o recebimento de um pagamento em campo — durante uma entrega ou uma venda pronta-entrega —, além de guardar esse pagamento, o app envia ao backend um relatório de caixa: um aviso curto de que aquele dinheiro foi recebido. Ele informa quanto foi recebido, por qual método, de qual conta e em que data. Serve para a área financeira reconciliar o caixa do rep com os pedidos. When the sales rep records a collected payment in the field — during a delivery or a prompt (van-sale) order — the app, besides storing that payment, sends the backend a cash payment report: a short notice that the money was received. It states how much was collected, by which method, from which account and on which date. It lets finance reconcile the rep's cash box against the orders. Cuando el representante de ventas registra un pago cobrado en campo — durante una entrega o una venta directa — la app, además de guardar ese pago, envía al backend un informe de caja: un aviso corto de que ese dinero se recibió. Indica cuánto se cobró, por qué método, de qué cuenta y en qué fecha. Sirve para que finanzas concilie la caja del rep con los pedidos.

É um aviso, não o pagamentoA notice, not the paymentUn aviso, no el pago

O pagamento em si é montado na criação de pagamentos; esta transação apenas reporta o caixa ao backend em paralelo.The payment itself is built in payment creation; this transaction only reports the cash to the backend alongside it.El pago en sí se arma en la creación de pagos; esta transacción solo reporta la caja al backend en paralelo.

Só em entrega e pronta-entregaDelivery & prompt onlySolo entrega y venta directa

Dispara apenas quando o pagamento nasce de uma entrega ou de um pedido pronta-entrega. Nas cobranças financeiras comuns, não é enviado.It fires only when the payment comes from a delivery or a prompt order. For ordinary financial collections, it isn't sent.Se dispara solo cuando el pago viene de una entrega o un pedido de venta directa. En cobros financieros comunes, no se envía.

Relatório enxutoLean reportInforme escueto

Poucos dados: conta, valor, método, referência e datas. Sem itens de pedido nem detalhamento — o pedido tem transação própria.A handful of data: account, amount, method, reference and dates. No order lines or breakdown — the order has its own transaction.Pocos datos: cuenta, monto, método, referencia y fechas. Sin líneas de pedido ni desglose — el pedido tiene su propia transacción.

Transação irmãSister transactionTransacción hermana Junto do relatório de caixa, a mesma jornada dispara a Coleta de pagamento — a transação que envia o pagamento em si. As duas nascem do mesmo gesto do rep, mas são despachos separados. Alongside the cash report, the same journey fires Payment collection — the transaction that sends the payment itself. Both come from the same rep gesture, but they are separate dispatches. Junto al informe de caja, la misma jornada dispara Cobro de pago — la transacción que envía el pago en sí. Ambas nacen del mismo gesto del rep, pero son despachos separados.

02

Fluxo de telas que disparaScreen flow that fires itFlujo de pantallas que lo dispara

A transação é o último passo do registro de um pagamento em entrega/pronta-entrega. As telas pertencem à feature de Criação de pagamentos; aqui só situamos onde o envio acontece:The transaction is the last step of recording a payment in a delivery / prompt order. The screens belong to the Payment creation feature; here we only place where the send happens:La transacción es el último paso del registro de un pago en entrega / venta directa. Las pantallas pertenecen a la feature de Creación de pagos; aquí solo situamos dónde ocurre el envío:

  1. Entrega ou pronta-entregaDelivery or prompt orderEntrega o venta directaO rep está concluindo uma entrega ou uma venda pronta-entrega e chega ao recebimento.The rep is finishing a delivery or a prompt sale and reaches the payment step.El rep está terminando una entrega o una venta directa y llega al cobro.
  2. Criação de pagamentosPayment creationCreación de pagosEscolhe o método (dinheiro, boleto, Pix…), informa valor, referência e evidência.Picks the method (cash, bank slip, Pix…), enters amount, reference and evidence.Elige el método (efectivo, boleto, Pix…), ingresa monto, referencia y evidencia.
  3. Confirmar pagamentoConfirm paymentConfirmar pagoAo confirmar, o app envia o pagamento e, quando a origem é entrega/pronta-entrega, dispara em paralelo o relatório de caixa.On confirm, the app sends the payment and, when the origin is delivery/prompt, fires the cash report alongside.Al confirmar, la app envía el pago y, cuando el origen es entrega/venta directa, dispara en paralelo el informe de caja.
  4. Relatório de caixa → esta transaçãoCash report → this transactionInforme de caja → esta transacciónÉ este passo que aciona a transação: um resumo do caixa recebido sobe ao backend.This is the step that triggers the transaction: a summary of the collected cash goes up to the backend.Este es el paso que activa la transacción: un resumen de la caja cobrada sube al backend.
03

Depois do envioAfter sendingDespués del envío

Confirmação ao repConfirmation to the repConfirmación al rep
O relatório sobe em segundo plano, junto do pagamento. O rep vê a confirmação do pagamento na tela; o relatório de caixa não tem uma tela própria de status — é um aviso técnico ao backend.The report goes up in the background, alongside the payment. The rep sees the payment confirmation on screen; the cash report has no status screen of its own — it's a technical notice to the backend.El informe sube en segundo plano, junto al pago. El rep ve la confirmación del pago en pantalla; el informe de caja no tiene pantalla de estado propia — es un aviso técnico al backend.
Sem internetOfflineSin internet
Se o pagamento é salvo para envio posterior, o relatório de caixa é reenviado depois junto — o rep não perde o registro. Um reenvio pode, em tese, duplicar; o sistema usa um identificador de transação para mitigar.If the payment is saved to send later, the cash report is re-sent afterwards alongside it — the rep doesn't lose the record. A resend could, in theory, duplicate; the system uses a transaction id to mitigate.Si el pago se guarda para enviar luego, el informe de caja se reenvía después junto — el rep no pierde el registro. Un reenvío podría, en teoría, duplicar; el sistema usa un identificador de transacción para mitigar.
Acompanhar o envioTracking the sendSeguir el envío
O status técnico do despacho (enviado, em fila, com erro) pode ser acompanhado na central de dados / tracking de despachos do app — útil para suporte investigar um envio.The dispatch's technical status (sent, queued, errored) can be followed in the app's data center / dispatch tracking — useful for support to investigate a send.El estado técnico del despacho (enviado, en cola, con error) puede seguirse en el centro de datos / tracking de despachos de la app — útil para que soporte investigue un envío.
04

Visão técnicaTechnical overviewVisión técnica

Relatório de caixa é uma transação de saída leve: um payload JSON plano de oito chaves resumindo um pagamento recebido. É despachada pelo orquestrador de submissão de pagamentos, ao lado da Coleta de pagamento, apenas quando o pagamento vem de uma entrega ou pronta-entrega. Cash payment report is a lightweight outbound transaction: a flat eight-key JSON payload summarizing a collected payment. It's dispatched by the payment submission orchestrator, alongside Payment collection, only when the payment comes from a delivery or prompt order. Informe de caja es una transacción de salida liviana: un payload JSON plano de ocho claves que resume un pago cobrado. Lo despacha el orquestador de envío de pagos, junto a Cobro de pago, solo cuando el pago viene de una entrega o venta directa.

Payload plano, 8 chavesFlat payload, 8 keysPayload plano, 8 claves

Sem arrays nem objetos aninhados: conta, PO, valor, usuário, método, referência e duas datas.No arrays or nested objects: account, PO, amount, user, method, reference and two dates.Sin arrays ni objetos anidados: cuenta, PO, monto, usuario, método, referencia y dos fechas.

Input com entities cruasRaw-entity inputInput con entities crudas

O input carrega o PaymentDraftEntity e o ResourceEntity crus (CLAUDE.md §36); o build() deriva método, referência e username.The input carries the raw PaymentDraftEntity and ResourceEntity (CLAUDE.md §36); build() derives method, reference and username.El input lleva el PaymentDraftEntity y el ResourceEntity crudos (CLAUDE.md §36); el build() deriva método, referencia y username.

RPC genéricoGeneric RPCRPC genérico

Não há RPC próprio: tudo passa pelo mesmo sendTransaction, com o JSON no campo message e serviceName = CashPaymentReportAPI como discriminador.There's no dedicated RPC: everything goes through the same sendTransaction, with the JSON in message and serviceName = CashPaymentReportAPI as the discriminator.No hay RPC propio: todo pasa por el mismo sendTransaction, con el JSON en message y serviceName = CashPaymentReportAPI como discriminador.

FontesSourcesFuentes BuildCashPaymentReportDispatcherPayloadUseCase + CashPaymentReportDispatcherPayloadInput + DispatcherType.cashPaymentReport + DispatcherConectaRep.proto. O input carrega entities cruas de domínio (CLAUDE.md §36); o build() constrói todo o wire. BuildCashPaymentReportDispatcherPayloadUseCase + CashPaymentReportDispatcherPayloadInput + DispatcherType.cashPaymentReport + DispatcherConectaRep.proto. The input carries raw domain entities (CLAUDE.md §36); build() constructs the entire wire. BuildCashPaymentReportDispatcherPayloadUseCase + CashPaymentReportDispatcherPayloadInput + DispatcherType.cashPaymentReport + DispatcherConectaRep.proto. El input lleva entities crudas de dominio (CLAUDE.md §36); el build() construye todo el wire.

05

Transporte gRPCgRPC transportTransporte gRPC

DispatcherConectaRep.proto · proto3 · package mn.bat.conectarep.dispatcher. O serviço expõe um único RPC genérico — não existe mensagem por transação. TODA transação de escrita do app usa este mesmo sendTransaction; o que muda é o serviceName (discriminador) e o JSON dentro de message. Para o relatório de caixa, serviceName = CashPaymentReportAPI.The service exposes a single generic RPC — there's no per-transaction message. EVERY write transaction in the app uses this same sendTransaction; what changes is the serviceName (discriminator) and the JSON inside message. For the cash report, serviceName = CashPaymentReportAPI.El servicio expone un único RPC genérico — no existe mensaje por transacción. TODA transacción de escritura de la app usa este mismo sendTransaction; lo que cambia es el serviceName (discriminador) y el JSON dentro de message. Para el informe de caja, serviceName = CashPaymentReportAPI.

sendTransactionunary
MétodoMethodMétodo

rpc sendTransaction(InboxTransactionRequest) returns (InboxTransactionReply)

path /mn.bat.conectarep.dispatcher.DispatcherConectaRepService/sendTransaction

Request · InboxTransactionRequest
endpoint
string · #1 · endpoint alvo (config de ambiente)target endpoint (environment config)endpoint destino (config de ambiente)
serviceName
string · #2 · discriminadorCashPaymentReportAPI (sem prefixo Promo_: hasPromotion é sempre false)discriminatorCashPaymentReportAPI (no Promo_ prefix: hasPromotion is always false)discriminadorCashPaymentReportAPI (sin prefijo Promo_: hasPromotion es siempre false)
dateReference
string · #3 · AAAA-MM-DD do envio (formatDate(submittedAt))YYYY-MM-DD of the submission (formatDate(submittedAt))AAAA-MM-DD del envío (formatDate(submittedAt))
transactionReference
string · #4 · o poNumber (correlação; "-" se vazio)the poNumber (correlation; "-" if empty)el poNumber (correlación; "-" si vacío)
username
string · #5
message
string · #6 · o payload JSON serializado (a tabela da seção 07)the JSON payload serialized (the table in section 07)el payload JSON serializado (la tabla de la sección 07)
manufacturer
string · #7 · dado do dispositivodevice datadato del dispositivo
model
string · #8 · dado do dispositivodevice datadato del dispositivo
deviceUuid
string · #9 · literal provisório hoje (ver Pendências)provisional literal today (see Pending)literal provisional hoy (ver Pendientes)
deviceVersion
string · #10
tid
int64 · #11 · id de transação para idempotência/replaytransaction id for idempotency/replayid de transacción para idempotencia/replay
Reply · InboxTransactionReply
status
int32 · #1 · status do ack (0 = sucesso)ack status (0 = success)status del ack (0 = éxito)
message
string · #2 · mensagem do backendbackend messagemensaje del backend
transactionId
int32 · #3 · id atribuído pelo backend (correlação)backend-assigned id (correlation)id asignado por el backend (correlación)

Envelope → Request O builder devolve um DispatcherEnvelope (type, serviceName, payload, account, transactionReference, dateReference). O DispatcherGateway serializa payload em JSON para message, copia serviceName/dateReference/transactionReference, preenche os campos de dispositivo e o bearer token de auth, e chama o RPC. O destino é DispatcherDestination.salesforce (default). The builder returns a DispatcherEnvelope (type, serviceName, payload, account, transactionReference, dateReference). The DispatcherGateway serializes payload to JSON into message, copies serviceName/dateReference/transactionReference, fills in the device fields and the auth bearer token, and calls the RPC. The destination is DispatcherDestination.salesforce (default). El builder devuelve un DispatcherEnvelope (type, serviceName, payload, account, transactionReference, dateReference). El DispatcherGateway serializa payload a JSON en message, copia serviceName/dateReference/transactionReference, completa los campos del dispositivo y el bearer token de auth, y llama al RPC. El destino es DispatcherDestination.salesforce (default).

Para o relatório de caixa, resendMayDuplicate == true: um reenvio (ex.: recuperação de fila offline via syncRegister) pode duplicar o relatório no backend; a idempotência via tid é o que mitiga isso.For the cash report, resendMayDuplicate == true: a resend (e.g. offline-queue recovery via syncRegister) may duplicate the report on the backend; idempotency via tid is what mitigates it.Para el informe de caja, resendMayDuplicate == true: un reenvío (p. ej. recuperación de cola offline vía syncRegister) puede duplicar el informe en el backend; la idempotencia vía tid es lo que lo mitiga.

06

Como é disparadoHow it's firedCómo se dispara

A transação é orquestrada pelo PaymentSubmissionOrchestrator (remote-first, §36), ao lado da coleta de pagamento. O notifier apenas reúne o draft cru, o resource e o relógio; o builder é o dono único de toda derivação wire. O gate é origin.reportsCashPayment (delivery ou promptOrder). A cascata:The transaction is orchestrated by PaymentSubmissionOrchestrator (remote-first, §36), alongside payment collection. The notifier only gathers the raw draft, resource and clock; the builder is the sole owner of every wire derivation. The gate is origin.reportsCashPayment (delivery or promptOrder). The cascade:La transacción se orquesta desde el PaymentSubmissionOrchestrator (remote-first, §36), junto al cobro de pago. El notifier solo reúne el draft crudo, el resource y el reloj; el builder es el dueño único de toda derivación wire. El gate es origin.reportsCashPayment (delivery o promptOrder). La cascada:

  • PaymentCreationNotifiersubmit()
    • reúne draft + resource + submittedAtgathers draft + resource + submittedAtreúne draft + resource + submittedAtPaymentSubmissionInputEntity
      • submit()PaymentSubmissionOrchestratorgate origin.reportsCashPaymentgate origin.reportsCashPaymentgate origin.reportsCashPayment
        • _sendCashPaymentReportCashPaymentReportDispatcherPayloadInput
          • build()BuildCashPaymentReportDispatcherPayloadUseCasemonta o wireassembles the wirearma el wire
            • devolvereturnsdevuelveDispatcherEnvelope
              • Submit…UseCaseDispatcherGateway
                • sendTransactionBackendgRPC

Caminho diferidoDeferred pathCamino diferido Quando o pagamento é salvo para envio posterior (!origin.sendsOnConfirm), o mesmo relatório é reconstruído por syncRegister(...) a partir de um PaymentRegisterEntity (register.toDraft()) e despachado no reprocessamento — mesmo gate reportsCashPayment. When the payment is saved to send later (!origin.sendsOnConfirm), the same report is rebuilt by syncRegister(...) from a PaymentRegisterEntity (register.toDraft()) and dispatched on reprocessing — same reportsCashPayment gate. Cuando el pago se guarda para enviar luego (!origin.sendsOnConfirm), el mismo informe se reconstruye por syncRegister(...) desde un PaymentRegisterEntity (register.toDraft()) y se despacha en el reprocesamiento — mismo gate reportsCashPayment.

O input (entities cruas)The input (raw entities)El input (entities crudas)

CashPaymentReportDispatcherPayloadInput (Freezed). Carrega o dado como existe no domínio; nada de formato wire. O relógio chega como submittedAt (via DateTimeUtils.now() no notifier).CashPaymentReportDispatcherPayloadInput (Freezed). Carries data as it exists in the domain; no wire shaping. The clock arrives as submittedAt (via DateTimeUtils.now() in the notifier).CashPaymentReportDispatcherPayloadInput (Freezed). Lleva el dato como existe en el dominio; nada de formato wire. El reloj llega como submittedAt (vía DateTimeUtils.now() en el notifier).

CampoFieldCampoTipoTypeTipoPapelRoleRol
draftPaymentDraftEntityrascunho do pagamento; o builder lê só methods.first (método + referência de coleta)payment draft; the builder reads only methods.first (method + collection reference)borrador del pago; el builder lee solo methods.first (método + referencia de cobro)
resourceResourceEntityrepresentante de vendas (cru — o builder deriva username)sales rep (raw — the builder derives username)representante de ventas (crudo — el builder deriva username)
accountSapCodeStringsapCustomerId + account.sapCode
purchaseOrderNumberStringpoNumber / transactionReference (trim; "-" se vazio)
orderAmountdoubleorderAmount (arredondado 2 casas)
documentDateDateTime?documentDate (ISO-8601; "-" se null)
submittedAtDateTimerelógio injetado → dateCreated e dateReferenceinjected clock → dateCreated and dateReferencereloj inyectado → dateCreated y dateReference
07

Payload (message)

O JSON serializado no campo message do request — um objeto plano (sem arrays nem aninhamento). A tabela tem 4 colunasCampo JSON · Tipo · Origem do Dado · Regra — e lista todas as 8 chaves que o build() emite. Campo, Tipo e Origem são código cru; só a Regra é prosa. Um exemplo completo está em transaction_example.json, ao lado deste doc.The JSON serialized into the request's message field — a flat object (no arrays or nesting). The table has 4 columnsJSON field · Type · Data source · Rule — and lists all 8 keys that build() emits. Field, Type and Source are raw code; only Rule is prose. A full example sits in transaction_example.json, next to this doc.El JSON serializado en el campo message del request — un objeto plano (sin arrays ni anidamiento). La tabla tiene 4 columnasCampo JSON · Tipo · Origen del Dato · Regla — y lista las 8 claves que build() emite. Campo, Tipo y Origen son código crudo; solo la Regla es prosa. Un ejemplo completo está en transaction_example.json, junto a este doc.

Campo JSONTipoTypeTipoOrigem do DadoData sourceOrigen del DatoRegraRuleRegla
sapCustomerIdstringinput.accountSapCodecódigo SAP da conta (também vai no envelope account.sapCode)account SAP code (also carried in the envelope account.sapCode)código SAP de la cuenta (también va en el envelope account.sapCode)
poNumberstringpurchaseOrderNumberinput.purchaseOrderNumber.trim(); vazio → "-"input.purchaseOrderNumber.trim(); empty → "-"input.purchaseOrderNumber.trim(); vacío → "-"
orderAmountdoubleCurrencyUtils.roundToTwoDecimals(input.orderAmount)valor recebido, arredondado 2 casas (half-away-from-zero)collected amount, rounded 2 dp (half-away-from-zero)monto cobrado, redondeado 2 dec (half-away-from-zero)
usernamestringresourceSfidresource.isPrimaryResource ? primaryResourceSfid : secondaryResourceSfidresource.isPrimaryResource ? primaryResourceSfid : secondaryResourceSfidresource.isPrimaryResource ? primaryResourceSfid : secondaryResourceSfid
paymentMethodstringentry?.method.code ?? ""code wire do método do 1º entry do draft (ZG, ZH, ZE…); "" se o draft não tem métodowire code of the 1st entry's method (ZG, ZH, ZE…); "" if the draft has no methodcode wire del método del 1.er entry del draft (ZG, ZH, ZE…); "" si el draft no tiene método
referenceNumberstringentry?.collectionReferences.firstOrNull ?? ""1ª referência de coleta do 1º entry — nota de crédito → creditNoteSfid; senão collectionReference; "" se ausente1st collection reference of the 1st entry — credit note → creditNoteSfid; else collectionReference; "" if absent1.ª referencia de cobro del 1.er entry — nota de crédito → creditNoteSfid; si no collectionReference; "" si ausente
documentDatestringinput.documentDateISO-8601 (formatIso8601) quando não-null; senão "-"ISO-8601 (formatIso8601) when non-null; else "-"ISO-8601 (formatIso8601) cuando no-null; si no "-"
dateCreatedstringDateTimeUtils.formatIso8601(input.submittedAt)timestamp ISO-8601 do envio (relógio injetado pelo notifier)ISO-8601 timestamp of the submission (clock injected by the notifier)timestamp ISO-8601 del envío (reloj inyectado por el notifier)

Fora do message — o envelopeOutside message — the envelopeFuera del message — el envelope Além das 8 chaves acima, o build() preenche o DispatcherEnvelope: type = cashPaymentReport; serviceName = CashPaymentReportAPI; account = DispatchAccountEntity(sapCode: accountSapCode) (só sapCode); transactionReference = poNumber; dateReference = formatDate(submittedAt). Beyond the 8 keys above, build() fills the DispatcherEnvelope: type = cashPaymentReport; serviceName = CashPaymentReportAPI; account = DispatchAccountEntity(sapCode: accountSapCode) (sapCode only); transactionReference = poNumber; dateReference = formatDate(submittedAt). Además de las 8 claves de arriba, el build() completa el DispatcherEnvelope: type = cashPaymentReport; serviceName = CashPaymentReportAPI; account = DispatchAccountEntity(sapCode: accountSapCode) (solo sapCode); transactionReference = poNumber; dateReference = formatDate(submittedAt).

08

Regras de negócioBusiness rulesReglas de negocio

Usuário (rep primário vs secundário)Username (primary vs secondary rep)Usuario (rep primario vs secundario) username ← resourceSfid

O input carrega o ResourceEntity cru; o builder deriva o sfid (CLAUDE.md §36): resource.isPrimaryResource ? resource.primaryResourceSfid : resource.secondaryResourceSfid. Esse valor vira payload["username"] e o username do request.The input carries the raw ResourceEntity; the builder derives the sfid (CLAUDE.md §36): resource.isPrimaryResource ? resource.primaryResourceSfid : resource.secondaryResourceSfid. That value becomes payload["username"] and the request's username.El input lleva el ResourceEntity crudo; el builder deriva el sfid (CLAUDE.md §36): resource.isPrimaryResource ? resource.primaryResourceSfid : resource.secondaryResourceSfid. Ese valor pasa a ser payload["username"] y el username del request.

Método e referência — só o 1º entryMethod & reference — first entry onlyMétodo y referencia — solo el 1.er entry draft.methods.first
  • entry = draft.methods.isEmpty ? null : draft.methods.firstsó o primeiro método do draft é reportado; drafts multi-método colapsam no primeiro (ver Pendências).entry = draft.methods.isEmpty ? null : draft.methods.firstonly the first method of the draft is reported; multi-method drafts collapse to the first (see Pending).entry = draft.methods.isEmpty ? null : draft.methods.firstsolo el primer método del draft se reporta; drafts multi-método colapsan al primero (ver Pendientes).
  • paymentMethod = entry?.method.code — o code wire do enum PaymentMethod (ZG=boleto, ZH=cash, ZE=EFT, ZX=Pix, Z9=nota de crédito, etc.).paymentMethod = entry?.method.code — the wire code of the PaymentMethod enum (ZG=bank slip, ZH=cash, ZE=EFT, ZX=Pix, Z9=credit note, etc.).paymentMethod = entry?.method.code — el code wire del enum PaymentMethod (ZG=boleto, ZH=cash, ZE=EFT, ZX=Pix, Z9=nota de crédito, etc.).
  • referenceNumber = entry?.collectionReferences.firstOrNull: para método creditNote (Z9) → primeiro creditNoteSfid; para os demais → o collectionReference digitado (trim). Lista vazia → "".referenceNumber = entry?.collectionReferences.firstOrNull: for the creditNote (Z9) method → first creditNoteSfid; for the rest → the entered collectionReference (trimmed). Empty list → "".referenceNumber = entry?.collectionReferences.firstOrNull: para el método creditNote (Z9) → primer creditNoteSfid; para el resto → el collectionReference ingresado (trim). Lista vacía → "".
As três datasThe three datesLas tres fechas documentDate · dateCreated · dateReference
  • documentDate (payload): input.documentDate em ISO-8601 cheio (formatIso8601) quando não-null; se null → sentinela "-".documentDate (payload): input.documentDate as full ISO-8601 (formatIso8601) when non-null; if null → sentinel "-".documentDate (payload): input.documentDate en ISO-8601 completo (formatIso8601) cuando no-null; si null → centinela "-".
  • dateCreated (payload): submittedAt em ISO-8601 cheio (formatIso8601) — timestamp do envio.dateCreated (payload): submittedAt as full ISO-8601 (formatIso8601) — submission timestamp.dateCreated (payload): submittedAt en ISO-8601 completo (formatIso8601) — timestamp del envío.
  • dateReference (envelope, não payload): submittedAt via formatDateAAAA-MM-DD (só a data).dateReference (envelope, not payload): submittedAt via formatDateYYYY-MM-DD (date only).dateReference (envelope, no payload): submittedAt vía formatDateAAAA-MM-DD (solo la fecha).
Sentinela de vazio & arredondamentoEmpty sentinel & roundingCentinela de vacío y redondeo _emptyValue "-" · _round
  • _emptyValue = "-": poNumber (e por consequência transactionReference) e documentDate caem para "-" quando vazios/nulos. Não é "" nem null._emptyValue = "-": poNumber (and hence transactionReference) and documentDate fall back to "-" when empty/null. Not "" nor null._emptyValue = "-": poNumber (y por ende transactionReference) y documentDate caen a "-" cuando vacíos/nulos. No es "" ni null.
  • orderAmount: único valor monetário, arredondado por CurrencyUtils.roundToTwoDecimals (half-away-from-zero).orderAmount: the only monetary value, rounded by CurrencyUtils.roundToTwoDecimals (half-away-from-zero).orderAmount: único valor monetario, redondeado por CurrencyUtils.roundToTwoDecimals (half-away-from-zero).
  • serviceName fixo: resolveServiceName(hasPromotion: false) → sempre CashPaymentReportAPI, sem variante Promo_.serviceName fixed: resolveServiceName(hasPromotion: false) → always CashPaymentReportAPI, no Promo_ variant.serviceName fijo: resolveServiceName(hasPromotion: false) → siempre CashPaymentReportAPI, sin variante Promo_.
Gate de disparoFire gateGate de disparo origin.reportsCashPayment

O orquestrador só constrói e despacha o relatório quando origin.reportsCashPayment — isto é, quando a PaymentCreationOrigin é delivery ou promptOrder. Nas origens financialManagement e collections, o relatório de caixa não é enviado (só a coleta de pagamento).The orchestrator only builds and dispatches the report when origin.reportsCashPayment — i.e. when the PaymentCreationOrigin is delivery or promptOrder. For the financialManagement and collections origins, the cash report is not sent (only payment collection).El orquestador solo construye y despacha el informe cuando origin.reportsCashPayment — es decir, cuando la PaymentCreationOrigin es delivery o promptOrder. En los orígenes financialManagement y collections, el informe de caja no se envía (solo el cobro de pago).

09

Pendências / roadmapPending / roadmapPendientes / roadmap

O que o builder ainda não cobre ou envia inerte, documentado fiel ao estado atual do código (nunca descrito como se já existisse):What the builder does not yet cover, or ships inert, documented faithfully to the current code state (never described as already existing):Lo que el builder aún no cubre, o envía inerte, documentado fiel al estado actual del código (nunca descrito como si ya existiera):

Não portado / pendenteNot ported / pendingNo portado / pendiente

  • Só o 1º método é reportado: o relatório usa draft.methods.first. Um pagamento com múltiplos métodos reporta apenas o método e a referência do primeiro — os demais não aparecem no relatório de caixa.Only the 1st method is reported: the report uses draft.methods.first. A multi-method payment reports only the first method and reference — the rest don't appear in the cash report.Solo el 1.er método se reporta: el informe usa draft.methods.first. Un pago multi-método reporta solo el método y la referencia del primero — el resto no aparece en el informe de caja.
  • Campos não populados pela origem payment_creation: no fluxo do PaymentCreationNotifier, o PaymentSubmissionInputEntity não seta purchaseOrderNumber, orderAmount nem documentDate — eles tomam os defaults ("", 0.0, null). Resultado: o relatório sai com poNumber="-", orderAmount=0.0, documentDate="-" e transactionReference="-", a menos que um caller upstream popule esses campos.Fields not populated by the payment_creation origin: in the PaymentCreationNotifier flow, the PaymentSubmissionInputEntity doesn't set purchaseOrderNumber, orderAmount or documentDate — they take the defaults ("", 0.0, null). Result: the report goes out with poNumber="-", orderAmount=0.0, documentDate="-" and transactionReference="-", unless an upstream caller populates those fields.Campos no poblados por el origen payment_creation: en el flujo del PaymentCreationNotifier, el PaymentSubmissionInputEntity no setea purchaseOrderNumber, orderAmount ni documentDate — toman los defaults ("", 0.0, null). Resultado: el informe sale con poNumber="-", orderAmount=0.0, documentDate="-" y transactionReference="-", salvo que un caller upstream complete esos campos.
  • account só com sapCode: o DispatchAccountEntity anexado carrega apenas sapCode; sfid e name ficam vazios.account with sapCode only: the attached DispatchAccountEntity carries only sapCode; sfid and name stay empty.account solo con sapCode: el DispatchAccountEntity adjunto lleva solo sapCode; sfid y name quedan vacíos.
  • Transporte: deviceUuid vai como literal provisório no gateway (pendência conhecida do Dispatcher, comum a todas as transações).Transport: deviceUuid ships as a provisional literal in the gateway (known Dispatcher pending item, shared by all transactions).Transporte: deviceUuid va como literal provisional en el gateway (pendiente conocido del Dispatcher, común a todas las transacciones).

Transação irmãSister transactionTransacción hermana O relatório de caixa acompanha a Coleta de pagamento (PaymentCollectionAPI) — o mesmo orquestrador despacha as duas na mesma jornada, mas são docs (e despachos) separados. The cash report accompanies Payment collection (PaymentCollectionAPI) — the same orchestrator dispatches both in the same journey, but they are separate docs (and dispatches). El informe de caja acompaña a Cobro de pago (PaymentCollectionAPI) — el mismo orquestador despacha ambas en la misma jornada, pero son docs (y despachos) separados.

MercadosMarketsMercados

A disponibilidade vem do DispatcherType.cashPaymentReport.enabledMarkets = [BR, CL]. ZA não tem esta transação (nem os demais mercados). AR/PY/PE existem como mercados do app (config PANGEA mínima), mas não têm dispatcher de relatório de caixa.Availability comes from DispatcherType.cashPaymentReport.enabledMarkets = [BR, CL]. ZA does not have this transaction (nor the other markets). AR/PY/PE exist as app markets (minimal PANGEA config), but have no cash-report dispatcher.La disponibilidad viene de DispatcherType.cashPaymentReport.enabledMarkets = [BR, CL]. ZA no tiene esta transacción (ni los demás mercados). AR/PY/PE existen como mercados de la app (config PANGEA mínima), pero no tienen dispatcher de informe de caja.

BRx CLx ZA AR PY PE
disponívelavailabledisponible presente, desligadopresent, offpresente, apagado ausenteabsentausente
BRCL

Brasil e ChileBrazil & ChileBrasil y Chile Os dois mercados onde o relatório de caixa é despachado, sempre com serviceName = CashPaymentReportAPI e destino Salesforce. O payload é idêntico nos dois — não há divergência por mercado no build(). The two markets where the cash report is dispatched, always with serviceName = CashPaymentReportAPI and Salesforce destination. The payload is identical in both — there's no per-market divergence in build(). Los dos mercados donde el informe de caja se despacha, siempre con serviceName = CashPaymentReportAPI y destino Salesforce. El payload es idéntico en ambos — no hay divergencia por mercado en el build().

ZA · AR · PY · PE Não listados em enabledMarkets — a transação não é disparada nesses mercados. A África do Sul, embora tenha muitas transações, não tem relatório de caixa; AR/PY/PE têm apenas config PANGEA mínima. Not listed in enabledMarkets — the transaction isn't fired in these markets. South Africa, though it has many transactions, does not have the cash report; AR/PY/PE only carry minimal PANGEA config. No listados en enabledMarkets — la transacción no se dispara en estos mercados. Sudáfrica, aunque tiene muchas transacciones, no tiene informe de caja; AR/PY/PE solo llevan config PANGEA mínima.