-
Notifications
You must be signed in to change notification settings - Fork 5
Magento 2 Data Store Sync
If you are using Gigya's Data Store (DS), synchronization between Magento and the Data Store is available through an optional, separate module that can be installed on top of the main Gigya Extension for Magento.
The DS Sync module pulls data from Gigya's Data Store and maps it into the user account database in Magento.
Customers who only use Gigya's account storage, and do not use the Gigya Data Store service, do not have to install this additional module.
To implement DC sync, follow these steps:
1.Download and save DS Sync | 2.Map fields | 3.Select Method | 4.Enable Module |
---|
-
Download the DS module for Magento 2.1 here.
-
In the Magento root folder, create the following folder structure (the "app" directory should already exist): app/code/Gigya/GigyaDS.
-
Unzip the module into this directory.
Map the fields whose data you wish to sync between the Data Store and Magento. This mapping will apply on the front-end, in the following scenarios:
-
New user registers
-
Existing user logs in
-
User edits their profile
Each field mapping definition is a single JSON object, and includes the following parameters:
Required | Key | Description |
---|---|---|
cmsName | Name of the field in Magento (case sensitive). If you are mapping custom EAV attributes (e.g. attributes added by installing additional modules), these attributes must be prefixed by "custom_". For example: "cmsName": "custom_pet_name"
|
|
cmsType | The field data type in Magento - int (short/long), string (varchar(X)), date, Boolean. | |
gigyaName | Field in Gigya DS in the following format: ds.. , where ds is fixed, and the type (table) and field name should be specified (case sensitive). | |
gigyaType | The field data type in Gigya (e.g., string). | |
custom | An array in which to specify the Data Store oid parameter. |
Example: The following file maps the ds.test.data field from Gigya DS to a field called custom2 in Magento:
[
{
"cmsName": "custom_pet_nickname",
"cmsType": "string",
"gigyaName": "ds.pets.nickname",
"gigyaType": "string",
"custom": {
"old": "gigya_pets"
}
},
{
"cmsName": "custom_pet_animaltype",
"cmsType": "string",
"gigyaName": "ds.pets.animalType",
"gigyaType": "string",
"custom": {
"old": "gigya_pets"
}
}
]
Once your file is saved, reference it in the Data Store module.
-
In Magento, navigate to Stores > Configuration > Gigya Identity Management > Data Store.
-
Specify the full path and file name of the DS field mapping JSON file.
-
Click Save Config.
In some cases, you may want to map fields between Gigya and Magento that have different types, or that have different logic. For example, a field that is an integer in Magento, while the corresponding Gigya field is a string. In these cases, the module provides you with a hook for data transformation.
Hook: gigya_client_gigya_ds_data_alter
Fired on Magento to Gigya synchronization
Parameters:
-
"gigya_user" : the Gigya user object
-
"customer" : an empty Magento Customer model
In Magento, navigate to Stores > Configuration > Gigya Identity Management > Data Store to define the data extraction method, whether Get or Search.
-
When passing a single OID, use get.
-
When using multiple OIDs, use search.
On the server, run the following command:
bin/magento module:enable Gigya_GigyaDS
- Overview Magento 2 Gconnector For Gigya Integration
- Version And Compatibility
- Installation Gigya Extension Installation Guide
- Installing The Gigya Extension For The First Time
- Step 1 Get The Extension
- Step 2 Create A Gigya Application Key And Application Secret
- Step 3 Encrypt Your Application Secret
- Generate A Key
- Encrypt The Secret
- Disabling The Gigya Extension
- Configuration
- Basic Configuration
- Roles And Permissions Best Practice
- Raas Screen Sets
- Configure Display Of Configured Screen Sets
- Configure Screens Using Code
- Gigya Registration And Login
- Gigya Update Profile
- How To Add Raas Screen Sets To Other Pagesthemes
- How To Customize The Screen Set Options
- Using Gigya Screens For Guest Checkout
- Field Mapping
- Default Mapping
- Create A Custom Mapping
- Reference The Json File
- Offline Sync
- Use Hook To Transform Data
- Session Management
- Session Synchronization Between The Platforms
- Session Expiration
- Uid Based Sync
- Multi Site Support
- Disable The Gconnector For A Site In A Group
- Logs
- Single Sign On Sso
- User Deletion
- Troubleshooting
- General
- Magento Related Troubleshooting