Difference between revisions of "ATC/Current/SDK/Traits mapper"

From Genesys Documentation
Jump to: navigation, search
(Published)
 
(Published)
Line 1: Line 1:
 
{{Article
 
{{Article
 
|Standalone=No
 
|Standalone=No
|DisplayName=Traits mapper
+
|DisplayName=Map traits to link customer records
 
|Platform=PureEngage, PureConnect, PureCloud
 
|Platform=PureEngage, PureConnect, PureCloud
 
|TocName=Traits mapper
 
|TocName=Traits mapper
 
|ComingSoon=No
 
|ComingSoon=No
|Context=The traits mapper links customer records together.
+
|Context=To see more complete customer profiles in Live Now, use the Traits Mapper to link all records for the same customer.
 
|Section={{Section
 
|Section={{Section
|sectionHeading=About traits
+
|sectionHeading=About traits mapping
 
|Type=Structured
 
|Type=Structured
 
|anchor=AboutTraits
 
|anchor=AboutTraits
 
|alignment=Vertical
 
|alignment=Vertical
 
|gif=No
 
|gif=No
|structuredtext=Traits are properties of a customer. For example, "email," and "gender."
+
|structuredtext=Traits are properties, such as "email" and "gender" for a customer. {{MINTYDOCSPRODUCT}} gathers customer traits every time a customer visits a website that you track with the {{MINTYDOCSPRODUCT}} tracking snippet. In some cases, you may have multiple customer records for the same person. For example, if a customer visits your website multiple times and uses a different browser each time. Because {{MINTYDOCSPRODUCT}} creates a separate record for each instance, the separate customer records may contain only a subset of all of the traits information that is actually available for the customer. You can link these separate customer records by mapping the traits information they contain. After you do this, you'll be able to see the complete customer information in Live Now.
{{MINTYDOCSPRODUCT}} gathers trait information every time a customer visits a website that you track with the {{MINTYDOCSPRODUCT}} tracking snippet.
 
  
If multiple records for the same customer exist, you can link them with the traits mapper.
+
{{NoteFormat|When customer records are linked, separate customer records are still preserved. They are not consolidated into a single customer record. Instead, all linked customer reords are updated with the current traits information.}}
  
 +
After customer records are linked, the traits mapper updates all of the records when new trait information becomes available. Existing or duplicate traits are overwritten with the most current trait information.
 +
|fullwidth=No
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Map traits globally
 +
|Type=Structured
 +
|anchor=GlobalTraitsMapper
 +
|alignment=Vertical
 +
|gif=No
 +
|structuredtext=To start mapping traits, define a global traits mapper when you deploy the Altocloud tracking snippet on your website. Specifically, when you call {{Link-SomewhereInThisVersion|manual=SDK|topic=Init}} to initialize the Journey JavaScript SDK, identify which attributes you want to treat as traits. See the following code example. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#TraitsTrackingMethods|display text = Methods that track events}} and {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#MappableTraits|display text = Mappable traits.}}
  
{{NoteFormat|Separate customer records are not consolidated into a single customer record. Instead, all customer reords are updated with traits information.}}
+
Whenever {{MINTYDOCSPRODUCT}} gathers values for these attributes, they are automatically mapped as traits.
  
 +
You can also {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#LocalTraitsMapper|display text=map traits based on specific events.}}
 +
===Example===
 +
<source lang=JavaScript>
 +
<script>
 +
  (function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){
 +
  (a[o].q=a[o].q||[]).push(arguments)},a[o].l=1*new Date();u=t.createElement(c),
 +
  d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;u.charset='utf-8';d.parentNode.insertBefore(u,d)
 +
  })(window, document, 'script', 'https://apps.mypurecloud.com/journey/sdk/js/web/v1/ac.js', 'ac');
 +
  ac('init', 'c232166f-0136-4557-8dce-c88339d17a4e', {
 +
    region: 'use1',
 +
    globalTraitsMapper: [
 +
      {
 +
        "fieldName": "emailAdddress",
 +
        "traitName": "email"
 +
      }, {
 +
        "fieldName": "sex",
 +
        "traitName": "gender"
 +
      }
 +
    ]
 +
  });
 +
  ac('pageview');
 +
</script>
 +
</source>
 +
|fullwidth=No
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Map traits for a specific event
 +
|Type=Structured
 +
|anchor=LocalTraitsMapper
 +
|alignment=Vertical
 +
|gif=No
 +
|structuredtext=In addition to {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#GlobalTraitsMapper|display text=mapping traits globally,}} you can map specific traits locally for specific events. For more information, see {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#TraitsTrackingMethods|display text = Methods that track events}} and {{Link-SomewhereInThisVersion|manual=SDK|topic=Traits_mapper#MappableTraits|display text = Mappable traits.}}
  
Traits information appears on Live Now.
+
The complete set of map traits for a customer is the union of globally mapped traits and locally mapped traits. For example, suppose you map the email address field via the global traits mapper, but on one page, you ask for the customer's facebook ID. In this case, both the email address and the facebook ID are mapped to the customer and both appear in the customer's Live Now profile.  
  
 
+
If the same data is captured in two places, the most recent trait mapped appears in Live Now.Previous values for mapped traits are not preserved.
The traits mapper updates customer records with new trait information. Existing or duplicate traits information is overwritten.
+
|fullwidth=No
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Examples of mapped traits
 +
|Type=Structured
 +
|alignment=Vertical
 +
|gif=No
 +
|structuredtext=The following examples show how attributes that are mapped traits. Specifically:
 +
* The attributes, "email" and "emailAdddress" are mapped to the trait "email."
 +
* The attributes, "gender" and "sex" are mapped to the trait "gender."
 +
[[File:TraitsMapperExamples.png]]
 +
|fullwidth=No
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Methods that track events
 +
|Type=Structured
 +
|anchor=TraitsTrackingMethods
 +
|alignment=Vertical
 +
|gif=No
 +
|structuredtext=Traits mapping can occur whenever there is a tracked event on your website. Specifically, events are tracked when you use the following methods:
 +
* {{Link-SomewhereInThisVersion|manual=SDK|topic=Init}}
 +
* {{Link-SomewhereInThisVersion|manual=SDK|topic=Identify}}
 +
* {{Link-SomewhereInThisVersion|manual=SDK|topic=Pageview}}
 +
* {{Link-SomewhereInThisVersion|manual=SDK|topic=Record}}
 +
* {{Link-SomewhereInThisVersion|manual=SDK|topic=Forms:track}}
 
|fullwidth=No
 
|fullwidth=No
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Traits that can link records
+
|sectionHeading=Mappable traits
 
|Type=Structured
 
|Type=Structured
 +
|anchor=MappableTraits
 
|alignment=Vertical
 
|alignment=Vertical
 
|gif=No
 
|gif=No
Line 36: Line 102:
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
{{!}}{{!}}'''Trait'''
+
{{!}} style="width:20%"{{!}}'''Trait'''
 
{{!}}{{!}}'''Example'''
 
{{!}}{{!}}'''Example'''
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}gender
 
{{!}}{{!}}gender
 
{{!}}{{!}}male
 
{{!}}{{!}}male
 
 
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}birthDate
 
{{!}}{{!}}birthDate
Line 56: Line 120:
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
{{!}}{{!}}'''Trait'''
+
{{!}} style="width:20%"{{!}}'''Trait'''
 
{{!}}{{!}}'''Example'''
 
{{!}}{{!}}'''Example'''
 
{{!}}-
 
{{!}}-
Line 71: Line 135:
 
{{!}}{{!}}5025
 
{{!}}{{!}}5025
 
{{!}}}
 
{{!}}}
 
 
  
  
Line 82: Line 144:
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
{{!}}{{!}}'''Trait'''
+
{{!}} style="width:20%"{{!}}'''Trait'''
 
{{!}}{{!}}'''Example'''
 
{{!}}{{!}}'''Example'''
 
{{!}}-
 
{{!}}-
Line 109: Line 171:
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
{{!}}{{!}}'''Trait'''
+
{{!}} style="width:20%"{{!}}'''Trait'''
 
{{!}}{{!}}'''Example'''
 
{{!}}{{!}}'''Example'''
 
{{!}}-
 
{{!}}-
Line 119: Line 181:
 
{{!}}-
 
{{!}}-
 
{{!}}{{!}}workPhone
 
{{!}}{{!}}workPhone
{{!}}{{!}}
+
{{!}}{{!}} 
 +
{{!}}}
 +
 
 +
 
 +
 
 +
 
  
{{!}}}
 
Question: Country code? Area code?
 
 
===Name traits===
 
===Name traits===
  
 
{{{!}} class="wikitable"
 
{{{!}} class="wikitable"
 
{{!}}-
 
{{!}}-
{{!}}{{!}}'''Trait'''
+
{{!}} style="width:20%"{{!}}'''Trait'''
 
{{!}}{{!}}'''Example'''
 
{{!}}{{!}}'''Example'''
 
{{!}}-
 
{{!}}-
Line 148: Line 213:
 
{{!}}{{!}}John
 
{{!}}{{!}}John
 
{{!}}}
 
{{!}}}
|fullwidth=No
 
|Status=No
 
}}{{Section
 
|sectionHeading=How to use the traits mapper
 
|Type=Structured
 
|anchor=UseTraitsMapper
 
|alignment=Vertical
 
|gif=No
 
|structuredtext=To link customer records using the trait mapper functionality:
 
# Deploy the
 
# Call ac.identify and specify a traits object.
 
# Call ac.record and extract the traits from its attributes.
 
 
Daragh:
 
# Where do they call ac.identify from? Is this part of the tracking snippet? If so, can you provide an example of a complete tracking snippet that calls ac.identify?
 
 
# Where do they call ac.record from?
 
 
# Where do the results go? Is this linkage a permanent change? If so, where are the results stored?
 
 
|fullwidth=No
 
|fullwidth=No
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Revision as of 12:13, June 28, 2019

This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.

To see more complete customer profiles in Live Now, use the Traits Mapper to link all records for the same customer.

About traits mapping

Traits are properties, such as "email" and "gender" for a customer. Genesys Predictive Engagement gathers customer traits every time a customer visits a website that you track with the Genesys Predictive Engagement tracking snippet. In some cases, you may have multiple customer records for the same person. For example, if a customer visits your website multiple times and uses a different browser each time. Because Genesys Predictive Engagement creates a separate record for each instance, the separate customer records may contain only a subset of all of the traits information that is actually available for the customer. You can link these separate customer records by mapping the traits information they contain. After you do this, you'll be able to see the complete customer information in Live Now.

Important
When customer records are linked, separate customer records are still preserved. They are not consolidated into a single customer record. Instead, all linked customer reords are updated with the current traits information.

After customer records are linked, the traits mapper updates all of the records when new trait information becomes available. Existing or duplicate traits are overwritten with the most current trait information.

Map traits globally

To start mapping traits, define a global traits mapper when you deploy the Altocloud tracking snippet on your website. Specifically, when you call init to initialize the Journey JavaScript SDK, identify which attributes you want to treat as traits. See the following code example. For more information, see Methods that track events and Mappable traits.

Whenever Genesys Predictive Engagement gathers values for these attributes, they are automatically mapped as traits.

You can also map traits based on specific events.

Example

<script>
  (function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){
  (a[o].q=a[o].q||[]).push(arguments)},a[o].l=1*new Date();u=t.createElement(c),
  d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;u.charset='utf-8';d.parentNode.insertBefore(u,d)
  })(window, document, 'script', 'https://apps.mypurecloud.com/journey/sdk/js/web/v1/ac.js', 'ac');
  ac('init', 'c232166f-0136-4557-8dce-c88339d17a4e', {
    region: 'use1',
    globalTraitsMapper: [
      {
        "fieldName": "emailAdddress",
        "traitName": "email"
      }, {
        "fieldName": "sex",
        "traitName": "gender"
      }
    ]
  });
  ac('pageview');
</script>

Map traits for a specific event

In addition to mapping traits globally, you can map specific traits locally for specific events. For more information, see Methods that track events and Mappable traits.

The complete set of map traits for a customer is the union of globally mapped traits and locally mapped traits. For example, suppose you map the email address field via the global traits mapper, but on one page, you ask for the customer's facebook ID. In this case, both the email address and the facebook ID are mapped to the customer and both appear in the customer's Live Now profile.

If the same data is captured in two places, the most recent trait mapped appears in Live Now.Previous values for mapped traits are not preserved.

Examples of mapped traits

The following examples show how attributes that are mapped traits. Specifically:

  • The attributes, "email" and "emailAdddress" are mapped to the trait "email."
  • The attributes, "gender" and "sex" are mapped to the trait "gender."

TraitsMapperExamples.png

Methods that track events

Traits mapping can occur whenever there is a tracked event on your website. Specifically, events are tracked when you use the following methods:

Mappable traits

Demographic traits

Trait Example
gender male
birthDate 01012001



Company traits

Trait Example
companyName Genesys
dunsNumber 622286318
industry Technology
numberofEmployees 5025



ID traits

Trait Example
email JTS1715@gmail.com
facebookId JTSmith1715
messengerId John.Smith .1715
twitterId @JTS1715
telegramId 123456789



Phone traits

Trait Example
homePhone 3179871234
mobilePhone  
workPhone  



Name traits

Trait Example
salutation Question: Is this title?
jobTitle Manager
givenName John
middleName Thomas
familyName Smith
displayName John
Retrieved from "https://all.docs.genesys.com/ATC/Current/SDK/Traits_mapper (2024-10-06 20:52:26)"
Comments or questions about this documentation? Contact us for support!