Skip to main content

pullAccountingItem

Refreshes one product's copy of its item in the connected accounting provider.

Enqueues a background job, so completion is asynchronous. Once it lands, the product's accountingItem.external reflects the provider's current values.

Business Rules

  • The provider's item is located by the product's active link, or by matching the product's SKU against the provider's Sku and then its Name when no link exists.
  • The endless-owned accounting item is never overwritten by this action, whatever the integration's accounting_source_of_truth setting says. Use overwriteAccountingItemFromExternal to overwrite the internal values deliberately.
  • An unlinked accounting item matching by SKU is linked, not overwritten. A product with no accounting item at all gets one created from the provider's values.

Error Scenarios

  • **BAD_REQUEST**: the integration does not belong to this company, or is not a kind of integration that holds accounting items.
  • **NOT_FOUND**: the product or the integration does not exist, or the product belongs to another company.

Permissions Required

  • accounting:import_item permission.
pullAccountingItem(
input: PullAccountingItemInput!
): PullAccountingItemPayload

Arguments

pullAccountingItem.input ● PullAccountingItemInput! non-null input common

Parameters for PullAccountingItem

Type

PullAccountingItemPayload object common

Autogenerated return type of PullAccountingItem.