Skip to main content

How to Configure Invoice Metaobjects (Shopify Plus Exclusive)

C
Written by Comply Help Center
Updated over 2 weeks ago

If your store is on the Shopify Plus plan, you can enable an advanced feature that allows Comply to automatically store the data of each invoice it generates as a metaobject inside Shopify.

This feature enables more powerful integrations and automations using the metaobjects/create webhook.


Step 1: Create the “Comply Invoices” Metaobject Type

In order for Comply to save invoice data as metaobjects in Shopify, you must first create a new metaobject definitionwith the required fields.

Metaobject Configuration

In your Shopify Admin panel, go to

Settings > Custom data > Metaobjects > Add definition

  • Name: Comply Invoices

  • Type: comply_invoices (automatically generated in lowercase, no spaces)

Fields to Add

The following fields must be defined in the Comply Invoices metaobject type:

Name

Data Type

Description

Invoice number(comply_invoices.invoice_number)

Single-line text (one value)

Set as the display name

Stores the unique invoice number generated by Comply

Data (comply_invoices.data)

JSON (</>)

Stores structured invoice data (typically JSON), including amount, date, items, taxes, document type, etc. This is a technical field that supports integrations or custom visualizations.


Step 2: Create the Order Metafield to Link Invoices

Once the Comply Invoices metaobject type is defined, the next step is to create a metafield definition for Orders, so that each order can reference its corresponding Comply invoice(s).

Metafield Configuration

  1. Go to Settings > Custom data > Orders

  2. Click "Add definition"

  3. Configure the metafield with the following values:

    • Name: Invoices

    • Namespace and key: comply.invoices (important)

    • Content type: Metaobject

    • Reference: Select the Comply Invoices metaobject type created in Step 1

    • Accepted values: List of entries (to support multiple invoices per order)

    • API access options:

      • Customer Account API access: Read

      • Storefront API access: Disabled (optional, based on your use case)

  4. Save your changes. Shopify will now show this metafield definition as active and linked to Orders.

Once the definitions are in place, go to Comply > Settings and enable the “Store invoices as metaobjects” option.

From that moment on, each invoice generated through Comply will be stored as a metaobject in Shopify and automatically linked to the corresponding order via the metafield comply.invoices.

Did this answer your question?