Postman collection
Customers Read

pixiCustomerKeyByNumber

Returns the internal customer key (CustKey) for an external customer number within a given shop.

Looks up a customer in the Customers table by the external customer number (CustomerNrExternal) and the shop the customer belongs to (CustomerOf = ShopId).

  • If AllowAmbiguous = 1, the key of one matching customer is returned, even if several customers share the same external number in that shop.
  • If AllowAmbiguous = 0, a key is returned only if exactly one customer matches. If there are several matches, the result set is empty.
  • If no customer matches, the result set is empty.

At most one row is returned.

Notes

  • All parameters are required; none has a default value.
  • The query uses TOP 1 without ORDER BY. When AllowAmbiguous = 1 and several customers match, it is not defined which CustKey is returned.
  • Reads use NOLOCK, so uncommitted data may be seen.
  • An empty result means either no match or, with AllowAmbiguous = 0, an ambiguous match. The caller cannot tell which case applies.

Tables used

Customers · Read
SQL object:
dbo.pipiCustomerKeyByNumber
Updated at 2026-10-30