Welcome! This is my personal blog about Web technologies, software development, open source and other related topics
The ideas and opinions expressed here are solely mine and don't represent those of others, either individuals or companies.The code snippets or references to software products or analogous are to be used without any warranty of any kind. If you enjoy the content, feel free to share it and re-use it as long as you provide a link to the original post.
February 2023 Update – Sitecore has released new api endpoint per region which routes through a CDN closer to end users call along with new Javascript library. See the new documentation here – Sitecore CDP developer documentation
See the release notes for the latest version. Point of writing this blog the version is 1.4.9. This can change. See the link to get the latest version.
Recompress the files into two or more compressed batch files that do not exceed the 50MB size limit. Then upload the compressed files as separate batches.
If the base64 checksum attribute in header does not match the hex-encoded MD5 Checksum generated by uploading the compressed file you will receive 409 response.
Components of the Docker Engine – Docker Daemon, Rest API and Docker Cli
Component that manages Images, Containers, Volumes and Network – Docker Daemon
Component that manages containers in Docker Engine – LibContainer
Container can run with Docker – Yes
Component keeps alive container even if Docker Daemon is not working – Containerd-Shim
Docker engine objects- Images, Container, Volume and Network
In Container data is writable but not persistable – Yes
Dcoker looks for images in docker hub by default- Yes
Readonly component in Docker engine – Docker Images
Default directory where Docker data is stored (Ubuntu) – /var/lib/docker
Directory where the Docker config is stored(Ubuntu)- /etc/docker
OCI stands for – Open Container Initiative
OCI specification – runtime-spec and image-spec
View version of Docker engine – docker version
Stop the Docker service – systemctl stop docker or/and systemctl stop docker.socket
Start the Docker service – systemctl start docker.socket or/and systemctl start docker
Check Status of Docker service – systemctl status docker
Debug docker whilst starting the service – dockerd –debug
Where is the Daemon file located (Ubuntu) – /etc/docker/daemon.json
Where is the daemon socket located (Ubuntu) – /var/run/docker.sock
Port to connect the docker externaly with encrypted trafic – 2376
Port to connect the docker externaly with unencrypted trafic – 2375
Start the docker daemon manually – dockerd
Default docker daemon interface – Unix Socket
Default network driver – bridge
Stop Command signals running container on STOP command – SIGTERM followed by SIGKILL
Restart policies – no, on-failure, always and unless-stopped
Reduce container downtime due to daemon failure or restart- Enable Live Restore
Docker Images FAQ’s
Default Docker Image Registry – Docker Hub
Various Image Registry –
Docker Trusted Registry
Google Container Registry
Amazon Container Registry
Azure Container Registry
Types of Images in Docker Hub
Official Images
Verified Images
User Images
Base vs Parent Image –
Base Image are creatged from scratch, which means its empty. You cannot create a scratch image as it is always to be used. Any other images created from Base Image but used as parent to custom images are Parent Image. e.g. Ubuntu which is made from debian image. Here debian image is a Parent Image
Docker Swarm
What is the maximum and recommended number of mananger a swarm cluste can have? There is no max limit but recommended is 7 managers in swarm cluster
This year it was a quite roler coaster working with Sitecore products not just limited to Sietcore XP but also Order Cloud, Sitecore Send and Sitecore CDP with various other technology associated.
Here are the contributions in the form of blogs, videos and helping community on Slack and learning a lot from community.
You can force close event to test Abandon Cart. This works only in non-prod environments.
Assumption- An identified guest which is active and has added products in cart.
If you are corectly tracking you should see in the timeline Session and event a Product been added.
So whilst developing if you want to force close this session, since you might not want to wait for 20 minutes for session to expire or whatever time is set to expire the session, you can force close the session to see or perform the next steps if the cart is been abandoned.
The force close event can be triggered by providing message type as FORCE_CLOSE in the payload.
Send the payload to this endpoint. For more details on what should be the apiEndpoint and client key see this blog
var browser_id = pm.environment.get("browserId") -- browser id
var pointOfSale = pm.environment.get("PointOfSale") -- point of sale
var message = {
"channel": "WEB",
"type": "FORCE_CLOSE",
"language": "EN",
"currency": "GBP",
"page": "home page",
"pos": pointOfSale,
"browser_id": browser_id
}
postman.setEnvironmentVariable("message", JSON.stringify(message));
Since the session is now closed we can see the Abandoned Revenue. Further reminder mails can be sent to user to complete the purchase on the abandoned cart.
Add the Product details the user must have added in cart and send the below request to Sitecore CDP.
At this point the Guest must have been identified as the Customer. Search Customer by browserid or Name.
Should the current activity of the customer.
Click on Timeline and View Session details
The session should show the product been added to the cart. Based on this if the product remains in cart for certain time and the user doen’t checkout you may provision to trigger abandon cart event.
cURL code snippet-
curl --location -g --request GET 'https://api.boxever.com/v1.2/event/create.json?client_key=<<Client Key>>&message={"channel":"WEB","type":"CONFIRM","language":"EN","currency":"GBP","page":"home page","pos":"pastoral-witty-grill","browser_id":"7ed103bd-08c2-47f4-8f69-91141ca3200d","product":[{"item_id":"EXACT_90"}]}'
C# code snippet-
var client = new RestClient("https://api.boxever.com/v1.2/event/create.json?client_key=<<Client Key>>&message={\"channel\":\"WEB\",\"type\":\"CONFIRM\",\"language\":\"EN\",\"currency\":\"GBP\",\"page\":\"home page\",\"pos\":\"pastoral-witty-grill\",\"browser_id\":\"7ed103bd-08c2-47f4-8f69-91141ca3200d\",\"product\":[{\"item_id\":\"EXACT_90\"}]}");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
An IDENTITY event contains data that enables Sitecore CDP to perform identity resolution. When Sitecore CDP receives an IDENTITY event, it runs a linking algorithm to try to match guest data from separate guest profiles, based on your organization’s identity rules.
A guest is identified with the browser id. To search the guest Navigate to the Guest list page and search for the guest with the browwser id.
To identify the guest as a Customer provide the payload with the type as IDENTITY and the Customer details, such as their email, firstname, lastname etc.
Now search the Guest by browserid and the Gust Type should be Customer as the Guest has been identified.
CURL code snippet-
curl --location -g --request GET 'https://api.boxever.com/v1.2/event/create.json?client_key=<<client key>>&message={"channel":"WEB","type":"IDENTITY","language":"EN","currency":"GBP","page":"home page","pos":"pastoral-witty-grill","browser_id":"7ed103bd-08c2-47f4-8f69-91141ca3200d","title":"Sir","email":"pgrill@malify.com","firstname":"Pastoral","lastname":"Grill"}'
C# code snippet-
var client = new RestClient("https://api.boxever.com/v1.2/event/create.json?client_key=<<code key>>&message={\"channel\":\"WEB\",\"type\":\"IDENTITY\",\"language\":\"EN\",\"currency\":\"GBP\",\"page\":\"home page\",\"pos\":\"pastoral-witty-grill\",\"browser_id\":\"7ed103bd-08c2-47f4-8f69-91141ca3200d\",\"title\":\"Sir\",\"email\":\"pgrill@malify.com\",\"firstname\":\"Pastoral\",\"lastname\":\"Grill\"}");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);