Skip to content

Context Gateway Command Reference

Context Gateway Command Reference

Available commands

CommandDescriptionPayloadSince
context_add-customer-messageAdds an error message to be displayed to the customer in the Storefront via FlashBag messages.{"message": "string"}6.7.1.0
context_change-billing-addressChanges the billing address of a customer to the specified address ID.{"addressId": "string"}6.7.1.0
context_change-shipping-addressChanges the shipping address of a customer to the specified address ID.{"addressId": "string"}6.7.1.0
context_change-currencyChanges the active currency for a customer to the currency with the specified ISO 4217 currency code.{"iso": "string"}6.7.1.0
context_change-languageChanges the active language for a customer to the language with the specified BCP 47 language tag.{"iso": "string"}6.7.1.0
context_change-payment-methodChanges the active payment method for a customer to the method with the specified technical name.{"technicalName": "string"}6.7.1.0
context_change-shipping-methodChanges the active shipping method for a customer to the method with the specified technical name.{"technicalName": "string"}6.7.1.0
context_change-shipping-locationChanges the active shipping location for a customer to the specified country / country state.{"countryIso": "string", "countryStateIso": "string"}6.7.1.0
context_login-customerLogs in an existing customer with the specified email.{"customerEmail": "string"}6.7.1.0
context_register-customerRegister a new customer with the specified data and log them in.{"data": "object (s. RegisterCustomerCommand)"}6.7.1.0

Available data for RegisterCustomerCommand

These properties are available to set in the custom data object of the context_register-customer command.

FieldTypeRequiredDescription
titlestringThe title of the customer, e.g. "Mr." or "Mrs."
accountTypestringThe type of account, either "private" or "business"
firstNamestringYesThe first name of the customer
lastNamestringYesThe last name of the customer
emailstringYesThe email address of the customer
salutationIdstringThe ID of the salutation to use for the customer
guestboolWhether the customer is a guest (default: true)
storefrontUrlstringYesThe storefront URL of the sales channel (You find available domains in the sales channel context -> sales channel -> domains)
requestedGroupIdstringThe ID of the customer group to assign to the customer
affiliateCodestringThe affiliate code to assign to the customer
campaignCodestringThe campaign code to assign to the customer
birthdayDayintThe day of the customer's birthday
birthdayMonthintThe month of the customer's birthday
birthdayYearintThe year of the customer's birthday
passwordstring(for non-guest customers)The password for the customer (plain text, will be hashed by the shop before stored)
billingAddressobjectYesThe billing address of the customer, s. AddressResponseStruct for available fields
shippingAddressobjectThe shipping address of the customer, s. AddressResponseStruct for available fields
vatIdsarrayAn array of VAT IDs for the customer
acceptedDataProtectionboolWhether the customer has accepted the data protection policy (default: false)

AddressResponseStruct

This structure is used for the billingAddress and shippingAddress fields in the RegisterCustomerCommand.

FieldTypeRequiredDescription
titlestringThe title of the address, e.g. "Mr." or "Mrs."
firstNamestringYesThe first name of the address owner
lastNamestringYesThe last name of the address owner
salutationIdstringThe ID of the salutation to use for the address owner
streetstringYesThe street of the address
zipcodestringYesThe ZIP code of the address
citystringYesThe city of the address
companystringThe company name for the address
departmentstringThe department name for the address
countryStateIdstringThe ID of the country state for the address
countryIdstringYesThe ID of the country for the address
additionalAddressLine1stringAdditional address line 1
additionalAddressLine2stringAdditional address line 2
phoneNumberstringThe phone number for the address