Hi everyone,
How’s it going?
I’m working on a case where the client has a third-party service, for example, an insurance policy. However, the insurance provider doesn’t issue an invoice (NF).
Is it possible to close the order without submitting an invoice (NF)? I’m looking for some document that could justify whether this scenario is possible or not. The idea is to bill the order (even if manually or via ERP) without entering the Invoice number.
I’m almost certain it’s not possible, but I’d like to know if anyone has handled an exception like this before.
Best regards,
Estevão
Hey @estevao_santos, how’s it going?
“Closing the order” would mean “completing the order” by sending the “invoice” without the invoice?
Considering that the Order invoice notification API documentation states that the only required fields are “type, issuanceDate, invoiceNumber, invoiceValue, and items”, wouldn’t it work to make a request to this endpoint without sending the invoiceUrl and using the orderId as the invoiceNumber?
This request would complete the order (without needing to issue and send the invoice URL), and in the Order Invoiced template you could add a validation in the Recipient field to allow the email to be printed and the Order Invoiced template to be triggered only if the invoiceNumber is different from the OrderId.
Cheers!
Hey @andremiani, how’s it going?
Exactly. It would be a full invoice.
Got it. I hadn’t tried that scenario yet. I’ll validate it and get back to you here.
I have a feeling that the invoiceNumber might be an issue there. But I’ll test it on my end.
Thanks for sharing.
Cheers.
Hi @estevao_santos
As André mentioned, you just need to send the Order Invoice Notification request (or even go through the process via the admin) and use a generic number for the invoice. You could, for example, use the sequenceId of the order (the 6-digit number next to the orderId) as a base and add a “-1” at the end (e.g., for an order with orderId 1268540501456-01 and sequenceId 501456, the invoiceId could be 501456-1)
Eduardo Luciano
Field Software Engineer | VTEX