Add Shop Account

Creates a new Sana shop account. Use this action to automatically create shop accounts, for example, when an external system, such as a CRM, sends customer data to the workflow via an API call trigger.

Sana Commerce Cloud generates a random password for each shop account created by this action. After the shop account is created, customers can set their own password using the forgot password functionality on the webstore login page.

Field Description
Step name A descriptive name for this action. You can use the default name or enter your own.
Name The name of the customer. This name is shown in the account menu in the webstore header and on the My account page.

Enter a value manually or click Add variable to use data from the trigger or a previous step.

Email The e-mail address of the customer. Customers use this e-mail address to log in to the webstore.

Enter a value manually or click Add variable to use data from the trigger or a previous step.

Account type The shop account type.

Available options: Customer, Contact, Sales agent.

The default option is Customer.

Account role The shop account role.

Available options: Regular account, Account manager, Sub-account.

The default option is Regular account.

For more information, see Shop Account Roles.

Account IDs Comma-separated ERP account reference IDs to link the shop account to. The accounts must exist in your ERP system and be imported to Sana using the Customer import task. Enter the IDs manually or click Add variable to use a variable that contains them.
Activated Select whether the shop account is activated. If this option is disabled, the customer cannot log in to the webstore until the shop account is activated. By default, this option is enabled.
Can order products Select whether the customer can order products. By default, this option is enabled.
Can see prices Select whether the customer can see prices. By default, this option is enabled.
Can see stock Select whether the customer can see stock. By default, this option is enabled.

The permissions Can order products, Can see prices, and Can see stock depend on the global settings in Sana Admin under Setup > Products. If a setting is disabled globally, you cannot override it for an individual shop account.

Using Variables

The Name, Email, and Account IDs fields support variables. Instead of entering fixed values, you can insert a variable so that each time the workflow runs, the shop account is created with the data from that run. This is what makes the action useful for automation: one workflow can create any number of shop accounts, each with different customer data.

To use a variable, click Add variable below the field and select the necessary variable from the list. The list contains the variables available at this point in the workflow. Depending on how you design the workflow, the data can come from:

  • The payload variable of the API call trigger, when an external system sends the customer data to the workflow.

  • The result variable of the Parse JSON action, when the data is received in a response to the Send HTTP Request action.

For example, a CRM sends customer data to the workflow through the API call trigger. In the trigger, you set the payload variable Customer to the Object type with the fields Name, Email, and AccountIds, all of type String. In the Add shop account action, you then insert these variables.

Keep the following in mind:

  • The variable must contain a value in the format the field expects. For Email, it must be a valid e-mail address. For Account IDs, it must be a comma-separated list of ERP account IDs, for example, C0001,C0002.

  • If the variable is empty or contains an invalid value, the shop account is not valid or created. To make sure the data is always present, mark the corresponding payload fields as required in the trigger.