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 definition with the required fields.
Metaobject Configuration
In your Shopify Admin panel, go to
Settings > Custom data > Metaobjects > Add definition
Name:
Comply InvoicesType:
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( | Single-line text (one value) | The invoice number generated by Comply will be stored in this field |
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. |
Type ( | Single-line text (one value) | The invoice type will be stored in this field (FS, FC, RS, RC) |
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
Go to Settings > Custom data > Orders
Click "Add definition"
Configure the metafield with the following values:
Name:
InvoicesNamespace and key:
comply.invoices(important)Content type:
MetaobjectReference: Select the
Comply Invoicesmetaobject type created in Step 1Accepted values: List of entries (to support multiple invoices per order)
API access options:
Customer Account API access:
ReadStorefront API access: Disabled (optional, based on your use case)
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.
