Orderwise Check Default Customer Address

Checks whether an Orderwise customer has a default delivery address and returns the customer's delivery addresses. Uses the Orderwise module connection.

What it does

  • Fetches the delivery addresses of an Orderwise customer (GET /customers/{customer_id}/delivery-addresses).
  • Returns the addresses and whether one of them is marked as the default.
  • Run it before Orderwise Update Delivery Address, for example in a change delivery address flow.

Notes

  • Authentication: the action uses the Orderwise module connection only and has no credential inputs. At the start of every run, it exchanges the connection's login for a bearer token (GET {base_url}/token/gettoken), then calls the API with that token. The token is not cached.
  • The connection's base_url field must be an https URL. If the connection is missing, the action fails with a "Missing Orderwise connection" error and makes no request to Orderwise.
  • Default Address Found is true when any defaultAddress value in the Orderwise response is exactly true. It is false when no address is marked as default, the address list is empty, or the response has no defaultAddress field.
  • Customer ID can contain only letters, digits, - and _. A number such as 1001.0 is read as 1001. The action rejects any other value before it calls Orderwise.
  • The action doesn't follow redirects and doesn't retry. Each request times out after 3 seconds to connect and 10 seconds to read.
  • Error messages include the HTTP status and Orderwise's own error message (or the start of its response), capped at 200 characters. They never include the connection credentials or the token. For example: RuntimeError: Orderwise request failed with status 404: <Orderwise message>.
  • Safe Mode: off by default, so any failure stops the flow. When enabled, the action returns Success = false and the error in Error Message, and the flow continues. Default Address Found is false and Addresses is an empty list.

Inputs

NameTypeDescription
Customer IDStringOrderwise customer ID
Safe ModeBoolean (optional)If true, returns success/failure without throwing an error

Outputs

NameTypeDescription
SuccessBooleanWhether the delivery addresses were retrieved
Default Address FoundBooleanTrue when the customer has a delivery address marked as default
AddressesListThe customer's delivery addresses as returned by Orderwise
Error MessageStringError details when Safe Mode is enabled and the action fails

Did this page help you?