GraphQLRepositoriesproduct
entities.product
Read product records with the product repository, and change them with the product mutations. Same records as the REST Products entity.
Queries
Fields of entities { product { … } }.
Each operation opens an example built from the schema and checked against it on every build. Replace the placeholders, such as <product id>, with values from your space.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | ProductEntity |
Example | ||
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [ProductEntity!]! |
Example | ||
| QUERY | getAll(limit: Int, offset: Int, filter: ProductFilterInput, orderBy: [ProductOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [ProductEntity!]! |
Example | ||
| QUERY | getByCriteria(filter: ProductFilterInput, orderBy: [ProductOrderByInput!], includeDeleted: Boolean, priceListId: ID, before: String, after: String, first: Int, last: Int)Returns the products that match the filter as a cursor-paginated connection. | ProductEntityConnection |
Example | ||
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
Example | ||
| QUERY | getBySession(includedIds: [UUID!]!, excludedIds: [UUID!]!, sessionId: String!, before: String, after: String, first: Int, last: Int)Returns a page of records selected in a list or report: all records of the given result plus the explicitly included ids, minus the excluded ids. | ProductEntityConnection |
Example | ||
| QUERY | getByIdFormatted(id: UUID!, fieldIds: [UUID!])Returns the values of a record's fields formatted for display, keyed by field id. | JSONString |
Example | ||
| QUERY | getForPipeline(pipelineId: UUID!, limit: Int, offset: Int, filter: ProductFilterInput, orderBy: [ProductOrderByInput!])Returns the products that can be used in the given pipeline: products allowed in all pipelines and products assigned to this pipeline. | [ProductEntity!]! |
Example | ||
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createProduct(input: CreateProductInput!, validationLevel: [ValidationLevel!], priceLists: SetProductPriceList) | Create one record | CreateProductPayload |
Example | |||
| MUTATION | updateProduct(input: UpdateProductInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateProductPayload |
Example | |||
| MUTATION | bulkUpdateProduct(input: [CreateOrUpdateProductInput!]!, validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput, priceLists: SetProductPriceList) | Create or update many; per-item results | BulkUpdateProductPayload |
Example | |||
| MUTATION | deleteProduct(input: DeleteProductInput!) | Soft-delete | DeleteProductPayload |
Example | |||
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
ProductEntity object 28 fields: customFields, isDeleteProtected, id, …
Product or service in the catalog that can be added as a line item to opportunities and quotes.
| Field | Type | Description |
|---|---|---|
customFields | JSONString! (1 args) | Values of the record's custom fields as a JSON object keyed by custom field apiName (camelCase). |
isDeleteProtected | Boolean! | True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
currencyExchangeRatesList | CurrencyExchangeRatesListEntity | Currency exchange rate list used to convert monetary fields linked to this product. Empty to inherit the team space default. |
picture | CloudObjectEntity | Product picture. |
productCategory | ProductCategoryEntity | Product category this product belongs to. Categories form a hierarchy used in the catalog browser. |
productType | ProductTypeEntity | Product type that classifies this product. Product types are configurable per team space and drive which form, fields and product-line behavior apply. |
allowedPipelines | AccessPipelinesEnum | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | ID | Id of the currency exchange rate list applied to this product. |
description | String | Free-form description of the product. |
name | String! | Name of the product, shown in catalogues and pickers. |
pictureId | ID | Id of the product picture document. |
productCategoryId | ID | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | ID | Id of the product type that classifies this product. |
sku | String | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | String | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
revision | Int | Revision when entity was lastly changed. |
productPipelineRelations | ProductPipelineRelationEntityConnection (8 args) | Deprecated pipeline connection. |
productPipelines | ProductPipelinesObject | Configuration of Pipelines where the Product can be used. |
formattedName | String! | Display version of the product name, used in lists and references. |
opptyProductRelationTypeId | UUID! | Id of the product line-item type derived from productType. Used as a filter when listing relations on opportunities and quotes. Read-only. |
priceLists | [ProductPriceListReference!] | Active price lists this product is priced in, ordered by name. Read-only; computed by Coevera. |
priceSchedules | [ProductPriceListReference!] | Active price schedules this product is priced in, ordered by name. Read-only; computed by Coevera. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
priceListPrice | Float (2 args) | Price of the product in the given price list and currency. Returns 0 when either is not given or the product has no price for that combination. |
ProductEntityConnection object pageInfo: PageInfo!, edges: [ProductEntityEdge]!, totalCount: Int
Paginated list of Product records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [ProductEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
ProductEntityEdge object node: ProductEntity, cursor: String!
A Relay edge containing a ProductEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | ProductEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
AccessPipelinesEnumFilterInput input eq: [AccessPipelinesEnum!], NOT: AccessPipelinesEnumFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [AccessPipelinesEnum!] | Matches any of the listed values. |
NOT | AccessPipelinesEnumFilterInput | Matches values that do not meet this condition. |
ProductFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for Product records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [ProductFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [ProductFilterInput!] | Matches records that meet all of the listed filters. |
NOT | ProductFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
allowedPipelines | AccessPipelinesEnumFilterInput | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | EntityFilterStringField | Id of the currency exchange rate list applied to this product. |
description | EntityFilterStringField | Free-form description of the product. |
name | EntityFilterStringField | Name of the product, shown in catalogues and pickers. |
pictureId | EntityFilterStringField | Id of the product picture document. |
productCategoryId | EntityFilterStringField | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | EntityFilterStringField | Id of the product type that classifies this product. |
sku | EntityFilterStringField | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | EntityFilterStringField | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
allowedForPipeline | UUID | Id of a pipeline. Matches products that can be used in it: products available in all pipelines and products assigned to this pipeline. |
isTypeDeleted | Boolean | Filters products by whether their product type has been deleted. |
withCustom | [CustomField!] | Conditions on custom fields, each identified by its api name. All listed conditions must match. |
currencyExchangeRatesList | CurrencyExchangeRatesListFilterInput | Currency exchange rate list used to convert monetary fields linked to this product. Empty to inherit the team space default. Matches records where a related record meets these conditions. |
picture | CloudObjectFilterInput | Product picture. Matches records where a related record meets these conditions. |
productCategory | ProductCategoryFilterInput | Product category this product belongs to. Categories form a hierarchy used in the catalog browser. Matches records where a related record meets these conditions. |
productType | ProductTypeFilterInput | Product type that classifies this product. Product types are configurable per team space and drive which form, fields and product-line behavior apply. Matches records where a related record meets these conditions. |
productPipelineRelations | ProductPipelineRelationFilterInput | Deprecated pipeline connection. Matches records where a related record meets these conditions. |
ProductOrderByInput input Asc or Desc per field
Sorting of Product records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
currencyExchangeRatesList | [CurrencyExchangeRatesListOrderByNestedInput!] | Currency exchange rate list used to convert monetary fields linked to this product. Empty to inherit the team space default. Sorts by fields of the related record, listed in order of priority. |
productCategory | [ProductCategoryOrderByNestedInput!] | Product category this product belongs to. Categories form a hierarchy used in the catalog browser. Sorts by fields of the related record, listed in order of priority. |
productType | [ProductTypeOrderByNestedInput!] | Product type that classifies this product. Product types are configurable per team space and drive which form, fields and product-line behavior apply. Sorts by fields of the related record, listed in order of priority. |
currencyExchangeRatesListId | OrderByEnum | Id of the currency exchange rate list applied to this product. |
description | OrderByEnum | Free-form description of the product. |
name | OrderByEnum | Name of the product, shown in catalogues and pickers. |
productCategoryId | OrderByEnum | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | OrderByEnum | Id of the product type that classifies this product. |
sku | OrderByEnum | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | OrderByEnum | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
revision | OrderByEnum | Revision when entity was lastly changed. |
withCustom | CommonEntityRepositoryOrderByCustomField | Sorts by a custom field. |
CreateOrUpdateProductInput input 19 fields: clientMutationId, id, modified, …
Field values of a Product record to create, or to update when its id is set.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
picture | CreateCloudObjectInput | Product picture. |
allowedPipelines | AccessPipelinesEnum | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | ID | Id of the currency exchange rate list applied to this product. |
description | String | Free-form description of the product. |
name | String | Name of the product, shown in catalogues and pickers. |
pictureId | ID | Id of the product picture document. |
productCategoryId | ID | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | ID | Id of the product type that classifies this product. |
sku | String | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | String | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
customFields | JSONString | Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field. |
revision | Int | Revision when entity was lastly changed. |
productPipelineRelations | [CreateProductPipelineRelationNoProductBackrefInput!] | Deprecated pipeline connection. |
productPipelines | ProductPipelinesInput | Configuration of Pipelines where the Product can be used. |
pictureSourceUrl | String | URL of an image to use as the product picture. The image is downloaded from this URL and checked; only pictures are supported. |
CreateProductInput input 18 fields: clientMutationId, modified, created, …
Field values of a new Product record.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
picture | CreateCloudObjectInput | Product picture. |
allowedPipelines | AccessPipelinesEnum | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | ID | Id of the currency exchange rate list applied to this product. |
description | String | Free-form description of the product. |
name | String! | Name of the product, shown in catalogues and pickers. |
pictureId | ID | Id of the product picture document. |
productCategoryId | ID | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | ID | Id of the product type that classifies this product. |
sku | String | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | String | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
customFields | JSONString | Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field. |
revision | Int | Revision when entity was lastly changed. |
productPipelineRelations | [CreateProductPipelineRelationNoProductBackrefInput!] | Deprecated pipeline connection. |
productPipelines | ProductPipelinesInput | Configuration of Pipelines where the Product can be used. |
pictureSourceUrl | String | URL of an image to use as the product picture. The image is downloaded from this URL and checked; only pictures are supported. |
CreateProductPipelineRelationNoProductBackrefInput input modified: DateTime, created: DateTime, pipelineId: ID!, revision: Int
Field values of a new ProductPipelineRelation record, created together with the record it belongs to.
| Input field | Type | Description |
|---|---|---|
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
pipelineId | ID! | Id of the pipeline in which the product can be added as a line item. |
revision | Int | Revision when entity was lastly changed. |
DeleteProductInput input clientMutationId: String, id: ID!
Id of the Product record to delete.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
ProductPipelinesInput input pipelines: [ID!]!, allowedPipelines: AccessPipelinesEnum!
Pipelines in which a product can be added to opportunities, as set on create or update.
| Input field | Type | Description |
|---|---|---|
pipelines | [ID!]! | Ids of the pipelines the product can be added in. Effective only when allowedPipelines is Selected. |
allowedPipelines | AccessPipelinesEnum! | Whether the product can be added in all pipelines (All) or only in those listed in pipelines (Selected). |
SetProductPriceList input operation: SetProductPriceListOperation!, priceListIds: [UUID!]!
Parameters of the createProduct mutation.
| Input field | Type | Description |
|---|---|---|
operation | SetProductPriceListOperation! | Which price lists the new products are added to: none (DontSet), all (All) or those in priceListIds (Selected). |
priceListIds | [UUID!]! | Ids of the price lists to add the products to when operation is Selected. |
UpdateProductInput input 19 fields: clientMutationId, id, modified, …
Id of a Product record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
picture | CreateCloudObjectInput | Product picture. |
allowedPipelines | AccessPipelinesEnum | Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations). |
currencyExchangeRatesListId | ID | Id of the currency exchange rate list applied to this product. |
description | String | Free-form description of the product. |
name | String | Name of the product, shown in catalogues and pickers. |
pictureId | ID | Id of the product picture document. |
productCategoryId | ID | Id of the product category this product belongs to, or empty when it is not categorized. |
productTypeId | ID | Id of the product type that classifies this product. |
sku | String | Stock-keeping unit (SKU) identifier of the product. Must be unique across products. |
unitSymbol | String | Unit of measure shown next to product quantities (e.g. pcs, kg, hours). |
customFields | JSONString | Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field. |
revision | Int | Revision when entity was lastly changed. |
productPipelineRelations | [CreateProductPipelineRelationNoProductBackrefInput!] | Deprecated pipeline connection. |
productPipelines | ProductPipelinesInput | Configuration of Pipelines where the Product can be used. |
pictureSourceUrl | String | URL of an image to use as the product picture. The image is downloaded from this URL and checked; only pictures are supported. |
BulkUpdateProductPayload object result: BulkUpdateResults!
Result of the bulkUpdateProduct mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreateProductPayload object product: ProductEntity, clientMutationId: String
Result of the createProduct mutation.
| Field | Type | Description |
|---|---|---|
product | ProductEntity | The created record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
DeleteProductPayload object product: ProductEntity, clientMutationId: String
Result of the deleteProduct mutation.
| Field | Type | Description |
|---|---|---|
product | ProductEntity | The deleted record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
UpdateProductPayload object product: ProductEntity, clientMutationId: String
Result of the updateProduct mutation.
| Field | Type | Description |
|---|---|---|
product | ProductEntity | The updated record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
AccessPipelinesEnum enum All, Selected
Which pipelines a product can be added to.
| Value | Description |
|---|---|
All | The product can be added in all pipelines. |
Selected | The product can be added only in the pipelines it is linked to. |
ProductPipelinesObject object pipelines: [ID!]!, allowedPipelines: AccessPipelinesEnum!
Pipelines in which a product can be added to opportunities.
| Field | Type | Description |
|---|---|---|
pipelines | [ID!]! | Ids of the pipelines the product can be added in. Effective only when allowedPipelines is Selected. |
allowedPipelines | AccessPipelinesEnum! | Whether the product can be added in all pipelines (All) or only in those listed in pipelines (Selected). |
ProductPriceListReference object id: ID!, name: String!
Id and name of one price list a product is priced in.
| Field | Type | Description |
|---|---|---|
id | ID! | Id of the price list. |
name | String! | Name of the price list. |
SetProductPriceListOperation enum DontSet, All, Selected
Which price lists newly created products are added to.
| Value | Description |
|---|---|
DontSet | Products are not added to any price list. |
All | Products are added to every price list, with a zero price in each currency. |
Selected | Products are added to the price lists in priceListIds, with a zero price in each currency. |