Importing users, orders, and form data
Besides the catalog, the Import data section can load users, orders, and form data (comments and reviews) from Excel, CSV, or XML files. It's the same wizard as for the catalog: Choose Files → Choose Data → Settings → Import. The general wizard settings (choosing files, templates, configuring tables and columns) are covered in "Importing a catalog from Excel." This page covers only what's different.
An import always creates new records. Existing users, orders, and form data aren't updated.
To undo an import, delete its entry in the Import history list on the first step (the "×" icon) and confirm. This also deletes the users, orders (with their payment sessions), or form data that the import created.
Access to import
The Import data section is available on plans above Basic. Administrators need the data import permission. Saving templates requires a separate permission to create import templates, and deleting them requires permission to delete templates.
Linking records across imports
Orders and form data refer to users and products. To link them, use the Is record ID? checkbox on a column in step 2: the values in that column are stored as record IDs for later imports.
So the order is:
- Import users (and products into the catalog), selecting Is record ID? on the column with their IDs.
- Import orders or form data. The user ID and product ID columns must contain the same values as the Is record ID? column of the earlier import.
Rows whose user or product can't be found aren't imported.
Importing users
Step 1. In Data storage type, select Users, then choose an auth provider in Authorization Provider (the list shows provider markers). You can't continue without a provider. Users are created in this provider, and their data is checked against the provider's registration form.
Step 2. For each selected column, choose a registration form field in Name. The marker and type come from the form field. Then select:
- Login? on the login column. The checkbox appears only if the chosen form field is the login.
- Password? on the password column. The checkbox appears only if the chosen form field is the password.
If a form field has validators, the column's values are checked right on this step, and errors appear under the column. Further appears once every check in the Validation block passes: the login and password columns and all required registration form fields are selected.
Step 3. Optionally, select Choose group and pick the group new users are added to. If the provider's settings already set a group for new users, it's filled in for you and can't be changed.
Step 4. Set how many records to process and click Start import.
During the import:
- Users are created as active, and passwords are stored encrypted.
- These rows are skipped: rows with an empty login or password, rows that fail the registration form checks, repeated logins within the file, and logins that already exist in the project (case-insensitive, across all providers).
- The notification email comes from the login if the provider uses email; otherwise, from the first form field with email validation.
Importing orders
Step 1. In Data storage type, select Orders, then choose an order storage in Order storage. Order data is checked against this storage's form.
Step 2. An order is built from three tables. For each table, set Data Type to what it holds:
- Orders: the orders themselves.
- Products in Order: the products in each order.
- Payments: the payments.
You need at least one table of each type. The tables can come from different files or sheets if you upload them as separate main files.
For the columns, set:
- ID type: what the column holds, Order ID, User ID, Product ID, Payment ID, or Recipient User ID.
- Attribute contains status values on the order status column. Use Convert value and Use special values to map values in the file to the storage's statuses (Order statuses).
- Contains price, Contains currency, and Contains quantity on the price, currency, and quantity columns.
Further appears once every check in the Validation block passes: all three table types, the status column and order ID in the orders table, the user ID, the product ID, and the price are selected.
Step 3 is skipped for orders.
Step 4.
- Payment account: the payment account the payments are assigned to. The list shows only accounts linked to the storage. The import won't start without one.
- Currency code: the order currency, such as
USD. You don't need it if you selected Contains currency on a column in step 2. If neither the file nor this field sets a currency, the currency of the order's first product is used. - The status axis, only for a storage in extended status mode: choose which axis the status column values belong to, Order status or Fulfillment.
Click Start import.
During the import:
- Repeated order IDs and rows without a user are skipped.
- If a status value from the file doesn't exist in the storage, that status is created.
- Order items come from the products table. Without a quantity column, each row counts as one unit. Rows with a non-numeric price or quantity are skipped.
- Each order gets one payment session. Its amount is the sum of prices in the payments table. The payment status comes from the status column in the payments table:
paid(or the Russian «оплачен») means paid,canceled(«отменён») means canceled,expired(«просрочен») means expired, and any other value means waiting for payment.
Importing form data
This loads comments and reviews submitted through forms, attached either to catalog products or to users.
Step 1. In Data storage type, select Form data (comments), then choose a Form and a Module. Only the Catalog and Users modules are supported. The form must be set up to accept data in the selected module; otherwise, a message asks you to choose such a module.
Step 2. For each column, choose a form field in Name and set ID type:
- User ID: the author of the entry. Required.
- Product ID: the product the entry is about (for the Catalog module).
- Recipient User ID: the user the entry is about (for the Users module).
Select Attribute contains status values on the entry status column; you can map its values to statuses through Comment Statuses.
Step 3 is skipped.
Step 4. Set how many records to process and click Start import.
During the import:
- Rows whose user or product can't be found are skipped, as are entries the form's settings for this module don't allow.
- If the form is closed, the import fails with an error.
- If there's no status column and the form has moderation turned on, entries get the moderation status.
- The entry date is the time of the import.