Deliver Personalized Experiences

If you have not read my first two blogs on this series of combining two awesome platforms to deliver a personalized experiences, you should start there. Below are the links to the same. This post is the third step of the series that talks about how we can use Personalize to tie everything together.

How it all started!
CDP to capture events

Now, lets roll!

This is step is all about key functionality of Sitecore Personalize such as web experiments, variants, decisioning and data connections. Lets start getting in to each step here:

  • Create a web experiment – This is not mandatory, one can also choose experiences, but, we wanted to prove some theories on analytics front, so, we used this. You can read more on how to do this straight in Sitecore documentation.
  • Add POS filter based on what was sent to CDP. More info on sitecore documentation here as well.
  • Now, create a decisioning model that has a programmable to read what was sent on custom events from CDP. Have input as Guest and sessions both so we can read what we need on programmable. Also, connect to Data system, in our case it is chat gpt/open AI. I will talk about how to set that up in next post. Below is how the decisioning would look like. Learn how to set them up from Sitecore documentation.

Programmable is a javascript snippet here is used to construct prompt that will then be passed to Data system (Chat GPT) as completion call input. It extracts below information

  • Custom Event extension data that is added when end user clicks on Landing page link on their email
  • Current Session data extension that carries geo information on user such as city and country.

Code on programmable looks like below. No, it is not production quality code as I did this for hackathon. 🙂 Please make sure yours is though. LOL

function getLastButtonClickEventText() {
    var lastButtonClickedText  = '';
    
    for (var i = 0; i < guest.sessions.length; i++) {
        var currentSession = guest.sessions[i];
        
        if (currentSession.sessionType === 'WEB') {
            var events = currentSession.events;
             var geoCity = currentSession.dataExtensions[0].values.geoLocationCity;
             var geoCountry =  currentSession.dataExtensions[0].values.geoLocationCountry;
             
            for (var j = 0; j < events.length; j++) {
                var currentEvent = events[j];

                if (currentEvent.type === 'vodkabyte:CLICKED_HERO_CTA' && currentEvent.arbitraryData && currentEvent.arbitraryData.ext.PersonalizationPrompt) {
                    lastButtonClickedText = currentEvent.arbitraryData.ext.PersonalizationPrompt+" "+ geoCity +"," + geoCountry ;
                    break;
                }
            }
        }

        if (lastButtonClickedText) {
            break;
        }
    }

    return lastButtonClickedText;
}

(function () {
  // Add statements here
  
 var lastButtonClickEvent = getLastButtonClickEventText();

    return lastButtonClickEvent;
  
})();

Custom event information is available inside the events on the session and looks like below

Next step is to feed this programmable data in to data system. But, first, we have to learn how to set that up. I will talk about that in my next post. Hang tight!

Custom Events to CDP

This is part 2 of my series I promised on how to connect Sitecore with chat GPT. If you did not read my first post, please check it out here

Now, to make this happen first we need our events based on user interactions. This is the key to proceed with our next steps to achieve one to one personalization to the end user using chat gpt.

It required below steps in order. I tried to jot down everything I remember.

  • Create a POS (point of sale)
  • Integrate and start capturing events using Engage SDK script. This was very simple and super detailed on Sitecore documentation, so, check here
  • Verify basic page view events are now shown on CDP in guests section. This should be good if you did good with steps noted above.
  • Ensure custom events when sent should also be visible on user. In our case, we sent a special event that signifies the user clicked on a link from Email for instance. This event is basically our glue and also contains personalization prompt, brand names and anything else that is needed to tailor the experience. Below is a snippet of code that goes any where you would like it to send the event and load up extension data.
const handleClick = async () => {
      const eventData = { channel: "WEB", currency: "USD", pointOfSale: "brandname", language: "EN", page: "landing page"}; 
      const extensionData = {
        CTAText:"xyz",
        PersonalizationPrompt: "This would be used some where in personalization as prompt for Chat GPT"
      };
      await engage.event("brand:CLICKED_HERO_CTA", eventData, extensionData);
    }

Now that we have all the events and information on the events we need, next step is to either use web experiments or experiences in Sitecore Personalize. I will explain that on my next blog. We will also see where exactly chat gpt comes in to play in the flow.

Innovating with Chat GPT and Sitecore: A Modern Remix

I’ve had this on my mind since September, but it’s been a hectic period, and I couldn’t find the time to kickstart this series. If I hadn’t delved into connecting Chat GPT and Sitecore, I’d be experiencing major FOMO. Indeed, if you’re in the tech world and haven’t dabbled in the innovation of the decade, you’re missing out.

Verndale, the company I work for, organized an internal AI hackathon program that motivated me to sign up and work on something related to Sitecore.

So, the first step was brainstorming, as always. I had a team for this, but I had a soft spot for my favorite combo, Sitecore + Chat GPT. I started gathering ideas from existing resources. I came across some cool videos demonstrating the integration of Chat GPT with Content Hub, but it didn’t quite align with our project’s objectives. Our project was all about creating landing pages, and my part was to enhance these pages that were already rapidly generated. Then, a lightbulb moment occurred – how could I incorporate CDP/Personalization into these landing pages to attempt one-to-one personalization scenarios using Chat GPT? Bingo!

I believed the idea made a lot of sense and added value, so I delved deeper into the whole workflow. Here are my thoughts, a brain dump, if you will:

Imagine I know this user – perhaps they clicked on an email link. Remember, this is a hackathon, not a real project, so imagination is the key.

Now, I know this user, and since it’s CDP, I potentially know their location out of the box. Can I do something with that?

So, based on this context and location, can I create a one-to-one personalization variant using Chat GPT? I directly experimented with some examples on the completion endpoint using Postman, and the answer was a resounding YES. Chat GPT was able to provide the nearest dealerships based on the user’s brand affiliation. Bingo!

It’s as simple as that but scalable across various scenarios.

In my next post, I’ll discuss how I implemented all of this.

First Steps – Salesforce and Sitecore Integration

First Steps

By nature, I am extra cautious when I take my first steps on any project. This comes from experience, when a task is in front of you, many of us get tempted to jump and start working things out. I have a different take on this and even if I do burn couple of hours in the beginning, I would not change this style for no one or nothing! When you take your first steps right, when walls or falls happen, you are confident that you can get through them because you know that you are on right path.

So, on one of our projects, we decided that a tight integration with Salesforce would be a huge add on for this growing team. Now, the decision is clear that integration is needed, now, few key first decisions that should be made to ensure we will follow the right track to achieve our key goals.

Key Goal: We have a bunch of forms on the website that collect variety of information from end user based on purpose of the form. The stakeholders wanted to ship this collected information to Salesforce.

That’s a very abstract gist, I know. Not always would you have a dedicated Business Analyst that would document every single detail. Sometimes, you have to work with just a skeleton. Now, lets jot down the first set of questions:

  1. What Connector should we use to ensure we have the tight integration between Sitecore and Salesforce?
  2. What version of Connector should we be using?
  3. What does this Connector do on a very abstract level and would it help us reach the key goal noted above?

Now, lets answer each one of those first before we jump deep and go crazy. Which we will trust me. I did run across quite a few walls and was able to successfully break or crack enough to get by, I will share that side of journey with you all as well.

But, first things first, answer to above key questions. So, for the first one, my boss, Liz Spranzani has a great collection of blogs which highlights Connectors that are available and which ones to use in which scenarios. Salesforce offers a whole stack of products and so does Sitecore, so, it is important to get your thoughts straightened out, so, you make wise and correct decisions.

Here are the blogs for your reference. I made my choice to be to use Sitecore Connect for Salesforce CRM because that fits all my boxes based on subscriptions the client has in regards to Salesforce. Now, your answer could be different, I am hoping its the same, so, my journey will help you. 🙂

Now, for the second one, folks who know Sitecore know that this question is very important to be answered because of just the way Sitecore product life cycle has been. To confirm this, I checked the compatibility KB article, but, unfortunately, it is not always up-to-date. So, I actually loaded a support ticket to understand what version of connector should I be using given my Sitecore version, got confirmation that I should be using: Sitecore Connect for Salesforce CRM 2.1.0 . Bottom line is latest and not always the right approach especially when you are dealing with multiple systems.

So, on a very abstract level the connector gives you ability to push various objects from Sitecore to Salesforce and vice versa. Most important one of course that most of us will be interested in would be Contacts. But, along side of Contacts, it can also ship Tasks, Events and Campaigns.

You nailed your first steps, Now, what to do next? Installation! Sitecore does have good documentation on Connector Installation and setup, but, like always there is few gaps and some helpful tips to get you over few humps. I will cover those in my next blog.

Do not underestimate the power of making right choices, take your own time and do not let anyone make them for you if you are the one who is going to own the implementation.

Symposium Summed Up

Just in time for Thanksgiving, I finally got my thoughts all wired about Sitecore symposium this year. It is super hard to sum up the whole experience in one word, but, if I must I have to say it was ‘Marvelous’.

I must say Sitecore and their team really works hard to come up with a theme that connects and has an impact on all of us. While I walked away from Symposium, It was just not the learning, social and happiness for me this time. It was something beyond, it was the Connection I could feel literally. I was very much inspired by the ‘Human Connections in a Digital World’ theme this year. There are always some sessions that align with the theme that are very engaging. This year was no different, some key notes that were the key for goose bump moments on my end were the below

  1. Talk by Platon on Powerful Portraits was so mesmerizing, for a second I forgot that I am in Sitecore symposium. It was not one bit related to Sitecore, but, was much needed to look beyond, answer some questions you would not dare to and understand these personalities we all know from different perspective.
  2. Talk by Dr. Rana el Kaliouby on Emotional Analytics. This was by far my favorite session in terms of keynotes and main stage ones. It is just such an eye opener, it shows that we need to continue to think how to better our amazing systems and technologies we use in our daily lives to add a bit of something that will make the systems think for us and like us. It is simple in terms of logic and almost felt like Yes, we know it and we agree it. But, we are not there yet, kind of surprising. Take away from this is – Emotional AI is not a future thing, we need to act now and remember what makes us US. Would definitely hope Mr. Elon Musk will integrate this Emotion capture in Tesla. 🙂
  3. How can I not mention my two favorite people that I long to see on stage. Jake Johanssen and Sitecore CMO Paige O’Neill. When ever Jake dawns the stage you can hear every one just being happy, he makes us all laugh so much, love him for that and also guess what I could take a picture with him as I bumped in to him. Check us out here ! All smiles. 🙂 Paige is a true inspiration for me, I had an opportunity to meet and greet with her last year at my Symposium talk about Empowering Women. She is an awesome person with amazing stage presence.

Now, coming to break out sessions, I would be unfair to myself if I don’t start with mine lol. So, I will start there. Wow!!! I cant put in words how grateful I actually am to be up on that sparkling stage in-front of so many wise, enthusiastic people. Really feel humbled and proud at the same time to be able to deliver what we planned. You can check more details about my session here. Truly rewarding experience overall!

Below are some of the other sessions I could make it to between practice drills of my own session and other important keynotes. I must say I enjoyed all of them and learned a thing or two. You can now download the session materials for all of the below including mine from connect

  1. Not Impossible: Accessibility for all : This session is a continuation to the keynote by Mick Ebeling , CEO of Not Impossible Labs. His session last year on main stage moved me to tears. This time I was well prepared. 🙂 The co-presenter of this session are Liz Spranzani , SVP, Development , Verndale and Ross Lucivero, Managing Director, LA, Verndale. My two favorite people from my own company. It was very informative session and almost made us all question why do we even produce sites that are not Accessible. If we consider every one of us as equal beings, we should strive to show equality and accommodation on the sites we build as well.
  2. Marketers’ guide to getting started with Sitecore Cortex personalization suggestions : This session was like the most crowded session I attended this time around. People were literally standing and still paying attention. Kudos to Una Verhoeven, Managing Partner, AmpleEdge to get the audience so thrilled and excited about Cortex personalization. Key takeaways from my end were Cortex can be leveraged to provide personalization suggestions and it is important to avoid personal bias. Like anything else, honing is important to ensure personalization acts as expected.
  3. Sitecore AI (MVP Session): I can not give away a whole deal of information since this was MVP only session, but, it was very exciting session that almost got me dreaming in a good way. My next thing for sure.
  4. ‘O Solr mio! : Jeremy Davis totally nailed this one. I was literally looking forward to this one, kind of bummer it was on last day because with Sitecore going SOLR as default option starting 9.0+ it is immensely important we know our options and we know setup for production can be done in a simple and correct way , so we are rest assured on Website Search. 🙂 Love it!!! Very information and as always scripts were released right after the show.

All in all, this symposium was important affair for my personal growth, I walked away stronger, happier and fully satisfied. Best of all, I got to take Sitecore Pillow and Hedgie back home. My daughter owns both right now, but, yeah, glad I could get it back home. I have never been to Chicago, so, really hoping to see how Sitecore rocks it next year.

Netflix Next With Sitecore Cortex

Cover for Session

This year’s Sitecore symposium was a nostalgic experience filled with a lot of emotions on my end. I am really honored to have been up on the famous Sitecore stage and for the opportunity to be able to share our story with my peers and beyond. I can’t thank Sitecore team enough who believed in our idea and thought it was worth a share. This story would have not been this beautiful minus my partner in crime @RichardLeivaA, so, official thank you to you for being who you are and sticking through the tricky bits and buts of our path.

For those who could not make it to our session. We want you to hear our story as well. Below are the slides for your reference. Leave a comment or Slack me if you need any additional information and resources.

Github Url of Demo: https://github.com/richardl1/netflixnextsymp2019

RTF Configurations OOTB Sitecore

rtf

Okay there comes a time when your business analyst is going to ask you what does Sitecore provide by default in terms of rich  text options.  And there are actually couple of blogs out there that are informative about this.   Check my favorite one here  https://markstiles.net/blog/2011/3/15/rich-text-editor-profiles/

But, it is only screenshots up there and though we are all intimate with those word icons, it is hard to actually know what they do unless we open up the editor and hover on each icon to ensure our assumption is correct. 

So, I built the below table as a handy reference.  Hope this helps!  Below are the list of RTF configurations,  a quick screenshot for visualization and list of functionalities it exposes to your authors.

Based on the features available per configuration, business analyst and front end team would be able to interpret how many custom configurations we need vs which ones from OOTB that we can re-use for our design requirements on modules in question. 

Also, a rule of thumb is to limit custom configurations between 3 to 5 based on number of modules and complexity of Sitecore implementation.  More than that would be a overkill per me. 

Default RTF Configuration 

Screenshot depicting default RTF Configuration

Options Available

  • Bold
  • Italic
  • Sitecore Link
  • Sitecore Media
  • Remove Link
  • Hyperlink Manager
  • Insert Symbol
  • Paste from Word – Strip Font
  • Undo
  • Redo
  • Find and Replace

Medium RTF Configuration

Screenshot depicting the options for Medium RTF

Options Available

  • Print
  • Find and Replace
  • Cut
  • Copy 
  • Paste
  • Paste from Word
  • Paste from Word  – Strip Font
  • Paste Plain Text
  • Paste as HTML
  • Format Stripper
  • Undo
  • Redo 
  • Insert Sitecore Link
  • Insert Sitecore Media
  • Remove Link
  • Insert Table
  • Insert Symbol
  • Insert Code Snippet
  • Bold
  • Italic
  • Underline
  • Align left, right, center, justify
  • Remove Alignment
  • Numbered List
  • Bullet List
  • Indent
  • Outdent
  • Strike Through
  • Sub Script
  • Super Script
  • Horizontal Rule
  • Show/Hide Border
  • Module Manager
  • Ajax Spell Checker
  • Help
  • Apply CSS Classes dropdown

RTF IDE Configuration

screenshot depicting options for IDE RTF

Options Available

Everything that is available on medium RTF configuration listed above plus a couple more advanced features

  • Insert Form element
  • New paragraph
  • Insert Date
  • Insert Time
  • Foreground Color
  • Background Color
  • Set Absolute Postion
  • Select All
  • Font Weight
  • Font Style
  • Custom Links
  • Zoom

Full RTF Configuration

Screenshot depicting Full RTF Configuration

Options Available

Everything that are available with medium RTF configuration noted above along with couple more advanced options

  • Insert Form Element
  • New Paragraph
  • Insert Date
  • Insert Time
  • Insert Code Snippet
  • Media Manager
  • Flash Manager
  • Foreground Color
  • Background Color
  • Select ALL
  • Set Absolute Position
  • XHTML Validator
  • Font Weight
  • Font Style
  • Custom Links
  • Zoom

Architectural Excavation on Integrations

coal mining

Hello to every one from amazing London!  Sad to say that though London is awesome, I do miss LA as I consider that my home.   The main aspect I miss not having to bundle up even in December. 😉

I wanted to share some new things I am learning at this moment.  Every project and role that you play, you tend to look at things from  a different lens and perspective.  Leadership and Architecture go hand in hand for the most part, but, Architect is known to look at things from a very high level to make decisions that are very important for a successful implementation.  

One such aspect of project development that needs such kind of initial research, series of gathering sessions to excavate both business and technology requirements is so much fun as it unveils things that were never thought of while we are in life cycle of  website development.    To be honest,  I get nervous when I can not visualize full picture and I strive to calm myself down by erasing some of the clouds that block my vision by being organized and asking lot of questions in  general.   When I see the picture (though not perfect or clean) I am then more confident and relaxed.  I wanted to share with you all my first hand experience as I learn a  new game being in sweet, yet, challenging place. 🙂 

  1.  Document a list of every single third party integration that you would need.  This should include big, medium, small.  Usually, the big ones are actual integrations with API of some sort.  Medium ones could still involve some template and module building on Sitecore, but, usually some third party script.  SOLR or Search you would use would also come under either medium or big based on level of implementation.  Small ones are typically just JS script injections in to either head section or body section based on specific requirements of the third party. 
  2. I like to call this step Identification path.  On each of the big ones noted above think about data you would like to be shown on your website.  When you merely start doing this step you might encounter questions that you never thought before.  I LOVE THIS step.  I urge every one to definitely do this. 
  3. Now, we are only talking about data because in my case data was utmost importance than any acquired functionality for instance.  Now, if your use case is more on functionality, you could pursue in that direction.  In this step, based on identified areas we determine if we need to consume the data we need by directly calling the API or by adding these data elements as actual Sitecore items.  The decision typically revolves around latency, performance of API and Search-ability.   Noting all this aspects and vision along side of good collaboration with needed parties you can land on decisions that make sense for your project. 

Having these decisions made before implementation is very critical in understanding the complexity, clear breakdown of base tasks that are needed to pull your implementation together and most importantly for me is the ability to be in my calm state is priceless. lol

If any of you need more information on any of the steps I listed or decisions you need to make based on outcomes, reach out to me and I can help you.  It was fun exercise for me and hoping you all will have some fun around this as well when you play the role of Technical Archaeologist.  Could this be a new role you think?  

24 Hours

24 hours

This has been long due and would like to share my hackathon experience before the memory gets a tad bit weak.  First things first, I must say that I handled the competition with way more ease than first time around.  Who ever said it, yes, it is absolutely correct that “Experience does makes you perfect”

I tried to remind myself and my comrade multiple times that hackathon is only an implementation of scratch of the surface stating the future to explore further.  If you loose this thought, you will find yourself being extremely fatigued and will end up doing bunch of mistakes and miss prerequisites.

The goal is to shoot for stars, but, also, ensure you have a clear picture on what you would call a deliverable.  All in all it was fun and calm for the most part with brain juices flowing pretty well.

You can read about what we did and how we did it – up here.

https://github.com/Sitecore-Hackathon/2018-Witty-Geeks/tree/master/documentation

There is a little video we made as well as a proud participants, but, tired ones. 🙂

Here you go – https://recordings.join.me/H8TFZihidUGXBwppem5_pw

In my next post, I wanted to share my Sitecore 9.1 installation experience with SIF tools and all the pitfalls I bumped in to, luckily there was a blog for most of them.  Of course, I had one unique one which might help some, so, will post that soon.

Cya later!

PS:  If you do not know what hackathon I am talking about, see the details below.

http://www.sitecorehackathon.org/sitecore-hackathon-2018/

Did you know – Broken links report considers all versions

broken

As soon as I come across some thing new and is a small piece of info, but, could be useful, I can immediately think about my Did you know series.  This would be a latest addition to the pile.

Interesting piece of information that I bumped in to yesterday while running Broken Links report on a huge database  and sitecore instance that has many versions on CM side of things in many different languages.  When I run the broken link report, there were huge number of items listed on the report and I randomly picked bunch of those to check more deeply.  Most of them were outdated and old versions.

I immediately thought there should be a way to force Sitecore not to consider old versions when running broken links report.  Unfortunately, there is no way to do so currently.   When I dig deeper in code of kernel, I did see the default is to consider all versions.

Code versions

I got a feature request logged with sitecore if you like to track it, here is the reference number – 178492

If you really need this feature, then, the only other way is to build your own Speak View and scanner that could be custom function to grab only the latest version of each item in each language to keep the list to what you really care about. 🙂

 

Allowed Controls Issue Fortis Dynamic Placeholders

Fortis Nuget

I know many folks out there love and use Fortis Dynamic Placeholder either via Nuget or in package form.

The following link provides some information and background about what it does.

http://fortis.ws/fortis-collection/dynamic-placeholders/

While picking a dynamic placeholder support for my 8.2 Sitecore Instance I did a lot of research to see and weigh my options and picked this as this has been actively used by many of Sitecore enthusiasts.  The hope was it will be seamless and easy to use.  It was both of these on many levels and so far was working fine for our requirements.

On this specific implementation of Sitecore, we do use a lot of modules with placeholders for re-use and ease of dropping different type of content within the parent wrapper for instance.  It gives immense flexibility and power when done right.  I was skeptical that we would potentially run in to an issue or two, but, was also confident that this module is backed up by Habitat as well along with about 60k downloads on Nuget that any issue could have a potential solution.

Issue :  When you have a placeholder within a Dynamic Placeholder , this inner placeholder could be a sitecore one or dynamic one, incorrect allowed controls were showing up on Inner placeholder.   It was actually pulling allowed controls of parent(wrapper) instead of inner placeholder.

Steps to resolve:  I decided to approach the channel and folks I know who love/recommend Fortis, unfortunately none of them yet encountered this issue of mine.  So, I decided to debug further.  The issue is in the patch that the module does before Sitecore.Pipelines.GetPlaceholderRenderings.GetAllowedRenderings to get the allowed controls of placeholder based on regex match and add it to list of renderings.  For this patch, if you use dotpeek or reflector, you will notice the below lines of code :

Match match = new Regex(PlaceholderKeyRegex.DynamicKeyRegex).Match(placeholderKey1);
if (!match.Success || match.Groups.Count <= 0)
return;
string placeholderKey2 = match.Groups[1].Value;

What this does is get the match from the args placeholder key that Sitecore pushes in to see if this is a dynamic type of placeholder and if it is, it tries to look in to groups to find the value and correspondingly get the Allowed Controls on placeholder in question.  This is an issue because it is by default picking up the first match and not considering the most inner match possible.

I revamped this piece of code to use Regex match collection instead and pulled up the most inner one available and that seems to do the trick.  I will attach the fix below for your reference if you are curious.  I left rest of the code untouched to ensure I introduce no bugs. 🙂

Note:  Still under testing and not been shipped to live site, so, use this with caution.

Regex regexForPlaceholderKey = new Regex(PlaceholderKeyRegex.DynamicKeyRegex);
var allMatchesOnPlaceholder = regexForPlaceholderKey.Matches(placeholderKey1);
Match match;
if(allMatchesOnPlaceholder.Count > 0 )
{
//Always get the highest match, last match as that would be needed for allowed controls
//If there is just one matcg it should still get the first one
match = allMatchesOnPlaceholder[allMatchesOnPlaceholder.Count-1];
if (!match.Success || match.Groups.Count <= 0)
return;

After you change, ensure you patch your config to your updated code for this specific pipeline process code. Observe caution when you upgrade Fortis Nuget version for instance in the future before swapping the config file.
If I were you, I would test the below scenarios post change to ensure all is well.  Go to experience editor and click on Add Here on each of the corresponding cases in design mode.

1. A simple sitecore placeholder
2. Sitecore placeholder inside a parent placeholder
3. Simple Dynamic Placeholder
4. A Dynamic placeholder inside a Dynamic placeholder
5. Sitecore placeholder inside dynamic placeholer.
6. If possible/existing use case – Dynamic placeholder inside Sitecore placeholder

Hope this helps some one like  me. 🙂
Logged an issue on git hub page for this Nuget reference as well.

https://github.com/Fortis-Collection/dynamic-placeholders/issues/3

Did you know – Paas does not support Lucene

So psyched to share this quick piece of info, this is my first time working with a fully Sitecore Paas infrastructure, so, getting to know it more intimately.  I did know that Sitecore Paas comes with Azure Search and Redis cache for instance, but, what I did not know is that Lucene is not at all supported which means that all Lucene related config files were actually disabled on the upper environments that were set up with help from Sitecore.

Reality hit me hard when trying to set up a computed index field that worked beautifully fine on my local, but, completely broke on upper environments.

So, folks out there if you are using Paas pay attention to the index configuration and ensure all the steps listed below were actually completed thoroughly on your Paas  sitecore servers.

https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/configure_azure_search

Two quick follow up questions that would come to mind, how do I know which type of Search Indexes are used, this is the simple one, look at showconfig.aspx to see what is listed under Index configuration which defines type of Index.

Index Info

The second one which is more important when there is custom search/Index based functionality is, how to ensure locally too Developers are using Azure based Indexes and not Lucene based one’s?  Would love to hear from every one who has experience on this.  This would be an open question for now, hoping to resolve this based on feedback and would potentially reach out to Sitecore to understand what do people generally do for Development in this case.

Happy Sitecoring and hope you are all enjoying your holidays!

Sitecore Shared Content Issues

On the day one, when I started my blog, I made a promise that I will share good and not so good side of Sitecore.  So far, did not find anything that was very counter intuitive up until now.

One of the main purpose of CMS is to share a piece of repetitive content so you are not changing something in ten different places when there is a need for change, you change one single datasource item that is shared across multiple pages and all pages will reflect the change when the datasource is pushed live either via a workflow based approach or through some kind of publish.

But, the stinky part is that when this specific datasource is shared across multiple pages, all pages will be in some sense updated, but, are never thrown in to a workflow of any sort, they just magically are updated on live website.   In many heavy compliance driven environments, it get’s super important to track when a page or any content living on the page has changed.  With current inherent behavior of Sitecore, there is no way to track when a page truly changed due to datasource driven modules and how the page and datasources are disconnected for many good reasons.

When asked, Sitecore mentioned that this is possible to do so by tapping and finding related items of the datasource and doing something with those layered related items.  It just seems surprising to me that this is not something that is available out of the box.

Below are few references I read up while ensuring that I am not some how dreaming or in an illusion and that Sitecore does support this behavior.  Sitecore confirmed that, nope, the page items that use a datasource that has been modified do not go through any workflow and will not be published.

https://doc.sitecore.net/sitecore_experience_platform/content_authoring/creating_and_editing_items/editing/manage_associated_content

Suggested approach is that you use the Link database and get all references as stated above which per me seems to be expensive operation especially if you do not have a workflow set on datasource templates for instance.  In which case, you will already be pushing all datasource templates as true related items when a page is published.

I would love to hear what others do in situations like this.  This feature when implemented could come in handy in many situations with all clients that are more Compliance driven due to legal aspects of the site and information they would need to track.

Example of sample approach to read from Link database is below.

https://laubplusco.net/sitecore-item-extensions-get-referrers-as-items/

 

Did you Know – A thing to do when reading from children

Super excited to post my second post on ‘Did you know’ series. This is in relation to thing/step that developers could potentially forget as they were so happy that they wrapped up a module that was complex, but, still felt super simple with help of Glass to get children loaded with exact object types they need and performance efficient and maintainable code as they parse through the list of objects only once. 🙂

How cool, right?

But, what about your content author who uses Experience Editor for them daily chores of adding/updating modules. We tend to forget them often in this busy world of making functionality. The mantra “They are the ones who use the system when you call it done and deploy the code”. So, remembering them for nth time, lol, to ensure they are still happy, do not forget to add Insert option to Experience Editor buttons that show up on the rendering. Go to your rendering that has children being read as part of implementation and add in Insert as an option to show up.

A picture is better than 1000 words, here you go:

Another problem you would need to address when you utilize children is to ensure when an item (Datasource item) is published, the children of that particular item are also published when related items are pushed. Out the box sitecore does not do that, pay close attention and ensure you customize it.

Helpful link for this publish issue:

Deep Publishing Of Related Items With Sitecore Experience Editor

Journey with Helix

Hi There!  With new project I am getting an opportunity to work with Helix patterns, along with leading a team who is awaiting instructions and pointers from me, I am re-inventing and looking at sitecore from a totally different perspective.  Since, the whole sitecore world is moving towards Helix and embracing it, I was bent to take a step forward as well.  I am subtly nervous about this, but, hey, we got a a great team both internally and in community who would pitch in to help us take some decisions.

As I roll along, I plan to share what I learned and how we solved each question/concern that came up while implementing Helix for the first time ever.

Two of them so far.  Below are those noted and steps I took based on recommendations of my fellow super stars.  Do you agree? Do you have some totally different direction that we could lean towards.  I would look forward to getting some different thoughts around this.

  1. Helix does not support base page template and advice to have the page templates inherit from several interface templates instead.
    • Pain point – This would mean, every time there is a need for Global interface template to be added to all page templates, some one has to go to each template and add that in.  Hopefully, if architecture is planned correctly, this should not happen very often, but, yeah, I might have to install powershell for sure to do bulk operations very soon.  I can totally see it.
    • I had no option left at this time other than manually adding couple of those sections that are Global to all templates.
  2. Helix proposes to use a different project per feature/module, but, I guess I agree to use grouping instead to group tightly related siblings(I think you may call it that) in to one project instead.  For example, you have similar looking Hero Slider modules, but, we all know that there is not just one Hero on your website, you will have different flavors for this kind of modules.  So, instead of creating one feature project for each Hero, we tend to group them in to one Feature project instead.  Keeping this balanced, like not abusing it, but, at the same time judging each module case by case basis.
    • In this paradigm, I feel a little confused once in a while especially when Client says any module could be used any where on the site, well technically you could use any module any where on Sitecore, assuming not too many restrictions are placed using placeholder settings, but, saying all modules are Global kind of puts the categorizing in terms of Helix in jeopardy or confused state.
    • What I did to overcome this is – Think about different ways of grouping a module based on name of the module, fields/sitecore items in use for the module, where this module is likely to be used, what is the generic purpose of this module.  Few such questions I answered to myself to give clarity on naming the feature projects.  If the module seems to be really generic and not fitting in to any category, we would then plan to drop it under Modules project.  Again, being careful to not abuse this.

Will definitely bump in to more. Also, cool find, I see that the unit testing feedback provided on Helix/Habitat is pretty cool if you wanna check out

http://helix.sitecore.net/devops/testing/unit-testing.html