Skip to main content
Version: v1.0.0(int)

W047: Update customer

Edits a customer's header fields, including classifiers and the parent link. Triggered from Customer Detail.

Steps

  1. Load the customer. Call Customers.getCustomerById.

  2. Reject hierarchy cycles. If the patch changes parentId, walk up the proposed parent chain and reject if it loops back to this customer.

  3. Validate any new classifier refs. Confirm any new type, segment, or broker exists in this org.

  4. Apply the patch. Call Customers.updateCustomer.

Returns

The updated customer.

Business rules

  • Hierarchy must remain a DAG. Parent cycles are rejected at step 2.

Errors

  • NotFoundError. The customer or a referenced row was not found.
  • ValidationError. The proposed parent would create a cycle.