Skip to content

Syncing customers and processing orders

Plugin configuration

In the plugin configuration, you can find settings for the customer synchronization and order processing. Plugin configuration

  1. The customer sync can be enabled or disabled
  2. The sync type can be set to "Shoppers" or "Customers"
  • "Shoppers" will only sync Abacus shoppers to Shopware customers (recommended)
  • "Customers" will sync all Abacus shoppers and debitors to Shopware customers
  1. With the "Shopper UUID" setting, you can choose between "Account" or "Email" to uniquely identify the shopper.
    • "Account" is the recommended setting because only account is unique in Abacus
    • "Email" will use the email address to identify the shopper (please note that it is possible that multiple shoppers have the same email address. We don't handle this case at the moment)
  2. Only enable this option if you want to send an email to the customer when the customer is created in Shopware. (Careful: this will send an email to all customers that are synced)

Abacus configuration

In the Abacus application settings (621), you can define a collective debtor for all guest orders. This debtor will be used for all guest orders that are created in Shopware. Abacus configuration

Customer synchronization process "Shoppers"

Every 24 hours, all shoppers from Abacus are synchronized to Shopware. The synchronization is done in the background and can be triggered manually through the console.

php
bin/console scheduled-task:run-single webwirkung.abacus.shopper.synchronization
bin/console scheduled-task:run-single webwirkung.abacus.shopper.synchronization

In addition to the scheduled full sync, the plugin also subscribes to Abacus changes and consumes them every 15 minutes. This means that changes in Abacus are quickly reflected in Shopware. This is how a correctly synchronized shopper looks in Shopware: Shopper synchronization example Besides the default shopware customer data, we also store the Abacus customer subject id, the abacus shopper id as well as the abacus debtor number in the custom fields of the customer entity.

Guest orders

Guest orders are created in Shopware when a customer checks out without creating an account. Guest order exampleGuest order example confirmation which then is sent to Abacus and can directly be processed there. Guest order in Abacus

Order of a new customer

When a new customer is created in Shopware and the customer makes an order, the order is sent to Abacus and can be processed there. So, first the sign-up of a new customer: Sign-up of a new customer and then the order of the new customer: Order of a new customer which then is sent to Abacus and can directly be processed there. Order of a new customer in Abacus Because it is a new customer, the address can't be found and the address must be processed manually in Abacus. Order of a new customer in Abacus addressOrder of a new customer in Abacus addressOrder of a new customer in Abacus address If the address already exists or Abacus detects a similar address, the address can be selected to prevent duplicates. Order of a new customer in Abacus address Once successfully processed, the order gets a green checkmark and can be converted into an order. Order of a new customer in Abacus address

Order of a new customer in Abacus address The order can be found in the "Closed" orders in Abacus. Order of a new customer in Abacus address And the order is created in the abacus order tool (111). Order of a new customer in Abacus address

Sync back to Shopware

During the order processing in Abacus, the shopper is created for the new customer in Abacus. This shopper is then synced back to Shopware (after 15 minutes). Before the sync, the new customer looks like this in Shopware: New customer pre shopper sync And once the sync is done, the existing customer is updated with the shopper data: New customer post shopper sync Note that the shopper data is stored in the custom fields of the customer entity.

💡 How we identify the correct Shopware customer

First, we try to find the correct Shopware customer using the shopper ID. However, newly registered Shopware customers don't have a Shopper ID yet.
In Shopware, unlike in Abacus, the email address of a customer account is unique. Based on the configuration set in the Shopware plugin, we use the value of the "Account" field or the "Email" field of the Shopper API body to identify the correct Shopware customer.

Order of an existing customer

When an existing customer makes an order, the order is sent to Abacus and can directly be processed there. Because existing customers have already a shopper in Abacus and a shopper ID, the order can be processed without any manual address processing if the address has not changed.