Skip to main content

productAddCosts

Adds cost estimates to a product. Runs asynchronously.

Business Rules

  • A cost belongs to a supplier when supplierId is given, and is your own estimate when it is omitted.
  • unitCost may be omitted to record only a breakdown. When given it must be positive.
  • laborCost, materialsCost and packagingCost are informational; nothing sums them into unitCost.
  • freightCost and dutiesCost count towards the landed cost.
  • Within one request, and against costs already stored, orderQuantity must be unique per cost type.
  • Two entries in the same request cannot share a unitCost for the same cost type.

Error Scenarios

Validation runs in the background, so failures arrive through the product update notifier rather than in this response.

  • **UNAUTHORIZED**: when the caller is not signed in or the company is out of scope.

Permissions Required

  • products:add_costs permission
productAddCosts(
input: AddProductCostsInput!
): AsynchronousActionResponse!

Arguments

productAddCosts.input ● AddProductCostsInput! non-null input common

Parameters for AddProductCosts

Type

AsynchronousActionResponse object common

Asynchronous action response type