Skip to main content

computedOrderlists

Get computed orderlists for a customer or contact/company.

Retrieves all active orderlists assigned to the specified customer/contact and/or company, then merges them into computed arrays of positive/negative product and cluster IDs. This query consolidates the orderlist merging logic that was previously handled in the productsearch service.

The computation process:

  • Retrieves all active orderlists for the specified customer/contact/company
  • Separates orderlists by type (POSITIVE/NEGATIVE)
  • Combines product IDs and cluster IDs from each type
  • Filters out negative IDs from positive lists (negative orderlists take precedence)

Returns four arrays:

  • positiveOrderlistsProductIds: Product IDs from positive orderlists, excluding any that appear in negative orderlists
  • negativeOrderListsProductIds: All product IDs from negative orderlists
  • positiveOrderListsClusterIds: Cluster IDs from positive orderlists, excluding any that appear in negative orderlists
  • negativeOrderListsClusterIds: All cluster IDs from negative orderlists

Also includes counts of positive and negative orderlists that were processed.

Validation rules:

  • At least one of customerId, contactId, or companyId must be provided
  • customerId cannot be used in combination with companyId
  • contactId can be used with companyId to include both contact and company orderlists

Possible errors:

  • ORDERLIST_VALIDATION_ERROR: Invalid input parameters (e.g., customerId used with companyId, no identifiers provided)
  • ORDERLIST_CROSS_SERVICE_ERROR: Failed to validate customer/contact/company identifiers
  • ORDERLIST_UKNOWN_ERROR: Unexpected system error during computation
  • FORBIDDEN: Insufficient permissions to access order list data

AUTH: Role=[shop.OWNER,shop.EDITOR,shop.VIEWER] OR ('user is authenticated')

computedOrderlists(
input: ComputedOrderlistsInput!
): ComputedOrderlistsResponse!

Arguments

computedOrderlists.input ● ComputedOrderlistsInput! non-null input

Input for computing merged orderlists.

Specify customerId (for customers), contactId (for contacts), and/or companyId (for companies or contacts with company associations). At least one identifier must be provided.

For customers: Provide customerId only (cannot be combined with companyId). For contacts: Provide contactId, and optionally companyId to include company-level orderlists. For companies: Provide companyId only.

Type

ComputedOrderlistsResponse object

Computed orderlists result containing merged positive and negative product/cluster IDs.

This output represents the result of merging all orderlists for a customer or contact/company. Positive orderlists are filtered to exclude any IDs that appear in negative orderlists. The computation process:

  • Retrieves all active orderlists for the specified customer/contact/company
  • Separates orderlists by type (POSITIVE/NEGATIVE)
  • Combines product IDs and cluster IDs from each type
  • Filters out negative IDs from positive lists (negative orderlists take precedence)