In some instances, customer order line items have metadata that the operator wants to pass through to the seller. For example:
- a customer order contains line items with different shipping types.
- the operator added a custom message for one of the line items.
Operators can now control which of the line item metadata is passed through to the seller. Once this feature is set up, the metadata displays in the:
- Seller portal order summary view.
- Operator all sales report.
- Order CSV.
- GraphQL API.
Note: After you set up Seller LineItem Metadata, it may take some time for these changes to show in CSV exports. To make sure the metadata appears correctly, first add the metadata to Seller Settings in the Operator portal. For operator exports, go to Show / hide table columns on the All Sales page, and select the metadata columns when they become available.
How to display metadata for Order line items
- Log in to the Operator portal.
- Go to Configuration > Seller Settings.
- In the Seller LineItem Metadata section, enter a text value as the metadata key when posting an order to Marketplacer. This key, along with its value, will be displayed to the seller. You can add multiple metadata keys—for example, using "shipment-type" to pass through the customer’s selected shipping option for each line item.
- When passing orders through to Marketplacer using the API, you need to specify the metadata for each line item as key value pairs.
This example shows two line items with the metadata key shipment-type being set to `Standard Shipping` and `Big & Bulky`.
lineItems: [
{
variantId: "VmFyaWFudC0yMjk0"
quantity: 1
metadata: [
{key: "shipment-type", value: "Standard Shipping"}
]
cost:{
amount: 20000
tax: 2000
}
postage:{
amount: 500
tax: 50
}
},
{
variantId: "VmFyaWFudC0yMzk2"
quantity: 1
metadata: [
{key: "shipment-type", value: "Big & Bulky"}
]
cost:{
amount: 18900
tax: 1890
}
postage:{
amount: 1500
tax: 150
}
},
] - The metadata is then displayed in the:
- Seller portal order summary view (see screenshot)
- Operator all sales report
- Order CSV
- GraphQL API
Related articles