UDF Integration for Magento Connector in Integration Hub

UDF Integration for Magento Connector in Integration Hub

The Magento connector supports the integration of User Defined Fields (UDFs) between the Magento and SAP Business One applications, allowing businesses to map and synchronize custom data fields between Magento and SAP Business One. This functionality enables users to seamlessly link UDFs that share the same length, data type, and structure across both applications, ensuring a smooth and efficient data exchange. 

The Magento connector supports the integration of User Defined Fields (UDFs) on the Products object. 

To perform the UDF Integration, follow these steps:

1.                Open the UDF Integration window by navigating to Administration Integration Hub UDF Integration.

2.               The UDF Integration-Selection Criteria window will appear.

3.               The active template for the Magento connector will automatically be displayed in the Template Name field.

4.               Select the specific object you want to map UDFs for in the Object Type field.

5.               Click OK to open the UDF Integration Mapping screen.

6.              Click the Retrieve Custom Fields button to fetch the list of Magento custom fields.

7.               In the left column titled SAP User Defined Fields (UDF), select the SAP UDFs. In the Mapped to Shopify Custom Fields column, select the corresponding Magento custom fields (Attributes).

8.               In the Data Type column, choose the data type for the Magento custom fields.

9.              Click the Add/Update button to save the data.

       The following Magento data types for custom fields (Attributes) are supported for the UDF integration with SAP Business One:

Magento Attribute Type

SAP B1 UDF Type

Text

Alphanumeric

Textarea

Alphanumeric

Price

Price

Select

Valid Values

Boolean

Checkbox

 

Note

1. The user needs to ensure that they have mapped the correct UDFs with the same data type, length, and structure between the applications.

2. In case you do not want to integrate UDF information between the applications, you may delete the relevant row. Once the row is deleted, the UDF information will no longer be integrated during the initialization and synchronization process.   

3. The internal ID of the valid value for the Select attribute in Magento must precisely match the valid value in SAP Business One.


 Caution

The SAP Business One UDFs with "Linked to Entities" Validation will not appear in the column SAP User Defined Fields (UDF)

To retrieve the values from the ‘Postman’ application by using the ‘API’ below.

1. Attribute Values in SAP Business One:

  • Attributes created in Magento, specifically those with the Select type, must be synchronized with SAP Business One. These attributes will have multiple predefined options or values.
  • For example, an attribute like Color can have multiple options (Red, Blue, Green), and if such attributes are created in Magento, these must also exist in SAP Business One to ensure consistency in data and operations between both systems. The select attributes in Magento need to be validated as existing values in SAP Business One.

2. Retrieving Attribute Values Using Postman and Magento API:

To retrieve these attribute values via an API call, you use the Magento REST API. Here’s a breakdown of the provided API request:

GET http://<Host>/rest/default/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_user_defined&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[pageSize]=250&searchCriteria[filterGroups][1][filters][0][field]=frontend_input&searchCriteria[filterGroups][1][filters][0][value]=select&searchCriteria[filterGroups][1][filters][0][conditionType]=in HTTP/1.1

Host: <Host>

Authorization: Bearer <Access Token>

Explanation of the Parameters:

  • GET /rest/default/V1/products/attributes: This is the endpoint used to retrieve a list of product attributes.
  • searchCriteria[filterGroups][0][filters][0][field]=is_user_defined: This is a filter that ensures only user-defined attributes are retrieved. Magento distinguishes between system attributes (predefined by Magento) and user-defined attributes (those created by the store owner).
  • searchCriteria[filterGroups][0][filters][0][value]=1: The value of 1 indicates that you are fetching user-defined attributes only (value 0 would be for system attributes).
  • searchCriteria[pageSize]=250: This limits the number of attributes fetched to 250. You can adjust the number based on how many attributes you want to retrieve.
  • searchCriteria[filterGroups][1][filters][0][field]=frontend_input: This is used to filter attributes based on the input type of the attribute. You want to fetch attributes where the input type is select the value.
  • searchCriteria[filterGroups][1][filters][0][value]=select, Boolean: The filter is looking for attributes with input type of select searchCriteria[filterGroups][1][filters][0][conditionType]=in: The in condition type ensures that you're fetching attributes that match any of the input types specified (select, or Boolean).

Authentication:

  • Authorization: Bearer <Access Token>: This is a necessary header for the API call, where you need to provide a valid Bearer token. The access token is issued through the OAuth or Admin API authentication process in Magento.
  • Host: <Host>: The placeholder <Host> should be replaced with the domain or base URL of your Magento instance. Example: https://example.com.

 

For more information on product attributes documentation, please refer to the following URL:

https://adobe-commerce.redoc.ly/2.4.7-admin/tag/productsattributes

    • Related Articles

    • Magento integration with SAP Business One

      The Magento is an eCommerce platform that provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online store. Magento offers powerful marketing, search engine ...
    • Step 3 – Deployment of Magento in the Integration Hub

      To deploy the solution, choose the Deploy Now button. The application prompts you to provide the license details. For more information, refer to the Assigning the Integration Hub licenses knowledge article. The Integration Hub displays the Deployment ...
    • Alerts Notification of Magento in the Integration Hub

      Configure the alert settings in the Alert Notification tab in Magento Settings window. The Alert Notification tab of Magento Settings window contains the following fields: Field Name Description User Displays the list of users in SAP Business One. ...
    • Step 1 – Set Connectivity of Magento in the Integration Hub

      Choose the SAP Business One SLD to provide the connection between SAP Business One System Id and Magento Id. Note By default, the solution displays all the SAP Business One SLDs available in SLD Category selected during customer creation.     To add ...
    • Magento Transactions in the Integration Hub

      The following Magento transactions are supported:  Sales Order Payment Order Cancellation Shipment Refund  Windows Enhancements in SAP Business One New fields that are relevant to the Integration Hub have been added to different document windows in ...