Actions overview
| Action | Description |
|---|---|
CheckoutAccountTypeSelect | Sets the account type for the current order process. |
CheckoutBillAddressSelect | Sets a saved address as the active billing address. |
CheckoutShippingAddressSelect | Sets a saved address as the active shipping address. |
CheckoutSetDraftAddress | Saves an address temporarily as a draft (without validation). |
CheckoutCommitDraftAddress | Applies an address draft as the binding checkout address (with validation). |
CheckoutUseSameShippingAddress | Sets the shipping address to be the same as the billing address. |
CheckoutUseDifferentShippingAddress | Activates a different shipping address. |
CheckoutSetGuestEmail | Sets the email address for a guest order. |
CheckoutPaymentUpdate | Sets the payment method for the current order process. |
CheckoutShippingMethodUpdate | Sets the shipping method for the current order process. |
CheckoutConfirm | Submits the order in a binding manner. |
CheckoutSetFreeFields | Sets the free checkout fields, e.g., terms and conditions consent. |
CheckoutSetCustomerData | Sets customer data in the checkout. |
CheckoutPseudoCCSelect | Selects a saved pseudo credit card. |
CheckoutNewsletterSubscribe | Subscribes the customer to the newsletter during the checkout. |
CheckoutSetVerificationStatus | Sets the verification status of the order. (Documentation to follow) |
CheckoutStoreIdSelect | Sets a store as the pickup location for the current order process. |
Actions
CheckoutBillAddressSelect
With this action, the customer selects one of their already saved addresses as the billing address for the current order process. The selection is applied immediately; no further confirmation is needed. Usage exampleUseful for displaying a dropdown of their saved addresses to logged-in customers in the checkout, so they can select a billing address with a single click without re-entering data. Parameters
| Name | Description |
|---|---|
addressId | The ID of the address to be set as the billing address. |
| Error code | Description |
|---|---|
missingAddressId | Parameter addressId is missing. |
invalidAddressId | The specified address does not exist or does not belong to this customer account. |
CheckoutShippingAddressSelect
With this action, the customer selects one of their already saved addresses as the shipping address for the current order process. The action is only relevant if the customer wants to specify a different shipping address. Usage exampleUseful when a customer wants to ship an order to a different address. Parameters
| Name | Description |
|---|---|
addressId | The ID of the address to be set as the shipping address. |
| Error code | Description |
|---|---|
missingAddressId | Parameter addressId is missing. |
invalidAddressId | The specified address does not exist or does not belong to this customer account. |
CheckoutSetDraftAddress
With this action, an address entered by the customer is temporarily saved without the entries being immediately checked for completeness or correctness. The draft address already affects the available shipping and payment methods, which are adjusted based on the entries (relevant for the OnePage checkout). The address is initially considered a draft and is applied as the binding checkout address only by CheckoutCommitDraftAddress. The address type is specified directly in the action name (bill or shipping).
Usage exampleUseful in the OnePage checkout to continuously cache the entered address without immediately confronting the customer with validation errors. The actual check of the address only takes place when “Buy now” is clicked, via CheckoutCommitDraftAddress. Parameters
| Name | Description |
|---|---|
address.(fieldname) | The individual fields of the address, e.g., address.firstName, address.street, etc. |
CheckoutCommitDraftAddress
With this action, an address draft previously saved via CheckoutSetDraftAddress is validated and applied as the checkout address. The behavior differs depending on the order type:- Guest order - the entered address is checked and, if valid, applied directly for the checkout.
- Order with customer account - the entered address is checked and, if valid, created as a new address in the customer account and selected for the current checkout at the same time.
bill or shipping).
Together with CheckoutSetDraftAddress, this action forms the typical address workflow in the OnePage checkout:CheckoutSetDraftAddress continuously caches the entries (without validation);
CheckoutCommitDraftAddress completes the process.
Usage exampleUseful as the final step in the OnePage checkout. The customer has already entered their address, and only when “Buy now” is clicked is it checked whether all information is correct and complete. Parameters
| Name | Description |
|---|---|
address.(fieldname) | The individual fields of the address, e.g., address.firstName, address.street, etc. |
| Error code | Description |
|---|---|
addressCheckFailed | Error in the address data. Specified via sub-codes: - minlen = too few characters - maxlen = too many characters - numeric = invalid characters - country = country not configured - zip = postal code incorrect |
CheckoutUseSameShippingAddress
With this action, it is specified that delivery should be made to the same address as the billing address. A previously entered or selected different shipping address is not deleted but is no longer taken into account for the checkout. Usage exampleUseful for giving the customer the option, e.g., via a checkbox, to equate billing and shipping addresses with a single click without re-entering data. Related modules, variables & methods Example showing how the action is triggered via a hidden form that can be coupled to a checkbox via JavaScript.
CheckoutUseDifferentShippingAddress
With this action, a different shipping address is activated for the checkout. As soon as it has been triggered, the area for selecting or entering a separate shipping address becomes relevant. The action reverses the effect of CheckoutUseSameShippingAddress. Usage exampleUseful when the customer wants an order to be delivered to a different address, e.g., directly to a branch. Related modules, variables & methods Example showing how the action is triggered via a hidden form that can be coupled to a checkbox via JavaScript.
CheckoutAccountTypeSelect
With this action, the account type for the current order process is set. The selected type determines which steps are displayed in the checkout process. Usage exampleUseful on the login page in the checkout context to give the customer the option of ordering as a guest without having to create an account. Parameters
| Name | Description |
|---|---|
accountType | The desired account type. Possible values: - guest - Guest account - new - New customer account - registered - Registered customer |
| Error code | Description |
|---|---|
invalidAccountType | The specified account type is invalid. |
guest” to enable a guest order.
CheckoutSetGuestEmail
With this action, the email address for a guest order is set. It is only relevant if the account type has been set to “guest”.
Usage exampleUseful in the checkout when a customer wants to order as a guest and needs to provide their email address for this. Parameters
| Name | Description |
|---|---|
guestEmail | The email address of the guest customer. |
| Code | Description |
|---|---|
missingEmail | Parameter guestEmail is missing. |
emailCheckFailed | Parameter guestEmail does not contain a valid email address. |
CheckoutShippingMethodUpdate
With this action, the shipping method for the current order process is set. Usage exampleUseful in the checkout to display a list of available shipping methods to the customer, from which they can select one. Parameters
| Name | Description |
|---|---|
shippingMethodId | The ID of the shipping method to be selected. |
| Error code | Description |
|---|---|
missingShippingMethodId | Parameter shippingMethodId is missing. |
invalidShippingMethodId | The specified shipping method is not available. |
- $wsCheckout
- $wsCheckout.selectedShippingMethod
- $wsCheckout.isValidShippingMethod()
- $wsCheckout.problems.shippingMethod
CheckoutConfirm
With this action, the order is submitted in a binding manner. It is the final step in the checkout process and requires that all required information — address, payment method, and shipping method — is complete and valid. Usage exampleUseful as the “Buy now” button on the order overview page, through which the customer places the order in a binding manner. Error codes
| Error code | Description |
|---|---|
notLoggedIn | The user is not logged in and no guest email is available. |
invalidCheckout | The checkout is not complete or contains invalid information. |
CheckoutSetFreeFields
With this action, the free checkout fields are set, e.g., consent to the terms and conditions or a comment field. The action is typically used together withCheckoutConfirm on the order overview page.
Usage exampleUseful on the order overview page to display a checkbox to the customer for consent to the terms and conditions, which must be accepted before submitting the order. Parameters
| Name | Description |
|---|---|
freeFields.(id).value | The value of the free field, e.g., freeFields.agb.value for the terms checkbox. |
| Error code | Description |
|---|---|
missingRequiredField | A required field was not filled in. |
CheckoutSetCustomerData
With this action, additional customer data is set in the checkout. The fields are loaded dynamically from the configuration and can be grouped or ungrouped. Usage exampleUseful in the checkout to query configured customer data fields (e.g., company name, phone) that go beyond the standard address. Parameters
| Name | Description |
|---|---|
(dynamic) | The fields are loaded from $wsCheckout.customerData and vary depending on the shop configuration. |
CheckoutPseudoCCSelect
With this action, the customer selects one of their saved pseudo credit cards for the current order process. The action is exclusively relevant for the Computop credit card integration. Usage exampleUseful in the checkout when the customer wants to use a previously stored credit card without re-entering the card data. The value
0 stands for “do not use a saved card”.
Parameters
| Name | Description |
|---|---|
pseudoCCId | The ID of the saved pseudo credit card. The value 0 selects no card. |
CheckoutNewsletterSubscribe
With this action, a customer is subscribed to the newsletter during the order process. It works analogously to the NewsletterSubscribe action — parameters, error codes, and field-passing behavior are identical. Usage exampleUseful in the checkout to give customers the option of subscribing to the newsletter during the order process, for example via a checkbox on the order overview page. Parameters
| Name | Description |
|---|---|
email | The email address to be subscribed to the newsletter. |
targetGroupId.(id) | Optional target group ID to which the customer should be subscribed. |
| Error code | Description |
|---|---|
missingEmail | Parameter email is missing. |
emailCheckFailed | The specified email address is invalid. |
accountAlreadyExists | The email address is already subscribed to the newsletter. |
Example showing how a customer in the checkout selects a target group and subscribes to the newsletter.
CheckoutStoreIdSelect
With this action, the customer selects a store as the pickup location for the current order process. The action is only relevant if a shipping method of typepickup has been selected. During selection, it is checked whether all products are available in the selected store. If this is not the case, the action is not executed and an error is returned.If no store has been selected, the store from the general session selection is used by default. Usage example
Useful when the customer wants to pick up an order directly in a store and should choose from the available Click & Collect stores in the checkout. Error codes
| Error code | Description |
|---|---|
reservationFailed | The items are not available in the selected store. Details on the affected product are returned via error.details.productId. |
- $wsCheckout
- $wsCheckout.selectedStoreID
- $wsCheckout.selectedShippingMethod
- $wsStores
- $wsStores.loadAllStores()
- $wsConfig.shippingMethods
pickup, a dropdown with all Click & Collect-capable stores. It sets the selected store as the pickup location via CheckoutStoreIdSelect, including error handling for items not available in the selected store.
