Date post: | 05-Apr-2017 |
Category: |
Technology |
Upload: | david-brown |
View: | 89 times |
Download: | 3 times |
COPYRIGHT 2017
TODAY’S DISCUSSION
1. Welcome!2. A Journey with Coveo for Sitecore3. Overview of Data Exchange Framework
COPYRIGHT 2017
About DeepthiTechnical Lead, Verndale
Deepthi is a Technical lead at Verndale, leading cross functional teams and helping the team solve tough technical problems. She specializes on SitecoreDevelopment, managing and developing ASP.NET web applications, and leading teams both in and out of the US. She takes immense pride in delivering high quality solutions at any given opportunity. She is a rebel, with a Masters in Computer Science from University of Nevada, Las Vegas.
Introductions
COPYRIGHT 2017
A Word on Coveo for Sitecore
Coveo for Sitecore
• Coveo for Sitecore is an integration to Coveo’s full fledged search engine
• It is accessible directly in Sitecore’s control panel
• It enables control over what gets indexed and how
• Allows for building Coveo based search views out of the box
• Interested to learn more? Visit their website or watch this short video
• Version used - Coveo for Sitecore Pro (on-premise version)
COPYRIGHT 2017
CHALLENGES + GOALS§ Data is very hierarchical in nature for this project § Fields of interest for Coveo filtering were mostly multi valued§ Spanning controls over multiple number fields was an inherent requirement
in our case(not very common per Coveo)§ Debugging efficiently – It is the key to be confident when molding any
product, specifically third party to your needs. We will see some key tools that come in handy.
COPYRIGHT 2017
Battle the Hierarchical Data
Coveo for Sitecore
§ Definitely don’t want content author entering these fields multiple times to avoid excessive duplication in parent/child relationships
§ Don’t want to load these relationships on client side as well (which would be expensive)
§ Answer: Computed Fields
COPYRIGHT 2017
What are Computed Fields?
Coveo for Sitecore
§ A computed field is processed for every Sitecore item that gets re-indexed.
§ A computed field is normally used to add complementary information to indexed Sitecore items.
§ A computed field must be implemented using custom C# code. Since it is executed in the context of Sitecore, you can take advantage of using the Sitecore API.
§ The more complex a computed field logic is, the slower to process it will be.
COPYRIGHT 2017
Problem Solving
Coveo for Sitecore
Based on our tree structure for content, a move-in ready home (27660..) is a child of Neighborhood in the below example. Per the design, we need latitude/longitude and title from the Neighborhood specific item for move-in ready for display on results.
COPYRIGHT 2017
How to Add a Computed Field
Coveo for Sitecore
§ You have to implement Sitecore.ContentSearch.ComputedFields.IComputedIndexFieldinterface
§ Add this computed field to your Coveo custom config
§ Use this new computed field on your MVC view
COPYRIGHT 2017
When single is of no awe!!
Coveo for Sitecore
§ The filters chosen to be of importance are not single valued in many instances§ A quick example : Number of Bedrooms – A Coveo facet can only span one field on one
template to compute the range and values available for filtering. § In our case we have two things that are different, we have two fields on Neighborhood
template for bedrooms (Minimum/Maximum) and a move-in ready home will have it’s own unique field for this bedrooms which should be considered on filter
§ Solution – combination of computed field and multi-value
COPYRIGHT 2017
How to add a Computed Multi Value Field
Coveo for Sitecore
§ You have to implement Sitecore.ContentSearch.ComputedFields.IComputedIndexFieldinterface
§ Add this computed field to your Coveo custom config (Coveo.SearchProvider.Custom.Config)
§ Make this computed field Multi-Value
§ In control properties, check box the ‘Is Multi-Value Field” in Advanced Settings
COPYRIGHT 2017
Use Computed Multi Value Field Facet
Coveo for Sitecore
§ Add a Facet in /Sitecore/Buckets/Facets
§ This is how the facet looks like on UI
COPYRIGHT 2017
Computed and Multi Value Fields are not enough
Coveo for Sitecore
§ We have seen how computed fields and multi-value fields could serve lot of complex use-cases
§ A typical facet slider would work on only one field either traditional sitecore or computed field which is of type number/integer
§ Our requirement is unique per Coveo team where we need a slider that spans across two fields on the same template (multi-valued number field)
§ Solution – Think outside of what Coveo provides OOTB
COPYRIGHT 2017
There’s got to be a solution
Coveo for Sitecore
§ Facet Slider auto generates minimum and maximum, but, we can choose to turn this off.§ We have custom logic that computes minimum and maximum and assigns it to the facet
slider component on the coveo search view on afterComponentsInitialization event§ Next, we need to instruct Coveo Facet Slider to cater to more than one field when the values
are changed § To do this, first we add a Facet Slider based on one of the fields of our interest on the
template– say Maximum Neighborhood Price and then use disjunction expressions to tackle the remaining field of interest.
§ What are disjunction expressions…
COPYRIGHT 2017
Disjunction Expressions
Coveo for Sitecore
§ When you want some additional filtering to top off the query that Coveo computes and calls it Advanced Expression
§ When it is used, the final query computation would become (basic advanced constant) OR (disjunction)
§ In action -
COPYRIGHT 2017
CES Adminstration Tool
Coveo for Sitecore
Browse through your indexes, you can even rebuild, do a full refresh, see activity log
COPYRIGHT 2017
CES Adminstration Tool
Coveo for Sitecore
Index browser is very handy to see what is the actual data indexed on an item
COPYRIGHT 2017
CES Administration Tool
Coveo for Sitecore
Cross check your query directly on the index browser
COPYRIGHT 2017
CES Console
Coveo for Sitecore
See what Coveo is doing behind the scenes when a query is fired through a search component
COPYRIGHT 2017
Chrome Developer Tools
Coveo for Sitecore
See the calls, look at results. This will give insight on to why you are having issues, if any
COPYRIGHT 2017
Chrome Developer Tools
Coveo for Sitecore
Also see the form data. Parameters passed on the request
COPYRIGHT 2017
Sitecore Control Panel
Coveo for Sitecore
Rebuild your indexes or check/update coveo search account configuration
COPYRIGHT 2017
Sitecore Control Panel
Coveo for Sitecore
Diagnostic Page – Check to ensure all coveo components are up and running. Green is always good sign
COPYRIGHT 2017
About SandyTechnical Lead, Verndale
Sandy Foley is also a Technical Lead at Verndale. She has a couple of decades of coding experience and is a first-time Sitecore Technologist MVP this year.
She took a break from coding a few years back and dabbled in teaching as a high school and university computer science instructor.
slack and twitter -> @sandyfoley
Introductions
COPYRIGHT 2017
OVERVIEW OF DATA EXCHANGE FRAMEWORK
OurHackathonJourneyintegratingMicrosoftCognitiveServices’ComputerVision
COPYRIGHT 2017
Hackathon 2017
Hackathon ideas
• Azure PaaS Module• Sitecore Experience Accelerator• Habitat• Data Exchange Framework
Image source: http://www.sitecorehackathon.org/
COPYRIGHT 2017
Data Exchange Framework
Sync data between two systems and provide integration reusability
• Sitecore -> 3rd party• 3rd party -> Sitecore• 3rd party -> 3rd party
An ETL• Extract - reading data from a source system• Transform - converting that data into a format that is compatible with a target system• Load - writing the data to the target system
COPYRIGHT 2017
Data Exchange Framework Example ScenariosExample Source TargetPullcontacts fromaCRMandcreateneworupdateexistingcontactsinxDB
CRM Sitecore
UpdateacontactinaCRMwithinformationabout thatcontactinSitecore
Sitecore CRM
A DEF Provider is set up to:•Establish connection with the 3rd party system• Identify available fields for mapping•Perform the API call to import or extract data from the system
COPYRIGHT 2017
Available Provider downloads …
Providers:• Sitecore Provider
• xDB record• Template
• Dynamics CRM Provider• File System Provider
COPYRIGHT 2017
Per Integration Coding Insert/update Salesforce with xDB data
QueryforSitecoreitems
MapSitecorefieldstoSalesforcefields
Establishconnection
withSalesforce
DetermineifrecordexistsinSalesforce
Insert/updateSalesforcerecord
Add/remove field to field mappings within code
Sitecore Salesforce
COPYRIGHT 2017
Data Exchange Framework Insert/update Salesforce with xDB data
Sitecore Salesforce
AccesstheSitecoreProvider
Endpoint
ReaditemsintothePipelineContext
PipelineSteps
MaptoSitecorefieldsonatemplate
ValueAccessors
&Mappings
AccesstheSalesforceProvider
Endpoint
Iteratethroughlist
andinsert/update
iteminSalesforce
PipelineSteps
Properties:Consumer Secret KeyConsumer PasswordSecurity TokenUrl- test.salesforce.com- login.salesforce.com
Add/remove field to field mappings in configuration (only)
Properties:• Item root• Template(s)• Max count
COPYRIGHT 2017
Wiring up a new DEF Tenant• Template that contains all fields for mapping• Data Exchange Tenant = single integration– Endpoints for source and target– Structure of the source data as Value Accessors– Structure of the target data as Value Accessors
» Value Readers / Value Writers – (getters/setters) – massaging data– Define the Value Mappings
• Select source and target value accessors• Configure the flow of logic with Pipelines and Pipeline steps• Run or schedule the batch
COPYRIGHT 2017
Resources
• http://integrationsdn.sitecore.net/DataExchangeFramework/v1.3/• https://github.com/Sitecore/Sitecore.DataExchange.Examples• http://www.sitecorehackathon.org/sitecore-hackathon-2017• https://www.microsoft.com/cognitive-services/• https://dev.sitecore.net/Downloads/Data_Exchange_Framework.aspx• https://www.youtube.com/watch?v=boaGaoRKAns
• Adam Conn and Nate Barad – YouTube (example of using a FileSystem Provider)
sitecore slack and twitter -> @sandyfoley
COPYRIGHT 2017
Different from xConnect?
• Will be available in Sitecore 8.3• Client API that allows you to get information from xDB into 3rd party systems • It doesn’t handle data mapping