Sitecore Basic CDP Project


Today I am going to share a project which I created while learning Sitecore CDP. This project is developed using ASP.NET MVC and the project follows the Helix principle. The Feature layer contains all the components that are used in the project, the Foundation layer contains some APIs and the Project layer contains all the content and scripts along with the layout that the Sitecore pages use. It also uses Sitecore CDP to capture the guest information as well as their activities.


This project is created and tested on Sitecore 10.2 and Sitecore 10.3. You need Sitecore CLI for Serializing the items to Sitecore Instance. For making Sitecore CDP work you have to populate the fields in the constant file which is located at path "SitecoreCDP/src/Project/Website/code/Constants.cs". This file contains all of the configurations that are required for sending the data to Sitecore CDP. The site definition can be found in the path "SitecoreCDP/src/Project/Website/code/App_Config/Include/SitecoreCDP/SitecoreCDP.Project.Website.SiteDefinition.config". You can modify it according to your need.


In this project, I tried to bind most of the events available within Sitecore CDP. Some of the events which I have added are mentioned below -


Identity - The Identity Event is an event that is triggered when a customer logs in to a website or application. This event is used to identify the customer and associate their actions with their profile in the CDP.


Force Close - The Force Close Event is an event that is triggered when a customer logs out of a website or application. This event is used to indicate that the customer's session has ended, and to update the customer's profile in the CDP to reflect their current status.


Search - The Search Event is an event that is triggered when a customer performs a search on a website or application. This event is used to track the customer's search behavior, and to gain insights into what the customer is looking for.


Add - The Add Event is an event that is triggered when a customer adds an item to their shopping cart or Wishlist. This event is used to track the customer's purchase intent, and to gain insights into their product preferences.


Checkout - The Checkout Event is an event that is triggered when a customer completes a purchase on a website or application. This event is used to track the customer's purchase behavior, and to gain insights into their buying habits.


Clear Cart - The Clear Cart Event is an event that is triggered when a customer clears their shopping cart or Wishlist.


Payment - The Payment Event is an event that is triggered when a customer makes a payment on a website or application.


Add Consumers - A consumer on an order is a guest who is listed as traveling or consuming a product or service.


Add Contacts - A contact on an order is the owner of the order. When this information is sent, Sitecore CDP tries to match the contact to an existing guest profile or it creates a new guest profile with the customer as a guest type.


Confirm - The Confirm Event is an event that is triggered when a customer confirms a transaction, such as a purchase, registration, or subscription.


Order Checkout - Order Checkout is an event that occurs when a customer completes a transaction, such as a purchase, on a website or application.


I also created an API Controller in the Foundation layer which can be used to access any guest profile from Sitecore CDP using its reference id.





Explore it more by making changes and learning Sitecore CDP. Also do not forget to star and fork the repository.


GitHub Link https://github.com/chirag-goel360/Sitecore-CDP-Basic-Learning-Project


Pull Requests are always welcome.


References


Introduction to Sitecore CDP - https://doc.sitecore.com/cdp/en/users/sitecore-cdp/introduction-to-sitecore-cdp.html


Sitecore CDP Data Model 2.1 - https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/index-en.html

Chirag Goel

I am a developer, likes to work on different future technologies.

Post a Comment (0)
Previous Post Next Post