Skip to main content

linkAccountingItem

Links a product to a specific imported accounting item, chosen by the operator.

Automatic matching is a guess made from the integration's field mappings. This states the answer directly, for when it guessed wrong or found nothing. Use accountingItemExternals to search the imported items to choose from.

Neither record's values are changed. The product's existing accounting item is the one linked; a product without one gets an item created from the provider's values.

Business Rules

  • The provider item must belong to the given integration, and the integration to this company.
  • A product already linked in that integration has its link moved to the chosen item, as one operation. Choosing the item it is already linked to does nothing.
  • A provider item already linked to another product is refused; unlink that first.

Error Scenarios

  • **NOT_FOUND**: the product, the integration, or the provider item does not exist, or belongs to another company or integration.
  • **CONFLICT**: the provider item is already linked to another product, or the code the product would adopt with it is already in use by another accounting item.

Permissions Required

  • accounting:configure_product_accounting permission.
linkAccountingItem(
input: LinkAccountingItemInput!
): LinkAccountingItemPayload

Arguments

linkAccountingItem.input ● LinkAccountingItemInput! non-null input common

Parameters for LinkAccountingItem

Type

LinkAccountingItemPayload object common

Autogenerated return type of LinkAccountingItem.