Skip to main content

Links between Seller Module and Other Modules

This document showcases the module links defined between the Seller Module and other Commerce Modules.

Summary

The Seller Module has the following links to other modules:
First Data ModelSecond Data ModelTypeDescription
SellerProductStored - one-to-manyAssociates a seller with their products
SellerOrderStored - one-to-manyAssociates a seller with their orders
SellerReturnStored - one-to-manyAssociates a seller with order returns
SellerPayoutAccountStored - one-to-oneAssociates a seller with their payout account
SellerStockLocationStored - one-to-manyAssociates a seller with their stock locations
SellerFulfillmentSetStored - one-to-manyAssociates a seller with their fulfillment sets
SellerServiceZoneStored - one-to-manyAssociates a seller with their service zones
SellerShippingOptionStored - one-to-manyAssociates a seller with their shipping options
SellerShippingProfileStored - one-to-manyAssociates a seller with their shipping profiles
SellerInventoryItemStored - one-to-manyAssociates a seller with their inventory items
SellerCustomerGroupStored - one-to-manyAssociates a seller with their customer groups
SellerPriceListStored - one-to-manyAssociates a seller with their price lists
SellerPromotionStored - one-to-manyAssociates a seller with their promotions
SellerCampaignStored - one-to-manyAssociates a seller with their campaigns

Product Module

Mercur defines a link between the Seller Module’s Seller data model and the Product Module’s Product data model. This allows each seller to have their own products in the marketplace.

Retrieve with Query

To retrieve the products of a seller with Query, pass product.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "product.*",
  ],
})

// sellers[0].product
To manage the products of a seller, use Link:

Order Module

Mercur defines a link between the Seller Module’s Seller data model and the Order Module’s Order data model. This allows tracking which orders belong to each seller in the marketplace.

Retrieve with Query

To retrieve the orders of a seller with Query, pass order.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "order.*",
  ],
})

// sellers[0].order
To manage the orders of a seller, use Link:

Order Module - Returns

Mercur defines a link between the Seller Module’s Seller data model and the Order Module’s Return data model. This allows tracking which returns belong to each seller.

Retrieve with Query

To retrieve the returns of a seller with Query, pass return.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "return.*",
  ],
})

// sellers[0].return
To manage the returns of a seller, use Link:

Payout Module

Mercur defines a link between the Seller Module’s Seller data model and the Payout Module’s PayoutAccount data model. This allows each seller to have a payout account for receiving payments from the marketplace.

Retrieve with Query

To retrieve the payout account of a seller with Query, pass payout_account.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "payout_account.*",
  ],
})

// sellers[0].payout_account
To manage the payout account of a seller, use Link:

Stock Location Module

Mercur defines a link between the Seller Module’s Seller data model and the Stock Location Module’s StockLocation data model. This allows each seller to have their own stock locations (warehouses).

Retrieve with Query

To retrieve the stock locations of a seller with Query, pass stock_location.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "stock_location.*",
  ],
})

// sellers[0].stock_location
To manage the stock locations of a seller, use Link:

Fulfillment Module

Mercur defines multiple links between the Seller Module and the Fulfillment Module to enable sellers to manage their own fulfillment configurations.

FulfillmentSet

A link between Seller and FulfillmentSet allows sellers to have their own fulfillment sets.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "fulfillment_set.*",
  ],
})

// sellers[0].fulfillment_set

ServiceZone

A link between Seller and ServiceZone allows sellers to define their own service zones.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "service_zone.*",
  ],
})

// sellers[0].service_zone

ShippingOption

A link between Seller and ShippingOption allows sellers to configure their own shipping options.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "shipping_option.*",
  ],
})

// sellers[0].shipping_option

ShippingProfile

A link between Seller and ShippingProfile allows sellers to manage their own shipping profiles.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "shipping_profile.*",
  ],
})

// sellers[0].shipping_profile

Inventory Module

Mercur defines a link between the Seller Module’s Seller data model and the Inventory Module’s InventoryItem data model. This allows each seller to manage their own inventory items.

Retrieve with Query

To retrieve the inventory items of a seller with Query, pass inventory_item.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "inventory_item.*",
  ],
})

// sellers[0].inventory_item
To manage the inventory items of a seller, use Link:

Customer Module

Mercur defines a link between the Seller Module’s Seller data model and the Customer Module’s CustomerGroup data model. This allows sellers to create and manage their own customer groups for targeted marketing.

Retrieve with Query

To retrieve the customer groups of a seller with Query, pass customer_group.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "customer_group.*",
  ],
})

// sellers[0].customer_group
To manage the customer groups of a seller, use Link:

Pricing Module

Mercur defines a link between the Seller Module’s Seller data model and the Pricing Module’s PriceList data model. This allows sellers to create and manage their own price lists.

Retrieve with Query

To retrieve the price lists of a seller with Query, pass price_list.* in fields:
const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "price_list.*",
  ],
})

// sellers[0].price_list
To manage the price lists of a seller, use Link:

Promotion Module

Mercur defines links between the Seller Module and the Promotion Module to enable sellers to manage their own promotions and campaigns.

Promotion

A link between Seller and Promotion allows sellers to create their own promotions.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "promotion.*",
  ],
})

// sellers[0].promotion

Campaign

A link between Seller and Campaign allows sellers to organize promotions into campaigns.

Retrieve with Query

const { data: sellers } = await query.graph({
  entity: "seller",
  fields: [
    "*",
    "campaign.*",
  ],
})

// sellers[0].campaign