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_urlfield must be anhttpsURL. If the connection is missing, the action fails with a "Missing Orderwise connection" error and makes no request to Orderwise. Default Address Foundistruewhen anydefaultAddressvalue in the Orderwise response is exactlytrue. It isfalsewhen no address is marked as default, the address list is empty, or the response has nodefaultAddressfield.- Customer ID can contain only letters, digits,
-and_. A number such as1001.0is read as1001. 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 = falseand the error inError Message, and the flow continues.Default Address FoundisfalseandAddressesis an empty list.
Inputs
| Name | Type | Description |
|---|---|---|
| Customer ID | String | Orderwise customer ID |
| Safe Mode | Boolean (optional) | If true, returns success/failure without throwing an error |
Outputs
| Name | Type | Description |
|---|---|---|
| Success | Boolean | Whether the delivery addresses were retrieved |
| Default Address Found | Boolean | True when the customer has a delivery address marked as default |
| Addresses | List | The customer's delivery addresses as returned by Orderwise |
| Error Message | String | Error details when Safe Mode is enabled and the action fails |
Updated 1 day ago
Did this page help you?
