The following blog post covers the topic of customer groups in Magento 2 and SAP Business One. Below, you will find how the entity is represented in the two systems. Besides, we shed light on how to import/export customer groups between Magento 2 and SAP Business One. The leading provider of ERP and CRM services often becomes a reliable pillar for Magento 2 businesses. It lets merchants automate and simplify various routine processes with the help of innovative and intelligent tools it offers. However, you cannot just integrate them with your e-commerce website. The SAP Business One Magento 2 integration requires some attention. If you don’t know how to import/export customer groups between Magento 2 and SAP Business One, check this article.
Table of contents
- 1 Magento 2 Customer Groups
- 2 Customer Groups in SAP Business One
- 3 How to Synchronize Customer Groups Between Magento 2 and SAP Business One
- 4 Magento 2 Integration with Other Systems
Magento 2 Customer Groups
Customer groups in Magento 2 are used to determine discounts and the tax class associated with particular customers. By default, the platform provides three categories of store visitors: General, Wholesale, and Not Logged In.
Also, bear in mind that the selection of customer groups in Magento 2 contains all regular customer groups and shared catalogs. The latter ones are included even if the corresponding configuration is not enabled in settings. Magento 2 allows for assigning a single customer group or shared catalog to a company (we describe this B2B entity from the perspective of Magento 2 SAP Business One integration in another article) at a time.
All customer groups are available under Customers -> Customer Groups in a grid:
Magento 2 provides the ability to create a customer group on the same screen. Follow these steps:
- Click Add New Customer Group under Customers -> Customer Groups.
- Specify its name (max 32 characters).
- Select the group’s tax class.
- Save the new customer group.
At the same time, it is possible to edit customer groups. Go to the Customer Groups grid and open a record you want to change in the edit mode. Apply changes and save the group.
Now, let’s see how to assign a customer to a customer group in Magento 2.
- Find a customer you want to assign to a group under Customers > All Customers.
- Select the checkbox in the first column of the corresponding row.
- Next, proceed to the Actions control and choose Assign a Customer Group.
- Specify a group to assign the customer to under the Group control.
- Click OK when prompted.
Besides, it is possible to associate a customer group with specific discounts in Magento 2. Go to Marketing -> Promotions -> Cart Price Rules and follow these steps:
- Choose a cart price rule associated with a discount or create a new one.
- Choose a customer group to apply the rule to.
- Save changes.
If you want to delete a customer group in Magento 2, do the following:
- Go to the Customer Groups screen and open the corresponding record in the edit mode.
- Click Delete Customer Group from the button bar.
- Click OK when prompted to confirm
- After that, click Save Customer Group.
Note that if you try to delete a customer group associated with a shared catalog, you won’t be able to do that due to the system limitations of Magento 2.
What about SAP B1?
Customer Groups in SAP Business One
SAP Business One lets you create customer groups to handle specific pricing and payment conditions. You also get a more straightforward mechanism for creating new customers as well as facilitate more advanced reporting.
Unlike Magento 2, SAP Business One offers two different types of business partners: in addition to customers, you also get leads. The latter describes your potential customers. After the first sale associated with a lead is complete, they become a customer. Thus, a sales order can have either a lead or a customer assigned. However, moving to a delivery stage is possible only when the latter is chosen.
Note that both leads and customers, despite their differences, use the same structure and master data type. So are vendors, but it is a topic of another article.
As for customer groups, they are similar to the corresponding Magento 2 entity. Note that a customer in SAP Business One can be assigned to a single customer group. The overall purpose of this entity is to classify clients for pricing and reporting. The system also lets you use such parameters as a sector or size to implement a more precise classification.
Besides, customer groups are used for creating reports. As a result, you can highlight the sales figures per sector.
It is also necessary to mention that assigning a price list to a customer group supersedes the default configuration from the general settings.
Customer groups in SAP Business One are gathered in a separate window, where you can add new records or edit the existing ones. Choose a price list, discount type, and price priority per group.
Assigning a group to a customer on a Business Partner Master Data screen looks as follows:
Now, when you are familiar with the basics of customer group management in both Magento 2 and SAP Business One, let’s see how to transfer the corresponding data between the two systems.
How to Synchronize Customer Groups Between Magento 2 and SAP Business One
Now, when you are familiar with how customer groups are represented in SAP Business One and Magento 2, let’s take a look at how to transfer them between the two systems. Unfortunately, both Magento 2 and SAP Business One doesn’t let you do that directly. The default instruments of the two systems are associated with various limitations that don’t let you sync them. Therefore, it is necessary to install a third-party connector. For instance, you can leverage the SAP Business One Integration Add-on for Magento 2. The add-on relies upon the SAP API, implementing the most seamless and efficient data transfers. Thus, syncing customers for the Magento 2 SAP Business One integration is no longer a problem. Follow these steps to import and export them:
- Get the SAP Business One Integration Add-on for Magento 2.
- Install and enable it on your Magento 2 website.
- Selects customers as an entity that you want to export – customer groups will be transferred automatically.
- Configure other parameters of the integration: you can match attributes and automate data transfers, following schedule.
Let’s be a little bit more specific and provide additional information on how to configure the integration.
First of all, you should turn on your new export job. Set Enable Job to Yes. Type its title and configure the frequency of transfers. You can select a predefined interval from the list of provided options. At the same time, our add-on allows for custom timespans. Alternatively, you can configure the job for manual runs. The last option requires choosing the language of your transfer. You can specify it in the Locale field.
The Export Behavior tab provides the ability to select your File Format option. Choose SAP Customer to transfer customer groups from Magento 2 to SAP Business One. Besides, it is necessary to specify a list number related to the ERP’s further processing of Magento 2 customers.
In Export Settings, it is necessary to specify an entity you need to transfer. Since the add-on of Improved Import & Export moves customer groups as a part of customer data, set the Entity field to Customers.
Now, the SAP Business One Integration Add-on lets you prevent conflicts caused by different attribute standards. The tool allows you to specify Magento 2 attributes and select replacements suitable for the SAP Business One integration.
The Export Source tab represents the final step of the configuration. It lets you provide the information necessary to connect Magento 2 to SAP Business One. Usually, the tab looks as follows:
Note that the SAP DI API protocol is the core of the Magento 2 connection to SAP Business One. The form above allows for providing the following parameters to the API endpoint:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:log="LoginService">
The API endpoint URL associated with your integration usually look as follows:
You get the following response for sending the request shown above:
The SessionID parameter is used to enable and maintain the Magento 2 SAP Business One integration.
The list of other entities that you can move also contains the following types of data:
- Products. Transfer a full product catalog between your e-commerce store and SAP Business One. The add-on works with all product types, categories, attributes, etc.
- Orders. Synchronize orders, including their statuses, invoices, credit notes, shipping and billing data.
- Prices. Freely move product price lists along with tier and special prices between Magento 2 and SAP B1.
- Customers. Transfer customers and all the related data from your e-commerce store to the ERP system and back.
- B2B Entities. The supported B2B entities of Magento 2 include:
- Quotes and negotiable quotes + discounts and special prices;
- Requisition lists + full product lists and quantity amounts;
- Shared catalogs + custom product listings divided according to customer groups.
- Companies + full structure, customer roles, and company administrator accounts.
While the add-on serves only the Magento 2 SAP Business One integration, the Improved Import & Export Magento 2 extension can become a basis of numerous other connections. Let’s see how it acts.
Magento 2 Integration with Other Systems
Еhe core features of the Improved Import & Export extension are vital for the Magento 2 SAP Business One integration. At the same time, they enable other similar connections. The best thing about the module is that you can avoid complex manual configurations by leveraging its add-ons. For instance, MS Dynamics Integration Add-on, WooCommerce Migration Add-on, Banggood Dropshipping Add-on, and numerous other integrators are under your disposal. Also, you can rely on our assistance.
However, the extension works as a standalone tool.
Automated Data Transfers
The Improved Import & Export module provides the ability to automate data transfers. There are two different ways to do that: cron-based schedules and event-based triggers. The former turns the Magento 2 and SAP Business One synchronization into a set of processes launched according to predefined or custom intervals. The configuration of this feature is that easy:
Alternatively, the plugin lets you create a set of rules. Consequently, it launches import and export processes every time the specified conditions are met.
As for the mapping opportunities of the Improved Import & Export extension, they are quite broad. The robust mapping features of our module dramatically simplify data transfers eliminating most issues caused by different data storing standards. While Magento 2 and SAP Business one don’t let you move files without editing them in a third-party app, Improved Import & Export enables you to apply the necessary changes automatically or match data right in the Magento 2 backend. The following mapping features are under your disposal when you transfer customer groups and other entities:
- Presets. With predefined mapping schemes, you let the extension and its add-on match attributes for you;
- Manual Matching. Alternatively, it is possible to map both attributes and their values right in the Magento 2 backend;
- Attribute Values Editing. Our tool also offers various editing rules that help you apply changes to numerous attribute values in bulk: combine or merge them, create and add suffixes and prefixes;
- Filters. With this feature, you can narrow down the selection of data you move from Magento 2 to external systems. Use attributes and their values to create filters for transferring data you want to sync;
- Category Mapping. Match product categories upon product import from SAP Business One to Magento 2. The extension also lets you create new catalog elements on the go;
- Attributes On The Fly. If the provided data scope lacks some attributes and values, you can recreate them automatically with this feature.
Extended Connectivity Options
Various connectivity opportunities introduced in Improved Import & Export are also worth your attention. Magento 2 works with CSV and XML files only. It imposes restrictions on numerous transfers. You always have to convert data files into these formats. However, the Improved Import & Export lets you save tons of time by adding support for ODS, JSON, and Excel. Note that it can also unpack several archive types.
When it comes to data sources, various options are under your disposal. A local or remote server represents the most obvious way to exchange files. At the same time, transfers between Magento 2 and other systems can incorporate cloud storage options and direct file URL downloads. Google Sheet imports are another way to import the information your business needs. The process looks as follows:
As we’ve already mentioned, the Magento 2 SAP Business One integration is based on the AP connection. And the Improved Import & Export module lets you leverage this option with no additional tools or efforts. The module also enables you to establish API-based integrations with other platforms.
The additional information on how to sync customer groups between Magento 2 and SAP Business One is available on the pages of the Improved Import & Export extension and its add-on:
You may also contact our support for further details.