temp

 ============

Sitecore XConnect-Custom Facets Part-II

==========================
HOW TO STORE USER PROFILE in XDB USING CUSTOM FACTES via XCONNECT

For that We’ll create a console app (MA.CustomFacets.Import) to create contacts and update facets information.

  1. Create an instance of xConnect to save user profile information into xDBs.
    2. Make connection to xconnect api
3. Register models (both default and custom)

4. Create client configuration

5. Create contact and set facets

6. Submit Contact




1
2
client.AddContact(newContact);
await client.SubmitAsync();

How to verify custom facets values:

You can see your saved profile information in the database [<Sitecore_Instance_Name>_Xdb.Collection.Shard0], table ContactFacets


==========================================

Customize List Manager – Part I



Sitecore List Manager allows you to create lists of recipients that can be used for Sitecore Email Experience Manager campaigns, marketing automation campaigns or any other external system.

In the List Manager, when you import contacts from a CSV file, you can map fields from the imported file to the following default Sitecore fields:

  • Email address
  • First Name
  • Last Name

Customize List Manager – Part 2

  • Display a custom facet as a Sitecore mapping field
  • How to create a new import model field for the custom facet in the Content Editor.
  • To add a new facet as a mapping field:
    • In the Core database, in the Content Editor, navigate to the /sitecore/client/Applications/List Manager/Dialogs/ImportWizardDialog/PageSettings/TabControl Parameters/Map/ImportModel folder.
    • Create a new Import model field item based on the /sitecore/client/Applications/List Manager/Templates/ImportModelField template. 
      • To do this, in the ImportModel folder, duplicate one of the existing items and name this CustomerStatus – Status
      • FieldName -name of the Sitecore mapping field to display in the Import contacts wizard.
      • DataField - key that the Facet Mapper uses to recognize the xConnect facet property

      • Create a custom import mapper class
        class CustomerStatusFacetMapper: IFacetMapper
            {
        public MappingResult Map(string facetKey, Facet facet, ContactMappingInfo mappings, string[] data)
                { return (MappingResult)new FacetMapped;}}

Build this solution and deploy the DLL to Sitecore root bin folder.
 In the Sitecore.ListManagement.config file-register the mapper. 
In the Sitecore.ListManagement.config file, add the CustomerStatus facet name to extend the list of facets to map to
<settings>
      <setting name="ListManagement.Import.FacetsToMap" value="Emails|Personal|Addresses|CustomerStatus" />
    </settings>




Comments