Invoice Integration - Overview

  • Updated

The integration allows suppliers to send electronic invoices directly to Unimarket using the cXML format.

 

The Invoice Document

  • Standard: The integration relies on the cXML (Commerce eXtensible Markup Language) standard, specifically the InvoiceDetail.dtd.

  • Generation: The invoice file is generated by the Supplier ERP (Enterprise Resource Planning) system.

  • Structure: The file contains essential elements like a Header (with sender/receiver information), an InvoiceDetailRequest (with the invoice date and ID), InvoiceDetailOrder (linking to the original purchase order and listing invoice line items), and an InvoiceDetailSummary (total amounts).

 

The Integration Process

  1. File Sent: The supplier's ERP sends the cXML Invoice file to Unimarket.

  2. Validation: Unimarket receives the document and immediately validates it.

  3. Matching: If validation is successful, the invoice is passed onto the matching process for the customer.

  4. Response & Notification: Unimarket sends a response code back to the supplier, and for errors, an email is sent to the Invoicing contact listed in the Supplier Profile.

 

Response Codes and Actions

The supplier's system should process the response code from Unimarket to determine the next step:

Response CodeOutcomeRequired Supplier Action
200SuccessThe invoice was successfully processed; no further action required.
400Client ErrorThe invoice file had errors (likely validation issues); generate a notification to an internal team.
500Server ErrorThe invoice is unable to be processed (an issue on Unimarket's side); contact support@unimarket.com.

Note: Regardless of the response code (400 or 500), Unimarket will also send an email explaining the failure to the Invoicing Email Address on the supplier's contact profile.

 

Example Basic Invoice Structure

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.038/InvoiceDetail.dtd">
<cXML payloadID="[A Unique Value]" timestamp="2020-10-08T23:59:45-07:00" version="1.2.021">
    <Header>
        <From>...</From>
        <To>...</To>
        <Sender>...</Sender>
    </Header>
    <Request deploymentMode="test">
        <InvoiceDetailRequest>
            <InvoiceDetailRequestHeader invoiceDate="2020-10-08" invoiceID="[Invoice Number]" operation="new" purpose="standard">
                <InvoiceDetailLineIndicator isTaxInLine="yes"/>
                <InvoicePartner>
                    <Contact role="billTo">...</Contact>
                </InvoicePartner>
            </InvoiceDetailRequestHeader>
            <InvoiceDetailOrder>
                <InvoiceDetailOrderInfo>
                    <OrderReference orderID="[Purchase Order Number]"/>
                </InvoiceDetailOrderInfo>
                <InvoiceDetailItem invoiceLineNumber="1" quantity="1.00">...</InvoiceDetailItem>
                <InvoiceDetailItem invoiceLineNumber="2" quantity="12.00">...</InvoiceDetailItem>
                <InvoiceDetailItem invoiceLineNumber="3" quantity="10.00">...</InvoiceDetailItem>
            </InvoiceDetailOrder>
            <InvoiceDetailSummary>
                <SubtotalAmount>...</SubtotalAmount>
                <Tax>...</Tax>
                <GrossAmount>...</GrossAmount>
            </InvoiceDetailSummary>
        </InvoiceDetailRequest>
    </Request>
</cXML>