Migration of points

This guide outlines the process of migrating points from another shop system to Shopware 6. It is intended for developers and system administrators involved in system migration tasks.

Import of Points into Shopware 6

It is possible to transfer points from other systems to Shopware6. For this, the database table prems_bonus_system_import_point must be populated with entries from the external system.

Mandatory Fields for Import

It is possible to transfer points from other systems to Shopware 6. For this, the database table _prems_bonus_system_import_point_ must be populated with entries from the external system. This allows for the import of points into Shopware 6.

  • id (binary(16))

  • customer_number (int)

  • points (int)

  • created_at (datetime(3))

After the table is filled, the following command must be executed on the console: Optionally, the field "reason" can be filled with text up to 255 characters long. This text will later appear to customers as the reason for the booking. The text could be something like "Migration" or "Points Transfer from Legacy System".

./console prems:bonus-system:import-points-from-db-table

If necessary, repeat the command multiple times until no entries remain in the table

Migration of Points Using Shopware 5 as an Example

SELECT up.id as id, u.customernumber AS customer_number, up.points as points, "Migration" as reason
FROM s_core_plugins_bonus_user_points as up
LEFT JOIN s_user AS u 
ON up.userID = u.id

Next, execute the following command in the console: Import the CSV file into the database table _prems_bonus_system_import_point within the Shopware 6 database. Export the points (if necessary, as a CSV) and encode them in UTF

./console prems:bonus-system:import-points-from-db-table

Last updated

Was this helpful?