Extended Profile - User Attribute Mapper
The Extended Profile – User Attribute Mapper extension maps configured paths in a JSON document stored in the Extended Profile back to a chosen User attribute. The extension is triggered on each write to the Extended Profile for a given user.
Configuring the Extended Profile – User Attribute Mapper Extension
To enable the Extended Profile – User Attribute Mapper Extension within Zephr, navigate to Settings > Extensions > Extended Profile – User Attribute Mapper Extension. This option is found in the Internal Extensions area. If you cannot see this option in your list of Extensions, email support@zephr.com.
Once on the configuration screen, you’ll see a section for Mapping Config.
Mapping Config
To being, please add the Profile App ID you have used to store user profiles.
This extension takes a single configuration field, which is a flat JSON object where the keys are Zephr user attributes and the values are the paths to the relevant values in the Extended Profile expressed with dot notation.
For example:
{ "first-name": "firstName", "last-name": "familyName", "profession": "user-details.employment.job-title", "company": "user-details.employment.employer", "mailing-list-consent": "content_prefs.email" }
A configuration as above would select the following properties from this example Extended Profile document:
{ "firstName": "Jane", "familyName": "Bloggs", "user-details": { "employment": { "job-title": "Data Architect", "employer": "ETL Solutions", "start-year": 2017 } }, "consent_prefs": { "email": true, "sms": false, "mail": false }, "interests": [ "hockey", "painting", "animals" ] }
The extension would then attempt to write those values to the first-name
, last-name
, profession
, company
and mailing-list-consent
fields respectively.
Data Types
The following data types are currently supported:
Extended Profile Data Type (JSON) | Zephr User Attribute Type |
---|---|
String | Text; Long Text; Email; URL |
Number | Number |
Boolean | Checkbox |
Behaviour & Notes
The Extension will take any targeted properties it is able to locate in the Extended Profile document and will attempt to write them to the corresponding user attribute.
NOTE: The extension will overwrite any existing value for a Zephr User Attribute from matched values in the Extended Profile, so please be careful with your configuration to ensure it only includes values for which you want this behaviour.
As the Zephr User Attribute schema is arbitrary and customer-configurable, you may wish to only have the extension control namespaced user attributes.
For example:
{ "ext-prof-first-name": "firstName", "ext-prof-last-name": "familyName", "ext-prof-profession": "user-details.employment.job-title", "ext-prof-company": "user-details.employment.employer", "ext-prof-mailing-list-consent": "content_prefs.email" }
The extension does not yet perform any type-coercion on the properties it matches and selects from the Extended Profile. As such, the data types in the Extended Profile must match the corresponding Zephr User Attribute as per the table above. For example, to map an Extended Profile property to a Checkbox user attribute, the property in the Extended Profile must be a JSON boolean.
NOTE: If any of the fields that are selected on a given invocation of the Extension do not match the appropriate data type of the target Zephr User Attribute, the entire update operation will fail i.e. no user attributes will be populated/updated.
Once you have completed your Mapping Config, click Done.
Activate Plugin
Once you’ve input the relevant details, you will need to confirm which of your Sites the extension should be active on. To do this, use the toggles for each site under the Activate Plugin section, or choose Select All Sites.
Once completed, click Save. Your plugin is now Enabled.