Sales & CRMQu Query

listProductTemplates

Topics: Product Templates

List product templates with optional filters, sorted by name. Requires productTemplate:list permission.

Returns

ProductTemplateConnection!

Arguments

sku

StringOptional

Filter by SKU (exact match)

Filter by active status

Filter by category (exact match)

status

StringOptional

Filter by status (DRAFT or PUBLISHED)

first

IntOptional

Number of items from the start

after

StringOptional

Cursor to start after

Examples

Browse configured product templates

query BrowsePrintingTemplates($first: Int!, $after: String) {
  listProductTemplates(isActive: true, first: $first, after: $after) {
    edges {
      node { id name sku category isActive status version publishedVersion }
    }
    pageInfo { hasNextPage endCursor }
  }
}

Variables

{
  "first": 20
}
Exact field SDL
"""
List product templates with optional filters, sorted by name. Requires productTemplate:list permission.
"""
listProductTemplates(
  """Filter by SKU (exact match)"""
  sku: String
  """Filter by active status"""
  isActive: Boolean
  """Filter by category (exact match)"""
  category: String
  """Filter by status (DRAFT or PUBLISHED)"""
  status: String
  """Number of items from the start"""
  first: Int
  """Cursor to start after"""
  after: String
): ProductTemplateConnection! @topic(names: ["productTemplates"]) @topic_example(names: ["production.browse-templates"])

Declared on Query. Access is checked by the platform for each operation.