How to Prevent DEF from creating Duplicate items in Sitecore

I ran into an issue with Sitecore’s Data Exchange Framework v1.4.1 where my pipeline batches would intermittently create thousands of duplicate Sitecore items. This caused a bit of management overhead having to clean out the duplicates.  Following some investigation, I decided to add some defensive coding by introducing a Custom Resolve Sitecore Item Processor to replace Sitecore’s OOTB pipeline step and prevent duplicates from being created.

removeduplicates.jpg Continue reading

Common Sitecore DEF Mistakes

So in this short post, I’ll cover a few common mistakes that you might make when starting out configuring your DEF project, I know I certainly did and a fellow colleague hit the same issues on a recent project he just started. Hopefully, it will prevent you from falling into the same trap and banging your head against the wall.

Error An Item with the same key has already been added.

Symptoms: You see the following error is logged when you run your pipeline batch and you have a Resolve Sitecore Item Pipeline Step. You will probably see something like this in your Sitecore logs:

[Date/Time] ERROR An item with the same key has already been added.

[Date/Time] ERROR Pipeline step processing will abort because a critical error occurred during processing.

Possible Cause: You see this occur during the Resolve Sitecore Item pipeline step processor. It usually means you have duplicate field name on the item you are trying to create in Sitecore. Check the template of the Sitecore item you are attempting to create including any inherited templates and resolve any duplicate fields names.

Item is created in Sitecore but the fields are not populated.

Symptoms: You have a pipeline batch with pipeline steps that read data from a source, iterates the items and create an item in Sitecore. The Item is created with the correct identifier, however, the fields on the Sitecore item are not populated.

Possible Cause: Most likely this is an issue with Data Location field has been set incorrectly on a pipeline step. Go through each step and check the location value.

Error: Pipeline step processing will abort because the pipeline context has no target assigned

Symptoms: You have a Resolve Sitecore Item Pipeline step followed by an Apply Mapping Pipeline step. Your new Item gets created however, all the fields are null. You see something similar to the following in the logs (Debug mode):

[Date/Time] DEBUG Value converted for search. (pipeline: Handle Single Row Pipeline, pipeline step: Resolve Sitecore Item Pipeline Step, field: UniqueId, original value: XXX-XXXX-XXXXX, converted value: XXX-XXXX-XXXXX)
[Date/Time] DEBUG Starting search for item. (pipeline: Handle Single Row Pipeline, pipeline step: Resolve Sitecore Item Pipeline Step, field: UniqueId, value: XXX-XXXX-XXXXX)
[Date/Time] DEBUG Item was not resolved. Will create it. (pipeline: Handle Single Row Pipeline, pipeline step: Resolve Sitecore Item Pipeline Step, identifier: XXX-XXXX-XXXXX)
2/27/2019 9:52:34 PM DEBUG New item was created. (pipeline: Handle Single Row Pipeline, pipeline step: Resolve Sitecore Item Pipeline Step, identifier: XXX-XXXX-XXXXX)
[Date/Time] ERROR Pipeline step processing will abort because the pipeline context has no target assigned. (pipeline: Handle Single Row Pipeline, pipeline step: Apply Mapping Pipeline Step, plugin: Sitecore.DataExchange.Plugins.SynchronizationSettings, property: Target)
[Date/Time] DEBUG Pipeline processor finished processing pipeline steps. (pipeline: Handle Single Row Pipeline, completed pipeline steps: 3)

Possible Cause:  Check the Resolve Sitecore Item Pipeline Step and look the Object Resolution section ensure the Resolved Object Location is set: Pipeline Context Target and not Pipeline Context Source. If that is set correctly then you might want to check you the Converter and Processor Types correctly:

DefTypes

If you are using a custom Processor & Converter ensure you have set the SupportIds attribute on your Converter class so that it matches your custom template.

Hope this helps!

GDPR! Personally Identifiable Information (PII) in Sitecore xConnect.

With the General Data Protection Regulation (GDPR) about to go into effect on May 25th, you should be aware of what Personally Identifiable Information (PII) could be stored in Sitecore 9 xConnect.

These fields are easily identifiable if you have installed Sitecore Data Exchange Framework 2.0+ and the xConnect Provider (provides the ability to read and write data to the collection and reference data services of Sitecore xConnect).

Continue reading

Transforming Data with Sitecore DEF

When transferring data between systems while some data will map directly you inevitably will come across data objects that need be transformed from the source format into a format that is compatible with the target object. Sitecore Data Exchange framework provides a mechanism and flexibility to reuse to Transform source data objects into the required format for the target data object.

A Value Reader allows you to read a value from a Source object. While it can read the value as is, they can also be used to transform the value. With each version of DEF Sitecore has provided a number Value Readers OOTB.

With DEF version 1.4.1 you have access to the following values readers:

DEF141_DataReaders

Continue reading

Quick & Easy Sitecore 9 update 1 install!!

With Sitecore 9.0.1 having just been released I was pretty excited to have a look at some of the improvements covered in the release notes. Not too mention a newer version of Sitecore Data Exchange Framework 2.0.1 and the OOTB providers.

Having a Sitecore 9 instance already installed and all its prerequisites means installing Sitecore 9.0.1 quick and easy to get up and running.

  1. Downloaded Resource Packages for XP Single (XP0) Instance configuration and extracted it to a resource folder c:\Sitecore\901\resourcefiles
  2. Scanned the 9.0.1 Installation Guide for changes or additional prerequisites and the only thing that jumped out was the updated version of Sitecore Installation Framework 1.1. It contains new features and some bug fixes covered in the release notes. I updated it by running the following cmdlet in Powershell:
    Update-Module SitecoreInstallFramework
  3. Copied the Powershell Installation script from chapter 4 and compared it to the script provided for the initial release. They are almost identical except for the updated package parameters used to configure xConnect and Sitecore:
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp.zip"
    Package = "$PSScriptRoot\Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip"
  4. When defining the parameters at the top of the script I used the same values as Sitecore 9.0 script except for $prefix & $FilesRoot.
  5. Kicked off the script and watched it run along without any errors and it installed in 6 mins 46 secs.

runscriptcomplete

Don’t forget to run the applicable Post Installation Steps covered in Chapter 6.

Now, where did I put that DEF 2.0.1 package download!!

Hey DEF 2.0 where have my batch messages gone?

If you are familiar with Data Exchange Framework you will know that apart from being able to run a number of pipelines, a Pipeline Batch can also provide summary information about the last time the batch was run:

  • Date & time the batch was last started.
  • Data & time the batch last finished.
  • Log Messages that were captured during the last time the batch ran.
  • Log Levels to determine what is written to the message log.

Prior DEF 2.0 the log messages were written to the Sitecore log file (by default) and written to the Messages field. You could also control the maximum number of messages that were written and displayed in the messages field.

def141batchsummary

Continue reading

How to Migrate your Sitecore 8.x MongoDB Contacts to xConnect

With Sitecore 9.0 and the introduction xConnect you might be wondering what you are going to do with all that analytics data sitting in MongoDB, when you upgrade your Sitecore 8.x instance to Sitecore 9. Well, Sitecore have created a tool called the xDB migration tool. The tool uses the Sitecore Data Exchange Framework 2.0 and it provides the ability to read from MongoDB (source system) and write to the xConnect server (target system). If you are not familiar with the Data Exchange Framework I have covered it in an earlier post.

The xDB migration Tool provides a pre-configured mapping of data from the MongoDB database to the xConnect server in the form of a DEF Tenant. The Tool includes two data migration processes.

  1. MongoDB Contacts to xConnect Contacts – Reads contact data and related device and interaction data for each contact – from a MongoDB database and writes it to xConnect.
  2. MongoDB Reference Data to xDB – Reads geo IP and location data from a MongoDB database and writes it to xConnect.

Continue reading

Sitecore Data Exchange Framework the SQL Provider

I recently presented at Atlanta Sitecore Usergroup and gave a demo using Data Exchange Framework (DEF) 2.0 and the SQL Provider – to read customer records from a SQL table and create items in Sitecore. You can read more about the DEF 2.0 here.  In this follow-up post, I’ll walk through the DEF configuration required for the demo.

def_sqlcustomerdemo3

Continue reading

Leveraging Sitecore Data Exchange Framework to access your Data

Eric Stafford (aka Sitecore Superman) and myself had the opportunity to attend the Integration Bootcamp at Symposium.  The day was divided into 2 sections: xConnect in the morning with Todd Mitchell (xConnect Product Manager) and Niels Kuhnel (Sitecore Architect) in the afternoon Adam Conn (Director of Product Management) did a deep dive into the Data Exchange Framework. In this post will I take you through some of my takeaways on Data Exchange Framework which I shared recently with the Atlanta Sitecore User Group.

What do we call it?

First, we need to clarify one thing and that’s how Data Exchange Framework is abbreviated. There appears to be some confusion in the community and that’s because Sitecore has a fondness for the letter x.

Adam Conn was insistent that if we left the boot camp knowing one thing – it should be: “the Data Exchange Framework is DEF, not DXF!! And that referring to is as DXF is like Sitecore with a capital ‘C'”.

Enough said!!

What is it?

  • A Framework Designed for transferring Data into and out of Sitecore.
  • It’s an ETL – Extract, Transform and Load the 3 steps of data integration.
    • Extract – you’ve got a source system you are extracting data from.
    • Transform – we change the data to be compatible with the target system.
    • Load – we load the data it into the target system.

DEF_ETL

  • It standardizes how we do data integrations with Sitecore.
  • It promotes re-usability by providing patterns and components that help you with your integration leaving you to focus on the other tasks associated with data integration.
  • It is highly configurable and extendable allowing you to integrate with almost any 3rd party system.
  • It enables Synchronization of Systems and processes.
  • It reduces the amount of effort required to integrate 3rd party systems.

Continue reading