Sitecore Personalize – Livin’ on the Edge

With the explosion of data being collected and consumed by IoT applications and devices along with our insatiable desire for near real-time feedback, has led to a shift in how we handle computing. Performing all the computation at data centers and/or cloud servers is not the most efficient approach as this increase in data consumption requires significantly more bandwidth which only increases latency. Edge computing, allows computation of data to remain much closer to the user rather than going through several network hops, for a cloud server to process the data and return a response. With this computation of data happening closer to the source not only is Edge more performant it is also considered more secure.

Users who have a personalized online experience and feel a connection with your brand are more likely to make a purchase and become loyal customers. However, a poor implementation that adversely impacts performance will have the opposite effect and drive potential customers away.

The probability of bounce increases 32% as page load time goes from 1 second to 3 seconds.

https://www.thinkwithgoogle.com/marketing-strategies/app-and-mobile/page-load-time-statistics/

In this post, I will demonstrate how you can improve performance and user experience by moving personalization to the Edge with Nextjs Middleware and Sitecore Personalize using the Sitecore Commerce template created by Vercel. First I’ll show you how to personalize using visitors’ Geolocation to show summer or winter clothing collections.

Then we’ll personalize using guest information collected by Sitecore Personalize to display products from our men’s or women’s store.

Continue reading

Sitecore Demo Portal

If you’ve been involved recently with Sitecore on any client pitches for OrderCloud or CDP & Personalize then you would have seen Sitecore Sales engineers demonstrate the power of these applications running on the demo portal using the PLAY Summit. It has been made available to all Sitecore MVPs this week and allows you to quickly and easily spin up an environment and instance to easily demonstrate Sitecore products. For Partners you need to be onboarded via the partner team, you can contact your partner manager to get access.

If you’ve ever been involved in pre-sales then you know how much effort can go into standing up a demo Sitecore Solution to provide your Sales and Marketing teams with something that can be shown to potential new or existing clients.

The goal of the Portal and what the Sitecore Demo team have continually been striving towards – to simplify the process of spinning up a working Sitecore solution, allowing you to quickly demonstrate the main features with each new Sitecore release. It has to be said they’ve had their work cut out recently with all the recent acquisitions and new Products being added to Sitecore. But it has to be said this most recent incarnation of their demo solution and portal is their best work yet! It demonstrates how to spin up a ComposableDXP with Sitecore with a few clicks and some simple configuration. The portal will do its thing and you can review the progress or go make yourself a cuppa coffee and wait until you receive an email indicating your demo instance is ready in around 10-15mins. Awesome!

Taking it for a spin

I was fortunate to get early access to take it for a spin. If you’ve not already accessed the demo portal you’ll want to head over and sign in with your Sitecore Partner account. Once signed in you’ll be presented with the portal home screen which will list any current demo instances you’ve created:

As you can see here I have several demo instances available one for each of the demo templates that are currently available.

To spin up and new demo instance Select the Get a Demo menu option or click Quick Demo for a faster wizard-like experience.

Continue reading

Using Postman with OrderCloud

The OrderCloud API Console is a pretty awesome tool and an excellent feature to have within the OrderCloud platform. However, I like to utilize Postman when developing against APIs. As I’ve previously demonstrated by utilizing Postman with Sitecore CDP & Personalize and Sitecore Send, in this post I’ll look at using Postman with the OrderCloud API.

Importing the OrderCloud API into Postman

OrderCloud provides an OpenAPI spec and is available at OrderCloud Developer Tools. You can use this definition to import into Postman and create a collection. To import follow these steps:

1. In Postman create a new Workspace -> New Workspace let’s call it OrderCloud API

2. Now copy the OrderCloud OpenApi URL documentation endpoint and click on the Link tab and enter the copied URL and click Continue.

3. Use the default setting and click Import.

4. The OrderCloud API definition is imported and a collection of APIs are created and divided into the various functional areas as described by OrderCloud API definition as described in the API Reference guide.

Using the Collection

Once the collection has been created there are a few things you’ll need to set up:

  • Register for an account on the OrderCloud Portal.
  • Create or have an existing Marketplace.
  • Create or have existing API clients: Seller Client, Buyer Client.
  • Create or have an existing Admin User account and security profile with full access.

All of these details are covered in the OrderCloud Establishing API Access guide.

Note: If you have used the Vercel Commerce template and added the OrderCloud Integration or the headstart-nextjs application then these would have been created during the setup of the integration.

Authentication and Access Tokens

OrderCloud uses OAuth 2.0 for token-based authentication. This means that each API request to OrderCloud requires a valid access token which can be acquired through a variety of OAuth workflows.

Encrypted in the token are the identity of the user as well as the roles that the user has access to. Once validated, the OrderCloud API has enough information from this token to determine which endpoints and data a user can read and/or write.

Tokens are valid for 8hrs and you can renew or create a new token. Generated tokens can then be stored in a variable and reused.

OrderCloud API Exercises

While the APIs are well documented in the Reference guide there is a great OrderCloud Postman Tutorial. These postman exercises will guide you through the steps, data and api requests involved in setting up a fictitious Coffee Shop. This is a really good starting place to learn the various APIs and data structures and how they interact with your OrderCloud data.

To import the exercises into your own local or web postman instance simply click on the simply click on the Run In Postman button located at the top of the exercises to import into with your web or desktop postman instance.

You will also want to import the variables used in the exercises and update them accordingly to your OrderCloud environment instance as you progress through the exercises.

Have Fun!

A React Sitecore Personalize NPM module

The React Sitecore Personalize npm module is a wrapper for Sitecore CDP/Personalize Direct Client Script allowing you to easily add the script to react-based apps. The goal of this project is to make it even easier for those developers who might be new to React or Next.js and are learning how to integrate Sitecore Personalize by providing a simple wrapper for the direct client script. Allowing you to easily add the script to your projects and send events to Sitecore Personalize to track user behavior with just a few lines of code. The project is available on GitHub so please use it to help you get up-to-speed quickly, and contribute to the project if you have any suggestions for improvement.

Installation

npm install react-sitecore-personalize

Or

yarn add react-sitecore-personalize

Continue reading

Utilizing the Sitecore CDP Blueprints Library

The Sitecore CDP Blueprints library created by the Sitecore team contains useful configurations and snippets. You can either use as a reference to help understand key concepts or adapt and use in your own implementations. Which can help you get up and running quicker with Sitecore CDP.

Web Experience Snippets

These snippets can be used to create web templates for your marketing team in their Web Experiences. Simply copy and paste the provided HTML, CSS, and JavaScript into the corresponding tabs when creating a new template.

The library contains the following examples:

Advanced Page Targeting Snippets

The following scripts can be used with your web experiences by copying the snippet into the Advanced Page Targeting block to ensure the web experience is only executed when the specific event occurs:

  • OnClick – Triggers the experience when user clicks the specified HTML element.
  • OnDelay – Triggers the experience after a delay.
  • OnExit – Triggers the experience when user moves their mouse out of the browser window.
  • OnHover – Triggers the experience when user moves their mouse over the specified HTML element.
  • OnScroll – Triggers the experience when the user has scrolled a certain percentage of the page.
  • SpaTargeting – This function can be used in Advanced Page Targeting to allow an experience to trigger on every virtual page load, rather than only on full page loads. It can be used along with other page targeting functions to trigger experiences after a delay or on hover over an element etc.

Decision Model Snippets

Most Viewed Page Decision Model – This decision model will get the most viewed page from your customer’s sessions and return relevant content for you to display.

Sitecore Personalize decision models enable users to model and run decisions using business rules. You can create reusable programmable decision templates using JavaScript for use within your models. The following are examples of programmable functions you might use as a decision template:

  • getNumberOfEvents – This function will return the number of events of the specified type in the provided session.
  • getTriggerEvent – This function will return the order that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Custom Trigger.
  • getTriggerOrder – This function will return the order that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Order Created or Order Updated.
  • getTriggerSession – This function will return the session that triggered the execution of the experience. This is for use in triggered experiences where the trigger is Session Closed or Abandoned Cart.

Audience Filter Snippets

Sitecore CDP allows you to target an audience in a triggered experiment and there are a few different ways you can achieve this. If you want to target a real-time audience you can apply JavaScript either via a reusable Audience template or direct JavaScript that can be added to the Experiment. The following JavaScript snippets are included in the library:

Credit

Thanks to the team at Sitecore for pulling this awesome collection of snippets together. They provide lots of insight and certainly help stir some creativity.

Have Fun!

Generating Leads with Sitecore Personalize and Sitecore Send (Moosend)

Lead generation is such an important marketing practice for every business or brand and it comes in many different forms. Take the simple subscribe to receive discount offers email, almost every e-commerce site I’ve landed on recently has displayed one of these pop-ups. Sitecore Personalize makes it possible for your marketing team to easily add these lead generation experiences. While Sitecore Send (Moosend) allows marketing to stimulate and nurture visitor engagement through targeted and relevant communications. With the ultimate goal of converting visitors into lifelong consumers.

In a previous post, I showed how to easily integrate Sitecore CDP/Personalize with your existing site using GTM. In this post, I’ll show you how to capture the visitor’s name and email address using a Sitecore Personalize web experience, once a guest submits their information we’ll add them to a mailing list configured in Sitecore Send (Moosend).

To achieve this we will complete the following:

  1. Create a offers mailing list in Sitecore Send (Moosend) for customers so they can subscribe to receive offer emails.
  2. Take a look at the Sitecore Send REST API we will use to add a user to the mailing list.
  3. Create Data Connection in Sitecore Personalize for the API method.
  4. Create a Web Experience prompting user to enter name and email to subscriber to the email campaign that only displays when user has not previously subscribed.
  5. Create a Triggered Experience that will send user data to Sitecore Send using a data Connection to subscribe the user to the mailing list when the user submits the subscription pop up.
  6. Start the Experiences and Test.

At first glance, this might seem like a lot of steps to go through but it’s relatively straightforward to accomplish with Sitecore Personalize and Sitecore Send. Once you understand the various components involved, which I’ll guide you through, your marketing team will be able to re-use for similar scenarios.

Lots of good stuff!

Continue reading

Creating a Postman Collection for Sitecore Send (Moosend)

When working with various REST APIs it’s nice to be able to manage your sample and test requests in a single location. In a previous post, I introduced the Sitecore CDP REST APIs and shared my Postman collection. In this post, I will show you how to create a collection for Sitecore Send (Moosend). The good news Moosend provides an API Blueprint specification available here. However, you are not able to import this document directly into Postman. In this post, I will show you how you can convert this Blueprint spec so it can be imported into postman and automatically generate a collection of requests for testing and development with Moosend.

Continue reading

Handy Chrome Dev Tools, I never knew existed!

1. Capture and Replay HTTP API Requests

Using the Network tab in Chrome Dev tools you can capture a request paste it into the console, modifying as required, and then run it, here are the steps:

  1. Click on the Network tab.
  2. Locate the request you would like to re-run.
  3. Right click on the request Copy -> Copy as fetch.
  4. Paste the request into the console and edit if required i.e changing parameters id submitting details to an api etc.
  5. Simply run the modified request.

2. Emulate CSS print media type

While working on a site requiring specific printed media styling you need to be able to easily view the styled markup during development. Thankfully chrome, ff, safari, and edge have built-in dev tools to support this. Here is how to achieve this with Chrome:

  1. With Google Chrome open, press F12 on your keyboard to open Dev Tools.
  2. Click on the menu at the top right – (Customize and Control DevTools).
  3. Select More Tools -> Rendering this will open the rending window.
  4. Scroll down to the Emulate CSS media type option and Select Print from the emulation dropdown.

Who Knew!! “¯\_(ツ)_/¯“

Jira Sprint Dashboard

If you are using Jira for managing your backlog and tracking bugs then a Jira Dashboards is a must-have. Dashboards provide an excellent way to quickly track progress and easily gain valuable insights into the progress/health of your sprint. A well-crafted dashboard will help your daily scrum or other sprint ceremony meetings, to stay focused and help ensure meetings are run efficiently and effectively. Maybe even give you back some minutes in your day.

Dashboards Gadgets

Each dashboard can contain multiple gadgets for displaying information contained in Jira. There is a range of different gadgets available pre-installed with additional gadgets that can be added. Some of the most useful gadgets I use are the pie chart and filtered results.

  • Filtered Result – Displays the results of an issue filter driven by a search query and allows you quickly see results of important queries. So you can create any search query and have those results rendered in your dashboard.
  • Pie Chart – Displays issues from a project or issue filter, grouped by a statistic type, in pie-chart format. Issues can be grouped by any statistic type (e.g. Status, Priority, Assignee, etc).
Continue reading

Introduction to Sitecore CDP REST APIs and my Postman Collection

In this post, I will introduce the Sitecore CDP REST APIs and the postman collection I created for working with the APIs. I’m a huge fan of postman it’s an essential developer tool when it comes to working with a REST API.

Sitecore CDP does not currently provide a standard document like OpenAPI (swagger) for describing the APIs, which can be used to generate a postman collection. Therefore I’ve started a collection based on the Sitecore documentation and examples they’ve provided. The Sitecore docs are an excellent resource for developers, to help you understand the various APIs and attributes. I highly recommend checking these out as they are constantly evolving since the acquisition of Boxever.

My postman collection is available on GitHub as a json file. You can import it into Postman and use it when working with your own Sitecore CDP sandbox. I hope you find it useful, please share any feedback.

Continue reading