External Order Attachments

About this article

Introducing a new feature in Centra that allows users to attach any necessary external documents to an order (e.g., external invoices or a PDF catalogue), providing added convenience and flexibility. This external URL will be visible to Showroom users on the Order page, specifically in the attachments section. Additionally, users can leverage the Integration (GraphQL) API to seamlessly integrate an external system with Centra.

Centra Admin Panel attachment management

The complete management of Order Attachments is handled in Centra Admin directly on the order page. A new section has been added under Payment information, specifically labelled as Order attachments.

Creating an Attachment

  1. Click 'Orders' under WHOLESALE in the main menu to the left
  2. Browse the list of orders and click on the order for which you wish to add an attachment
  3. Under Payment information, you will see a new section called Order attachments

  1. Click ‘Add attachment’ in the upper-right corner and this pop-up window will open:

  1. In this view add the ‘Name’ and ‘URL’ of the file that you want to attach to the order.
  2. When you are done editing, click 'add’. The attachment will now be listed under 'Order attachments

Showroom

When an attachment is added to the order, you’ll be able to view this file in the Showroom view of the Order page.

In addition, the section is added at the bottom of the order page.

GQL Mutation

This functionality includes adding one mutation and extending the Wholesale Order object in Integration GQL API. This enhancement allows seamless integration and interaction with Wholesale Order objects, providing additional capabilities and flexibility within the Integration GQL.

mutation{
  addOrderLinkAttachment(input: {
    order: {
        id: "13a8f4c50a12e417739bcc2f0f60b7c5"
    },
    name: "External invoice",
    url: "https://example.com/invoice/fdsio321k0231kreq123321"
  }){
        orderAttachment{
      id
      createdAt
      type
      dataJSON
    },
    userErrors{
      message
      path
    }
  }
}
query{
  order(id: "13a8f4c50a12e417739bcc2f0f60b7c5"){
    id
    ... on WholesaleOrder{
      attachments{
        id
        type
        dataJSON
        createdAt
      }
    }
  }
}

Previous article: Block if unpaid invoices
Next article: Accounts