Skip to main content
This section describes the available actions in the customer account area. With these actions, accounts can be created, addresses managed, and login credentials changed, for example.

Actions overview

ActionDescription
AccountRegisterCreates a new customer account.
AccountActivateActivates an existing customer account via an email address.
AccountActivateOptInActivates an existing customer account via opt-in token.
AccountDeleteDeletes the account of the logged-in user.
AccountDeleteOptInConfirms the deletion of a customer account via opt-in token.
SubAccountCreateCreates a new employee account and sends an email with the link for setting the password.
AcceptInvitationAccepts an invitation to a customer account via opt-in token.
UnlockLoginUnlocks a locked login access.
LoginLogs in a user.
LogoutLogs out a logged-in user.
PasswordForgottenSends a password-forgotten email.
ResetPasswordResets the password of a user account.
EmailUpdateChanges the stored email address of a user account.
EMailUpdateOptInConfirms the change of the email address via opt-in token.
EmailVerifyVerifies an email address via double opt-in.
AddressCreateCreates a new address for the logged-in user.
AddressUpdateEdits an existing address of the logged-in user.
AddressDeleteDeletes an address of the logged-in user.
SetMainAddressSets an address as the main address.
SetDefaultBillAddressSets an address as the default billing address.
SetDefaultDeliveryAddressSets an address as the default shipping address.
RemoveDefaultBillAddressRemoves the set default billing address.
RemoveDefaultDeliveryAddressRemoves the set default shipping address.
CreditCardDeleteDeletes a saved credit card from the customer account.
CheckPasswordStrengthChecks the strength of an entered password in real time via AJAX.
SaveGuestDataToUserCreates a fully-fledged customer account from a guest checkout.
SubAccountDeleteDeletes an existing employee account.
UpdateSubAccountUpdates the settings of an employee account.
UpdatePrivilegesCreates or updates a privilege group with defined rights.
CreatePrivilegeGroupCreates a new privilege group.
DeletePrivilegeGroupDeletes an existing privilege group.

Actions

AccountRegister

This action creates a new customer account. The user specifies their email address and a password. Usage example
Can be used on a registration page where new customers can create an account, e.g., to view their order history or manage addresses.
Parameters
NameDescription
emailIdentifier of the user account (the email address by default).
passwordPassword of the user account.
passwordRepeatRepeated entry of the password — must match password.
Error codes
CodeDescription
missingIdParameter id is empty.
missingPasswordParameter password is empty.
passwordMismatchParameters password and passwordRepeat are not identical.
emailCheckFailedParameter id contains an invalid email address.
passwordCheckFailedPassword does not meet the required guidelines.
accountAlreadyExistsAn account with the given id already exists.
Related modules, variables & methods Example showing how the action is created and embedded in a form.
{{ var $cActionAccountRegister = $wsActions.create("AccountRegister") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAccountRegister.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAccountRegister.csrf }}">

    <input type="email" name="email">
    <input type="password" name="password">
    <input type="password" name="passwordRepeat">

    <button type="submit">Register</button>
</form>

AccountActivate

This action activates an existing customer account. The action is typically triggered via a form. Usage example
Can be used on the confirmation page where the customer enters their email address to activate their account.
Parameters
NameDescription
idIdentifier of the user account (the email address by default).
Error codes
Error codeDescription
missingIdParameter id is empty.
emailCheckFailedParameter id contains an invalid email address.
accountAlreadyExistsAn active account with the given id already exists.
Related modules, variables & methods Example showing how the action is created and embedded in a form through which the customer activates their account with their email address.
{{ var $cActionAccountActivate = $wsActions.create("AccountActivate") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAccountActivate.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAccountActivate.csrf }}">
    <input type="email" name="id">
    <button type="submit">Activate account</button>
</form>

AccountActivateOptIn

This action activates an existing customer account via an opt-in token. The token is transmitted to the user via a link in a confirmation email. Usage example
Can be used on the confirmation page to which the customer is redirected after clicking the opt-in link in the registration email.
Error codes
Error codeDescription
unauthorizedNo valid opt-in token was passed.
Related modules, variables & methods Example showing how a confirmation message is displayed after successful execution of the action.
{{ if $wsActions.current.name == "AccountActivateOptIn" and $wsActions.current.success }}
    <div class="alert alert-info">Account was activated.</div>
{{ /if }}

AccountDelete

This action permanently deletes the account of the currently logged-in user. Usage example
Can be used on an account management page where logged-in customers can delete their own account if desired.
Error codes
CodeDescription
notLoggedInThe user is not logged in.
Related modules, variables & methods Example showing how the action is created and triggered via a confirmation button.
{{ var $cActionAccountDelete = $wsActions.create("AccountDelete") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAccountDelete.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAccountDelete.csrf }}">

    <button type="submit">Delete account</button>
</form>

AccountDeleteOptIn

This action confirms the deletion of a customer account via an opt-in token. The token is transmitted to the user via a link in a confirmation email. Usage example
Can be used on the confirmation page to which the customer is redirected after clicking the opt-in link in the deletion email.
Error codes
Error codeDescription
unauthorizedNo valid opt-in token was passed.
Related modules, variables & methods Example showing how a confirmation message is displayed after successful execution of the action.
{{ if $wsActions.current.name == "AccountDeleteOptIn" and $wsActions.current.success }}
    <div class="alert alert-info">Account was deleted.</div>
{{ /if }}

SubAccountCreate

This action creates a new employee account. An email containing a link to set the password is automatically sent to the specified email address. Admin rights are required for this action. Usage example
Can be used on the account management page where administrators can create new employee accounts.
Parameters
NameDescription
emailEmail address of the new employee account.
The link to set the password is sent to this address.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingIdParameter email is empty.
emailCheckFailedParameter email contains an invalid email address.
accountAlreadyExistsAn account with the given email address already exists.
Related modules, variables & methods Example showing how the action is created and embedded in a form through which a new employee account can be created.
{{ var $myActionSubAccountCreate = $wsActions.create("SubAccountCreate") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionSubAccountCreate.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionSubAccountCreate.csrf }}">
    <input type="email" name="email">
    <button type="submit">Create employee account</button>
</form>

SubAccountDelete

This action deletes an existing employee account. Your own account as well as accounts with admin rights cannot be deleted. Admin rights are required for this action. Usage example
Can be used on the employee management page where administrators can remove employee accounts that are no longer needed.
Parameters
NameDescription
memberIdThe ID of the employee account to be deleted.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingMemberIdParameter memberId is missing.
invalidMemberIdInvalid memberId — the employee account does not exist or does not belong to this account.
deletionNotAllowedThe account may not be deleted because it is your own account or an admin account.
Related modules, variables & methods Example showing how an employee account is deleted by its ID.
{{ var $myActionSubAccountDelete = $wsActions.create("SubAccountDelete") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionSubAccountDelete.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionSubAccountDelete.csrf }}">
    <input type="hidden" name="memberId" value="{{= $myMember.id }}">
    <button type="submit">Delete employee account.</button>
</form>

UpdateSubAccount

This action updates the settings of an existing employee account. Deactivating your own account or removing admin rights from it is not possible. Admin rights are required for this action. Usage example
Can be used on the employee management page where administrators can adjust roles and other settings of employee accounts.
Parameters
NameDescription
memberIdThe ID of the employee account to be updated.
displayNameDisplay name of the employee account.
activeIndicates whether the employee account is allowed to log in (true / false).
Your own account cannot be deactivated.
adminIndicates whether the account has admin rights (true / false).
Admin rights cannot be removed from your own account.
privilegeGroupIdID of the privilege group assigned to the employee account.
defaultAddressVisibilitySpecifies which visibility is preselected by default when creating new addresses.
Possible values:
- private (only visible for this account)
- shared (shared company-wide)
allowedSubshopsSpecifies which subshops the employee account has access to.
The subshop IDs are passed as keys of a JSON object, e.g., {"shop1": true, "shop2": true}.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingMemberIdParameter memberId is missing.
invalidMemberIdInvalid memberId — the employee account does not exist or does not belong to this account.
selfDeactivationNotAllowedYour own account cannot be deactivated.
selfAdminRemovalNotallowedAdmin rights cannot be removed from your own account.
Related modules, variables & methods Example showing how the settings of an employee account are updated via a form.
{{ var $myActionUpdateSubAccount = $wsActions.create("UpdateSubAccount") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionUpdateSubAccount.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionUpdateSubAccount.csrf }}">
    <input type="hidden" name="memberId" value="{{= $myMember.id }}">
    <input type="text" name="displayName" value="{{= $myMember.displayName }}">
    <input type="hidden" name="privilegeGroupId" value="{{= $myMember.privilegeGroupId }}">
    <input type="hidden" name="defaultAddressVisibility" value="private">
    <input type="hidden" name="allowedSubshops" value='{"shop1": true, "shop2": true}'>
    <label>
        <input type="checkbox" name="active" value="true" {{ if $myMember.active }}checked{{ /if }}>
        Active
    </label>
    <label>
        <input type="checkbox" name="admin" value="true" {{ if $myMember.admin }}checked{{ /if }}>
        Admin
    </label>
    <button type="submit">Save employee account.</button>
</form>

UpdatePrivileges

This action updates a privilege group. Admin rights are required for this action. Usage example
Can be used on the privilege management page where administrators can define rights and restrictions for privilege groups.
Parameters
NameDescription
privilegeIdThe ID of the privilege group to be updated.
createMissingIndicates whether the group should be created automatically if it does not exist.
Possible values:
- yes
typeType of the privilege group:
- global (shop-wide)
- account (account-related)
privilegesJSON object with the privilege fields.
Possible fields:
- allowedPaymentMethods (list of allowed payment methods)
- paymentLimitPerOrder (maximum order value per order)
- paymentLimit (global budget limit across all orders since the limit was set)
- blockedTemplates (blocked templates / pages of the group)
- blockedUrls (blocked URLs of the group)
- editableFields (editable fields of the group)
- groupName (only relevant for type = global)
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingPrivilegeIdParameter privilegeId is missing.
invalidPrivilegeIdInvalid privilegeId — the group does not exist and createMissing is not set.
invalidTypeParameter type contains an invalid value.
Related modules, variables & methods Example showing how the privileges of a group are updated.
{{ var $myActionUpdatePrivileges = $wsActions.create("UpdatePrivileges") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionUpdatePrivileges.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionUpdatePrivileges.csrf }}">
    <input type="hidden" name="privilegeId" value="{{= $myPrivilegeGroup.id }}">
    <input type="hidden" name="createMissing" value="yes">
    <input type="hidden" name="type" value="global">
    <input type="hidden" name="privileges" value='{"groupName": "Purchasing", "allowedPaymentMethods": ["invoice", "prepayment"], "paymentLimitPerOrder": 500, "paymentLimit": 5000}'>
    <button type="submit">Save privileges.</button>
</form>

CreatePrivilegeGroup

This action creates a new privilege group. Admin rights are required for this action. Usage example
Can be used on the privilege management page where administrators can create new groups with defined rights for employee accounts.
Parameters
NameDescription
nameName of the new privilege group.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingNameParameter name is missing or empty.
Related modules, variables & methods Example showing how a new privilege group is created via a form.
{{ var $myActionCreatePrivilegeGroup = $wsActions.create("CreatePrivilegeGroup") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionCreatePrivilegeGroup.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionCreatePrivilegeGroup.csrf }}">
    <input type="text" name="name">
    <button type="submit">Create privilege group.</button>
</form>

DeletePrivilegeGroup

This action deletes an existing privilege group. However, a group cannot be deleted as long as employee accounts are still assigned to it. Admin rights are required for this action. Usage example
Can be used on the privilege management page when a privilege group that is no longer needed should be removed.
Parameters
NameDescription
idThe ID of the privilege group to be deleted.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
unauthorizedThe user does not have admin rights.
missingIdParameter id is missing.
invalidIdInvalid id — the privilege group does not exist.
groupHasMembersThe privilege group cannot be deleted because employee accounts are still assigned to it.
Related modules, variables & methods Example showing how a privilege group is deleted by its ID.
{{ var $myActionDeletePrivilegeGroup = $wsActions.create("DeletePrivilegeGroup") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionDeletePrivilegeGroup.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionDeletePrivilegeGroup.csrf }}">
    <input type="hidden" name="id" value="{{= $myPrivilegeGroup.id }}">
    <button type="submit">Delete privilege group.</button>
</form>

AcceptInvitation

With this action, a B2B corporate customer accepts an invitation via the double opt-in procedure. The invitation is contained in a link that the customer receives by email. After successful verification, the account has full access to the shop. Usage example
Can be used on the confirmation page to which the invited customer is redirected after clicking the invitation link in the email.
Error codes
Error codeDescription
unauthorizedNo valid opt-in token was passed.
invalidAccountIdThe double opt-in token could not be assigned to any customer account.
actionNotAllowedThe double opt-in token is invalid or does not match the account.
Related modules, variables & methods Example showing how a confirmation message is displayed after the invitation has been successfully accepted.
{{ if $wsActions.current.name == "AcceptInvitation" and $wsActions.current.success }}
    <div class="alert alert-info">Invitation was accepted.</div>
{{ /if }}

UnlockLogin

This action unlocks a login access that has been locked due to too many failed login attempts. The action can be executed by a logged-in user as well as via an opt-in token. Usage example
Useful when a customer has been locked out of their account after several incorrect entries and has received an unlock link by email.
Error codes
CodeDescription
unauthorizedThe user is not logged in or no valid opt-in token was passed.
Related modules, variables & methods Example showing how a confirmation message is displayed after successful execution of the action. The action itself is typically triggered via an opt-in link in an email and does not require a form.
{{ if $wsActions.current.name == "UnlockLogin" and $wsActions.current.success }}
    <div class="alert alert-info">Account was unlocked</div>
{{ /if }}

Login

This action logs in a user with their access credentials. Usage example
Can be used on the login page where customers can log in to their account with their email address and password.
Parameters
NameDescription
idIdentifier of the user account (the email address by default).
passwordPassword of the user account.
Error codes
CodeDescription
missingIdParameter id is empty.
missingPasswordParameter password is empty.
emailCheckFailedParameter id contains an invalid email address.
loginBlockedToo many invalid login attempts.
invalidCredentialsInvalid login attempt — id or password is not correct.
Related modules, variables & methods Example that creates a login form with email and password as well as a general error output for invalid entries.
{{ var $cActionLogin = $wsActions.create("Login") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionLogin.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionLogin.csrf }}">

    {{ if $cActionLogin.error }}
        <div class="alert alert-danger">An error occurred</div>
    {{ /if }}

    <input type="email" name="id" value="{{= $cActionLogin.params.id|ifNull('') }}">
    <input type="password" name="password">

    <button type="submit">Log in</button>
</form>

Logout

This action logs out a logged-in user. Usage example
Can be used as a logout button in the header or on the account overview page.
Related modules, variables & methods Example showing how the action is triggered via a simple link that redirects the user to a defined page after logout.
<a href="{{= $wsActions.url('Logout'
, $wsViews.viewUrl('account/overview.htm'), {}) }}">Log out</a>

PasswordForgotten

This action sends a password-forgotten email to the specified email address. The email contains an opt-in link that allows the execution of the ResetPassword action. Usage example
Can be used on a “Password forgotten” page where customers enter their email address to receive a recovery link.
Parameters
NameDescription
emailEmail address of the user account to which the opt-in link is sent.
Error codes
Error codeDescription
missingEmailParameter email is empty.
emailCheckFailedParameter email does not contain a valid email address.
passwordRecoveryFailedNo user account exists for the specified email address.
Related modules, variables & methods Example that creates a form through which the customer enters their email address and receives a confirmation after successful execution.
{{ var $cActionPasswordForgotten = $wsActions.create("PasswordForgotten") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionPasswordForgotten.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionPasswordForgotten.csrf }}">

    {{ if $cActionPasswordForgotten.success }}
        <div>Password successfully reset</div>
    {{ /if }}

    <input type="email" name="email">
    <button type="submit">Request new password</button>
</form>

ResetPassword

This action resets the password of a user account. After successful execution, the user is automatically logged out. By default, the action applies to the logged-in user — if an opt-in token is sent along with it, it applies to the user associated with the token. Usage example
Can be used on the page to which the customer is redirected via the password-forgotten link to set a new password.
Parameters
NameDescription
newPasswordThe new password to be set for the user account.
newPasswordRepeatRepetition of the new password to avoid typos.
passwordAuthPrevious password of the user account. Not required if an opt-in token is used.
Error codes
Error codeDescription
notLoggedInNeither an opt-in token nor a logged-in session is present.
missingPasswordParameter newPassword is empty.
passwordMismatchParameters newPassword and newPasswordRepeat are not identical.
missingPasswordAuthParameter passwordAuth is empty. Only occurs without an opt-in token.
failedPasswordAuthParameter passwordAuth does not match the previous password.
passwordCheckFailednewPassword does not meet the password rules.
Related modules, variables & methods Example showing how a confirmation is output after a successful reset, the form for setting the password is displayed for a valid opt-in token, and a notice about the expired link is displayed for an invalid token.
{{ if $wsOptIn.current.valid }}
    {{ var $cActionResetPassword = $wsActions.create("ResetPassword") }}
    <form action="{{= $wsViews.current.url() }}" method="post">
        <input type="hidden" name="wsact" value="{{= $cActionResetPassword.id }}">
        <input type="hidden" name="wscsrf" value="{{= $cActionResetPassword.csrf }}">

        <input type="password" name="newPassword">
        <input type="password" name="newPasswordRepeat">

        <button type="submit">Reset password.</button>
    </form>
{{ else }}
    <div>The link has expired.</div>
{{ /if }}

EmailUpdate

This action changes the stored email address of a user account. Usage example
Can be used on the account management page where logged-in customers can update their email address.
Parameters
NameDescription
emailNew email address to be stored for the user account.
Error codes
Error codeDescription
missingEmailParameter email is missing.
emailCheckFailedParameter email does not contain a valid email address.
accountAlreadyExistsAnother account with this email address already exists.
Related modules, variables & methods Example that provides a form for entering a new email address and outputs a confirmation after successful execution.
{{ var $cActionEmailUpdate = $wsActions.create("EmailUpdate") }}

{{ if $cActionEmailUpdate.success }}
    <div>Email address successfully updated.</div>
{{ else }}
    <form action="{{= $wsViews.current.url() }}" method="post">
        <input type="hidden" name="wsact" value="{{= $cActionEmailUpdate.id }}">
        <input type="hidden" name="wscsrf" value="{{= $cActionEmailUpdate.csrf }}">

        <input type="email" name="email">

        <button type="submit">Change email address.</button>
    </form>
{{ /if }}

EmailUpdateOptIn

This action confirms the change of the email address via opt-in token. The token is transmitted to the new email address via a link in a confirmation email. Usage example
Can be used on the confirmation page to which the customer is redirected after clicking the opt-in link in the confirmation email.
Error codes
Error codeDescription
unauthorizedNo valid opt-in token was passed.
Related modules, variables & methods Example showing how a confirmation form is displayed for a valid opt-in token, a success message appears after successful execution, and a corresponding notice is output for an expired token.
{{ var $cActionEmailUpdateOptIn = $wsActions.create("EmailUpdateOptIn") }}

{{ if $wsActions.current.success and $wsActions.current.name == "EmailUpdateOptIn" }}
    <div class="alert alert-success">Email address was successfully changed.</div>
{{ elseif $wsOptIn.current.valid }}
    <form method="post" action="{{= $wsViews.current.url() }}">
        <input type="hidden" name="wscsrf" value="{{= $cActionEmailUpdateOptIn.csrf }}">
        <input type="hidden" name="wsact" value="{{= $cActionEmailUpdateOptIn.id }}">
        <button type="submit">Confirm email address.</button>
    </form>
{{ else }}
    <div class="alert alert-danger">The token has expired.</div>
{{ /if }}

EmailVerify

This action verifies an email address via double opt-in. After registration, the customer receives a confirmation email; clicking the contained link executes this action on the shop page. Usage example
Can be used on the confirmation page to which the customer is redirected after clicking the verification link in the registration email.
Error codes
Error codeDescription
actionNotAllowedNo valid double opt-in token is present.
Related modules, variables & methods Example showing how a success message is output after successfully clicking the confirmation link and a corresponding notice appears for an invalid token.
{{ if $wsActions.current.name == "EmailVerify" }}
    {{ if $wsActions.current.success }}
        <div>Email address was verified.</div>
    {{ else }}
        <div>Email address could not be verified.</div>
    {{ /if }}
{{ /if }}

AddressCreate

This action creates a new address for the logged-in user. Usage example
Can be used on the address management page where customers can create new shipping or billing addresses.
Parameters
NameDescription
address.(fieldname)The individual fields of the address, e.g., address.firstName, address.street, etc.
typeType of address: - "bill" - Billing address - "delivery" - Shipping address If this is the first address of its kind for the relevant customer account, it is automatically set as the main address for the respective type.
Error codes
Error codeDescription
notLoggedInThe user is not logged in and no opt-in token is present.
emptyAddressNo address fields were passed.
addressCheckFailedError 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
Related modules, variables & methods Example showing how a new address is created via a form with individual address fields.
{{ var $myActionAddressCreate = $wsActions.create("AddressCreate") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionAddressCreate.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionAddressCreate.csrf }}">
    <input type="hidden" name="type" value="delivery">
    <input type="text" name="address.firstName">
    <input type="text" name="address.lastName">
    <input type="text" name="address.street">
    <input type="text" name="address.zip">
    <input type="text" name="address.city">
    <button type="submit">Save shipping address.</button>
</form>

AddressUpdate

This action edits an existing address of the logged-in user. Usage example
Can be used on the address management page when a customer wants to update one of their saved addresses.
Parameters
NameDescription
addressIdThe ID of the address to be edited.
address.(fieldname)The individual fields of the address to be updated.
typeType of address: - "bill" - Billing address - "delivery" - Shipping address
Error codes
Error codeDescription
notLoggedInThe user is not logged in and no opt-in token is present.
emptyAddressNo address fields were passed.
invalidAddressIdInvalid addressId — the address does not exist or does not belong to this user account.
Related modules, variables & methods Example showing how an existing address is edited by its ID.
{{ var $myActionAddressUpdate = $wsActions.create("AddressUpdate") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionAddressUpdate.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionAddressUpdate.csrf }}">
    <input type="hidden" name="addressId" value="{{= $myAddress.id }}">
    <input type="hidden" name="type" value="delivery">
    <input type="text" name="address.firstName" value="{{= $myAddress.firstName }}">
    <input type="text" name="address.lastName" value="{{= $myAddress.lastName }}">
    <input type="text" name="address.street" value="{{= $myAddress.street }}">
    <input type="text" name="address.zip" value="{{= $myAddress.zip }}">
    <input type="text" name="address.city" value="{{= $myAddress.city }}">
    <button type="submit">Update shipping address.</button>
</form>

AddressDelete

This action deletes an address of the logged-in user. Usage example
Can be used on the address management page when a customer wants to remove an address that is no longer needed.
Parameters
NameDescription
addressIdThe ID of the address to be deleted.
Error codes
Error codeDescription
notLoggedInThe user is not logged in and no opt-in token is present.
invalidAddressIdInvalid addressId — the address does not exist or does not belong to this user account.
Related modules, variables & methods Example showing how an address is deleted by its ID.
 {{ var $cActionAddressDelete = $wsActions.create("AddressDelete") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAddressDelete.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAddressDelete.csrf }}">
    <input type="hidden" name="addressId" value="{{= $cAddress.id }}">

    <button type="submit">Delete address.</button>
</form>

SetMainAddress

This action sets a saved address as the main address. The main address is automatically preselected in the checkout. Usage example
Can be used on the address management page so customers can store their preferred address as the default for future orders.
Parameters
NameDescription
addressIdThe ID of the address to be set as the main address.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
missingAddressIdParameter addressId is missing.
invalidAddressIdInvalid addressId — the address does not exist or belongs to another account.
Related modules, variables & methods Example showing how an address is set as the main address via a button, provided it is not already.
{{ var $cActionSetMainAddress = $wsActions.create("SetMainAddress") }}

{{ foreach $cAddress in $wsAccount.addresses }}
    {{ if $cAddress.id != $wsAccount.mainAddress.id }}
        <form action="{{= $wsViews.current.url() }}" method="post">
            <input type="hidden" name="wsact" value="{{= $cActionSetMainAddress.id }}">
            <input type="hidden" name="wscsrf" value="{{= $cActionSetMainAddress.csrf }}">
            <input type="hidden" name="addressId" value="{{= $cAddress.id }}">

            <button type="submit">Set as main address.</button>
        </form>
    {{ /if }}
{{ /foreach }}

SetDefaultBillAddress

This action sets a saved address as the default billing address. The default billing address is automatically preselected as the billing address in the checkout. Usage example
Can be used on the address management page so customers can store a preferred billing address as the default for future orders.
Parameters
NameDescription
addressIdThe ID of the address to be set as the default billing address.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
missingAddressIdParameter addressId is missing.
invalidAddressIdInvalid addressId — the address does not exist or belongs to another account.
Related modules, variables & methods Example showing how an address is set as the default billing address via a button, provided it is not already.
{{ var $myActionSetDefaultBillAddress = $wsActions.create("SetDefaultBillAddress") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionSetDefaultBillAddress.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionSetDefaultBillAddress.csrf }}">
    <input type="hidden" name="addressId" value="{{= $myAddress.id }}">
    <button type="submit">Set as default billing address.</button>
</form>

SetDefaultDeliveryAddress

This action sets a saved address as the default shipping address. The default shipping address is automatically preselected as the shipping address in the checkout. Usage example
Can be used on the address management page so customers can store a preferred shipping address as the default for future orders.
Parameters
NameDescription
addressIdThe ID of the address to be set as the default shipping address.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
missingAddressIdParameter addressId is missing.
invalidAddressIdInvalid addressId — the address does not exist or belongs to another account.
Related modules, variables & methods
{{ var $myActionSetDefaultDeliveryAddress = $wsActions.create("SetDefaultDeliveryAddress") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionSetDefaultDeliveryAddress.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionSetDefaultDeliveryAddress.csrf }}">
    <input type="hidden" name="addressId" value="{{= $myAddress.id }}">
    <button type="submit">Set as default shipping address.</button>
</form>

RemoveDefaultBillAddress

This action removes the set default billing address of the logged-in user. Usage example
Can be used on the address management page when a customer wants to reset the default billing address so that no address is preselected in the checkout.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
Related modules, variables & methods Example showing how the default billing address is removed via a button, provided one is set.
{{ var $myActionRemoveDefaultBillAddress = $wsActions.create("RemoveDefaultBillAddress") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionRemoveDefaultBillAddress.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionRemoveDefaultBillAddress.csrf }}">
    <button type="submit">Remove default billing address.</button>
</form>

RemoveDefaultDeliveryAddress

This action removes the set default shipping address of the logged-in user. Usage example
Can be used on the address management page when a customer wants to reset the default shipping address so that no address is preselected in the checkout.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
Related modules, variables & methods Example showing how the default shipping address is removed via a button, provided one is set.
 {{ var $myActionRemoveDefaultDeliveryAddress = $wsActions.create("RemoveDefaultDeliveryAddress") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $myActionRemoveDefaultDeliveryAddress.id }}">
    <input type="hidden" name="wscsrf" value="{{= $myActionRemoveDefaultDeliveryAddress.csrf }}">
    <button type="submit">Remove default shipping address.</button>
</form>

CreditCardDelete

This action deletes a saved credit card from the customer account. Usage example
Can be used on the credit card management page where logged-in customers can view and remove their saved credit cards.
Parameters
NameDescription
pseudoCCIdThe ID of the credit card to be deleted.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
invalidPseudoCCIdInvalid pseudoCCId — the credit card does not exist or does not belong to this user account.
Related modules, variables & methods Example showing how all saved credit cards are listed and each one can be deleted via a button.
{{ var $cCreditCards = $wsAccount.pseudoCreditCards }}
{{ foreach $cCreditCard in $wsAccount.pseudoCreditCards }}
    {{ var $cActionCreditCardDelete = $wsActions.create("CreditCardDelete") }}
    <form method="POST" action="{{= $wsViews.current.url() }}">
        <input type="hidden" name="wscsrf" value="{{= $cActionCreditCardDelete.csrf }}">
        <input type="hidden" name="wsact" value="{{= $cActionCreditCardDelete.id }}">
        <input type="hidden" name="pseudoCCId" value="{{= $cCreditCard.id }}">
        <button type="submit">Delete credit card.</button>
    </form>
{{ /foreach }}

CheckPasswordStrength

This action checks the strength of an entered password in real time. The action is executed in the background via AJAX and returns a JSON object with the evaluation result. Usage example
Can be used on pages with password input fields, e.g., on the registration page, to give the customer direct feedback on the password strength.
Parameters
NameDescription
passwordThe password to be checked.
Return values
ValueDescription
valueScore reached for password strength.
maxMaximum score for password strength.
Related modules, variables & methods Example showing how the password strength is checked in real time on input and is displayed to the user visually as weak, medium, or strong.
{{ var $cActionCheckPasswordStrength = $wsActions.create("CheckPasswordStrength") }}
<form id="wsFormCheckPasswordStrength" action="{{= $wsViews.current.url() }}" method="post" style="display:none;" data-ws-ajax-form>
    <input type="hidden" name="wsact" value="{{= $cActionCheckPasswordStrength.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionCheckPasswordStrength.csrf }}">
    <input type="hidden" name="password" id="wsCheckPassword" value="">
</form>

accountDisplayNameUpdate

This action changes the display name of a customer account. Usage example
Can be used on the account management page where logged-in customers can update their display name.
Parameters
NameDescription
displayNameThe new display name to be stored for the user account.
Error codes
CodeDescription
notLoggedInThe user is not logged in.
missingDisplayNameParameter displayName is missing.
Related modules, variables & methods Example showing how the action is created and embedded in a form through which the customer can update their display name.
{{ var $cActionAccountDisplayNameUpdate = $wsActions.create("accountDisplayNameUpdate") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAccountDisplayNameUpdate.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAccountDisplayNameUpdate.csrf }}">
    <input type="text" name="displayName">
    <button type="submit">Save display name</button>
</form>

AccountSetCustomerData

This action sets or updates custom customer data for the logged-in user account. Usage example
Can be used on the account management page where logged-in customers can store their personal data such as date of birth or phone number.
Parameters
NameDescription
customerData.(fieldname)The individual fields of the customer data.
Error codes
Error codeDescription
notLoggedInThe user is not logged in.
emptyCustomerDataNo customer data fields were passed.
Related modules, variables & methods Example showing how the action is created and embedded in a form through which the customer can update their personal data.
{{ var $cActionAccountSetCustomerData = $wsActions.create("AccountSetCustomerData") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionAccountSetCustomerData.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionAccountSetCustomerData.csrf }}">
    <input type="text" name="customerData.phone">
    <input type="text" name="customerData.birthDate">
    <button type="submit">Save customer data</button>
</form>

GuestRegister

This action creates a fully-fledged customer account from a guest checkout. The guest specifies a password; the email address is automatically taken from the checkout data. Usage example
Can be used on the order confirmation page after a guest checkout, where non-logged-in customers are given the option to create an account directly.
Parameters
NameDescription
guestMailEmail address of the guest account, automatically taken from the checkout data.
passwordNew password for the customer account.
passwordRepeatRepetition of the password.
Error codes
Error codeDescription
passwordCheckFailedPassword does not meet the required guidelines. Specified via sub-codes: - minlen = too few characters - maxlen = too many characters
Related modules, variables & methods Example showing how non-logged-in customers are offered the option of creating a customer account after a guest checkout, including success output.
{{ if not $wsAccount.isLoggedIn }}
    {{ var $cGuestRegister = $wsActions.create("GuestRegister") }}

    {{ if $cGuestRegister.success }}
        <div class="alert alert-success">An account has been created.</div>
    {{ /if }}

    {{ if not $cGuestRegister.success }}
        <form action="{{= $wsViews.current.url() }}" method="post">
            <input type="hidden" name="wscsrf" value="{{= $cGuestRegister.csrf }}">
            <input type="hidden" name="wsact" value="{{= $cGuestRegister.id }}">
            <input type="email" name="guestMail" value="{{= $wsCheckout.guestMail }}" readonly>
            <input type="password" name="password">
            <input type="password" name="passwordRepeat">
            <button type="submit">Create customer account.</button>
        </form>
    {{ /if }}
{{ /if }}

SaveGuestDataToUser

This action creates a fully-fledged customer account from the data of a guest checkout. The guest specifies a password and thereby gains access to a permanent account. Usage example
Can be used on the order confirmation page after a guest checkout to give the customer the option of creating an account directly without having to re-enter all data.
Parameters
NameDescription
idEmail address of the guest account.
passwordNew password for the customer account.
passwordRepeatRepetition of the password.
Error codes
Error codeDescription
nonGuestAccountThe user is already logged in to a customer account.
missingIdParameter id is missing.
missingPasswordParameter password is missing.
passwordMismatchParameters password and passwordRepeat are not identical.
passwordCheckFailedThe password rule check has failed.
Related modules, variables & methods Example showing how a guest customer can create a permanent account after the checkout by only having to provide a password.
{{ var $cActionSaveGuestDataToUser = $wsActions.create("SaveGuestDataToUser") }}
<form action="{{= $wsViews.current.url() }}" method="post">
    <input type="hidden" name="wsact" value="{{= $cActionSaveGuestDataToUser.id }}">
    <input type="hidden" name="wscsrf" value="{{= $cActionSaveGuestDataToUser.csrf }}">
    <input type="hidden" name="id" value="{{= $wsAccount.email }}">

    <input type="password" name="password">
    <input type="password" name="passwordRepeat">

    <button type="submit">Create customer account.</button>
</form>