Posts

Showing posts from February, 2023

Sitecore Embeddable Forms Framework(EFF) and GraphQL API to create items in Sitecore XMCloud

Image
Sitecore 10.3 introduces Embeddable Forms Framework, which helps developers/marketers to design forms and inject them into the non-Sitecore application, this feature is slightly similar to Federated Experience Manager of showing Sitecore content in the non-Sitecore application. We can still use the custom submit action on the forms to trigger any kind of data integration to third-party systems. All validation, CSS, will be applicable and will not override the web application. Developers can also create custom form elements like Text fields, dropdowns, etc and which will be used to design the form like other fields. Custom form creation In this example, we will create items in Sitecore from the non-Sitecore applications using Forms and GraphQL Install Sitecore headless services 21.0.0   in Sitecore 10.3 which is necessary to pass the form details in the layout service, which will be automatically consumed by the third-party application by injecting EFF script snippet in the HTML. Downlo

Sitecore XMCloud Personalization and CDP Personalization with SitecoreCloud SDK

Image
 Sitecore XMCloud allows us to personalize the content of the pages by using Sitecore Pages. XMCloud provides a lightweight Sitecore CDP feature which is limited to Page Views. Also, we can view only 30 days of analytics information from the Analytics dashboard. Personalization in XMCloud is happening through SitecoreCloud SDK with Engage module. Setup personalization in XMCloud and application environment variable configuration: Create page variants from Sitecore Pages with personalized content by making the necessary audience rule. The audience rule template is available out-of-box, customization or the creation of new rules is not possible at the moment. Once the Page variant is created and assigned personalized content, publish it to Edge. Download the repository from GitHub  XMCloud Foundation  or use the command npx create-sitecore-jss --templates nextjs-personalize Update the .env file with the following environment variables SITECORE_API_KEY (Your experience edge token) JSS_APP

XMCloud Sitecore Components - Visual Component builder

Image
 Sitecore XMCloud introduced a new way of creating composable components.     Sitecore Components help us to create composable components easily with less code, these components can be reused and we can able to mix and match the datasource in the component ie)  Each field in the component can get data from different sources like API, CMS, or any system which provide properly structured data. Datasource should be in JSON format to use in the component. The XML format is not applicable at the moment. Following options to get the datasource from different sources Fetch from Url (REST API) Fetch from GraphQL Paste JSON (manually paste the JSON) Steps to create the component: XMCloud has provided a new interface to create the components, so let's get started. Click on the Components icon from the Tools menu First, we need to create the datasources for our components. if we need to get data for our component from multiple sources then we need to create multiple Datasource for retrieving

Sitecore XMCloud Webhooks events notitications

Image
In Sitecore XMCloud different kinds of events will be get notified with the 3rd party system using the API endpoint, this helps the 3rd party system to do necessary action based on the information received from the webhook events triggered from XMCloud. There are 3 kinds of webhooks we can get notifications from. Webhook Event handler Webhook Submit action Webhook validation action. Webhook Events handler: This webhook is used to provide notifications from XMCloud for the following events, We are not limited to using only the out-of-box events, we can create our custom events and get notifications from them.      Webhooks can be set to trigger on certain rules that we can set in XMCloud, once the Rule is met then this webhook will be triggered to provide notification on the defined API endpoint. Webhook Submit action This Webhook submit action is set at the workflow level, either from moving from one state to another state or from the command level or as an action. Once this webhook is

Sitecore XMCloud Extending Layoutservice response using RenderingContentResolver

Image
 We have different way to show the customize the layout service data Rendering Content Resolver (For rendering level customization) Layout service Context data (Applicable for context level in the Layoutservice response mostly used to share the static data to all components/pages etc) Rendering's Integrated GraphQL Steps to Customizing the LayoutService data using Rendering Content Resolver. Clone the starter kit from github ( https://github.com/sitecorelabs/xmcloud-foundation-head-staging ) or create own visual studio solution by adding the reference to the following nuget packages. Once reference added , create a Contentresolver class necessary to provide data to the rendering. On build if receive any error related to the nuget package version like below   using Sitecore.LayoutService.Configuration; using Sitecore.LayoutService.ItemRendering.ContentsResolvers; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Sitecore.Configuration; us