Simplified Complex Selling Process by Integrating Business Central with Coupa Supplier Portal via cXML

About Coupa Supplier Portal

The Coupa Supplier Portal (CSP) is a free online portal where suppliers work with customers who use Coupa allowing them to receive and acknowledge POs, submit invoices or credit notes, track invoice and payment status, manage catalogs and company details, and maintain required compliance documents.

Customer Profile

Our customer is a well-established manufacturing company in the San Jose, California, United States, operating through a breakthrough platform offering end-to-end visibility and autonomous shipment control across fragmented global supply chains. They sell their products through multiple procurement portals, including Coupa, where several of their buyers place large-volume orders through the Coupa Supplier Portal.

Customer Situation

At present, the customer receives purchase orders through email which requires users to manually create sales orders in the ERP system and subsequently update shipment and invoice details. This manual process is time-consuming and demands significant effort from multiple users.

To improve operational efficiency, the customer aims to integrate their ERP system, Microsoft Dynamics 365 Business Central, with the Coupa Supplier Portal. This integration will enable seamless communication between buyers and the supplier by automating the creation of Sales Orders, Sales Invoices, and Credit Notes, as well as the transmission of Advanced Shipping Notices (ASNs). Automating these processes will significantly reduce manual intervention, improve accuracy, and streamline overall ERP operations.

Prerequisites

Here are the common prerequisites for connecting Microsoft Dynamics 365 Business Central with the Coupa Supplier Portal:

  • The supplier must have an active CSP account, and the buyer’s organization must be connected to that account in Coupa.
  • The supplier profile must be fully configured with required details, including legal entity information, banking data, and tax details.
  • The necessary cXML channels (PO Delivery, Invoice Delivery, ASN) must be enabled. This includes obtaining the Coupa cXML endpoint URLs, shared secret, and the Sender/From/To identity values.

Customer Solution

Although Coupa supports multiple methods for exchanging documents between systems, the integration described here leverages cXML as the primary communication mechanism.

Business Central does not offer a built-in solution for integration with Coupa Supplier Portal. However, this can be achieved by customizing Business Central and leveraging various Microsoft Office 365 tools and services, such as Power Automate, Azure Functions, and SharePoint, to facilitate the integration.

Challenges and Approach

  • Authentication

    • cXML does not prescribe a specific authentication method such as OAuth or API keys
    • However, Coupa uses a Client ID and Client Secret for cXML exchanges because the documents are transmitted over HTTPS through Coupa’s API gateway, which adheres to modern security standards.
    • These credentials, along with the agreed-upon identity values, must be included in the cXML file.
  • cXML Protocol

    • A deeper integration with Coupa enables the exchange of cXML documents between the two systems. cXML is particularly well-suited for suppliers that handle a high volume of purchase orders or rely on automated invoice processes.

      cXML, or Commerce eXtensible Markup Language, is a protocol for exchanging e-commerce documents like purchase orders and invoices between businesses. It is an open standard, built on XML, that enables automatic and standardized communication between buyers' procurement applications and suppliers' systems, improving efficiency and interoperability.

    • Business Central does not provide native support for cXML documents. However, because cXML is based on XML, it can be parsed within Business Central using standard XML document features. You can also develop custom logic to parse cXML files or validate them against an XSD.
    • Similarly, you can generate cXML documents such as ASNs or invoices using Business Central’s standard XML functions. Any features that create or process cXML must comply with the cXML DTD specifications. If it does not follow these standards, the Coupa Supplier Portal may reject the document.
  • Receiving Documents in Business Central

    • One of the main challenges in integrating with the Coupa Supplier Portal is receiving cXML files into Business Central.
    • Although Business Central provides flexible API capabilities, it requires OAuth authentication which Coupa does not support for cXML exchanges.
    • Because Coupa does not offer OAuth or similar authentication methods for cXML delivery, a middleware component is needed to accept documents from Coupa.
    • To simplify maintenance during upgrades, we recommend using Microsoft 365 ecosystem tools.
      • For example, you can set up an Azure Function to act as an endpoint that receives cXML files and stores them in SharePoint or Azure File Storage. From there, Power Automate can move the files into Business Central.
      • Alternatively, the Azure Function can post the cXML directly to Business Central, reducing the number of components involved in the integration.
  • Validate the cXML Document

    • Another significant challenge in Business Central is ensuring that the cXML file complies with the standards defined by cXML organization. The site provides DTDs that can be used to create or validate cXML documents.
    • However, Business Central does not currently support validating XML files against DTD, however, it supports validation using XSD files.
    • To address this, you can use third-party tools to generate an XSD from a DTD and then validate your cXML files against that XSD.
  • Sending Documents to Coupa Supplier Portal

    • If your buyer provides an endpoint, you can send validated cXML documents to that URL using the HTTP Client functions.
    • Ensure that the cXML document is fully compliant before transmission, as Coupa may reject it for even minor deviations from the cXML standard.
    • Additionally, verify that the shared secret and identity information included in the cXML file matches the values configured on the buyer’s side.
      A technical diagram showing the bidirectional data flow between Business Central and Coupa.
  • Acknowledging and Logging Communications

    cXML always provides acknowledgements for document exchanges. When receiving a file, you should confirm that the document has been successfully received. Maintaining logs of cXML communications and their acknowledgements can be very helpful for troubleshooting any issues that may arise.

Benefits

  • This integration has significantly reduced the time and effort required for ERP operations.
  • Management now has clear visibility into Coupa orders through periodic email reports that provide timely insights into order activity.
  • Additionally, the solution is configurable and can be easily extended to support integration with any Coupa customer.

Looking to solve similar challenges? Contact our Business Central consultants and explore how we can help integrate your Business Central system for better operational efficiency.