<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Marcus Hoffmann</title> <link>https://world.optimizely.com/blogs/marcus-hoffmann/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>Integrate a CMP workflow step with CMS</title>            <link>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2024/7/integrate-a-cmp-workflow-step-with-cms/</link>            <description>&lt;p&gt;As you might know Optimizely has an &lt;a href=&quot;https://support.optimizely.com/hc/en-us/articles/19673732893069-CMS-publishing-in-CMP&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;integration&lt;/a&gt; where you can create and edit pages in the CMS directly from the CMP. One of the benefits of this is that the marketing team can use the nice &lt;a href=&quot;https://support.optimizely.com/hc/en-us/articles/8186091022093-Manage-workflows&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;workflows&lt;/a&gt; in CMP for both the creation and approval process of new content to the CMS.&lt;/p&gt;
&lt;p&gt;But what if you want to use the CMP workflows for work that are not directly related to creating or editing a new page in the CMS? Perhaps you want an editor who works in CMS, but who does not have access to CMP, to update a piece of content or change a setting that is not connected to a specific page.&lt;/p&gt;
&lt;p&gt;CMP has a built-in feature for so-called external workflow steps. This means that you can integrate workflow steps in the CMP that are managed completely outside the CMP. For example, there are ready-made connections to &lt;a href=&quot;https://support.optimizely.com/hc/en-us/articles/14056468104589-Integrate-Jira&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Jira&lt;/a&gt; and to &lt;a href=&quot;https://support.optimizely.com/hc/en-us/articles/8184563365773-Integrate-Adobe-Creative-Cloud&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Adobe CC&lt;/a&gt; for this purpose.&lt;/p&gt;
&lt;p&gt;This blog post describes how &lt;a href=&quot;/link/e0112670d83b441c9a4b163033d7d49c.aspx&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Kunal&lt;/a&gt; and I created the corresponding connection between CMP and CMS. The integration is not tied to working on a specific page or block in the CMS that is selected from CMP. The task can include any kind of instructions to update of one or more content items on the web site. The editor in CMS doesn&#39;t need to login to CMP to read the instructions or to mark the task as done, this is completely managed in CMS.&lt;/p&gt;
&lt;h2&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The editor in CMP can create a task that will be be managed in CMS&lt;/li&gt;
&lt;li&gt;When an external workflow step is triggered it is reflected under &quot;Tasks&quot; in the CMS&lt;/li&gt;
&lt;li&gt;The CMS user can update the status of the task in the CMP&lt;/li&gt;
&lt;li&gt;With this integration one CMP instance can connect to multiple instances of CMS&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;h2&gt;1. CMP&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You need administration permissions to configure the integration in CMP.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;1.1 Create an App&lt;/h3&gt;
&lt;p&gt;Give your app a&amp;nbsp;&lt;b&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;(&quot;My-CMS&quot;) and input the&amp;nbsp;&lt;b&gt;&lt;strong&gt;public url&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;of your website. The callback url can be left empty or set to the same url.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/63f77a96a52c4870a5a1b362c432578c.aspx&quot; width=&quot;622&quot; height=&quot;824&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Once you have created an App, you should get a&amp;nbsp;&lt;b&gt;&lt;strong&gt;ClientId&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;and a&amp;nbsp;&lt;b&gt;&lt;strong&gt;ClientSecret&lt;/strong&gt;&lt;/b&gt;. These will be required for the CMS configuration.&lt;/p&gt;
&lt;h3&gt;1.2 Register a Webhook&lt;/h3&gt;
&lt;p&gt;Create a new Webhook and give it a name (&quot;My-CMS-Webhook&quot;). As the Callback url enter the url to to your site and append the webhook:&amp;nbsp;&lt;b&gt;&lt;strong&gt;/api/cmp-cms-workflows/webhooks&lt;/strong&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;classLib&quot;&gt;https://my-site.com/api/cmp-cms-workflows/webhooks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;Your CMS instance needs to have a public facing url for the CMP to be able to send Webhook notifications.&lt;/p&gt;
&lt;p&gt;For&amp;nbsp;&lt;b&gt;&lt;strong&gt;Secret&lt;/strong&gt;&lt;/b&gt;, you can use the value you generated when creating the App or set a new value.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/9a9fa2fd2e3442c8a0df2d446eaec4c7.aspx&quot; width=&quot;703&quot; height=&quot;513&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Select the below events. Make sure that you only check the&amp;nbsp;&lt;b&gt;&lt;strong&gt;&quot;External Work Management&quot;&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;events.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/45e63f5968714928ac056fce1cbe253c.aspx&quot; width=&quot;621&quot; height=&quot;198&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;1.3 Create a Workflow with External Step&lt;/h3&gt;
&lt;p&gt;Create a new workflow. One of the steps should be an&amp;nbsp;&lt;b&gt;&lt;strong&gt;external step&lt;/strong&gt;&lt;/b&gt;. In this example we create a workflow with three steps: &quot;Plan&quot;, &quot;CMS Task&quot;, &quot;Publish&quot;. The &quot;CMS Task&quot; step is created as an external step.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/f733e9ef3b5b4a00983ba007b64f1275.aspx&quot; width=&quot;904&quot; height=&quot;839&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/b9ae3dca57e34ae0bcfcbe8ced10b47a.aspx&quot; width=&quot;907&quot; height=&quot;793&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;For the configuration of the&amp;nbsp;&lt;b&gt;&lt;strong&gt;External Step&lt;/strong&gt;&lt;/b&gt;, click the&amp;nbsp;&lt;b&gt;&lt;strong&gt;&quot;Manage External System&quot;&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;button and&amp;nbsp;&lt;b&gt;&lt;strong&gt;give your CMS system a unique name&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;(&quot;My-CMS)&quot;. This external system name will be needed when configuring the plugin on the CMS side.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/7eecb6d0e50640af98d95340f4d3683b.aspx&quot; width=&quot;349&quot; height=&quot;172&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Then select your external system in the&amp;nbsp;&lt;b&gt;&lt;strong&gt;&quot;Select external system&quot; dropdown list&lt;/strong&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;h2&gt;2. CMS&lt;/h2&gt;
&lt;p&gt;Install the nuget package. The nuget can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://nuget.optimizely.com/package/?id=Research.CMP.CMS.Workflows&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://nuget.optimizely.com/package/?id=Research.CMP.CMS.Workflows&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;2.1 AppSettings.json&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;ClientId&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;&lt;strong&gt;ClientSecret&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;corresponds to the values created in the App in CMP.&amp;nbsp;&lt;b&gt;&lt;strong&gt;ExternalSystemID&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;is the name you created for your external system (i e &quot;My-CMS&quot; in the example in the screenshot). The&amp;nbsp;&lt;b&gt;&lt;strong&gt;WebhookSecret&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;should match the value from the Webhook settings.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;classLib&quot;&gt;&quot;EPiServer&quot;: {&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&quot;Cms&quot;: {&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;CmpCmsWorkflow&quot;: {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;ClientId&quot;: &quot;client-id&quot;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;ClientSecret&quot;: &quot;client-secret&quot;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;ExternalSystemId&quot;: &quot;external-system-id&quot;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;WebhookSecret&quot;: &quot;secret-from-cmp-webhook&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;2.2 Startup.cs&lt;/h3&gt;
&lt;p&gt;In usings add:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;classLib&quot;&gt;using Research.CMP.CMS.Workflows;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In ConfigureServices(...) add:&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;classLib&quot;&gt;services.AddCmpCmsWorkflows();&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;3. Example&lt;/h2&gt;
&lt;h3&gt;3.1 Create task in CMP&lt;/h3&gt;
&lt;p&gt;Create a new task in CMP and select your new workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/826b80ec33374e60b76cbf7101a7c49f.aspx&quot; width=&quot;723&quot; height=&quot;608&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Write the instructions of the task you want the CMS editor to perform as the&amp;nbsp;&lt;b&gt;&lt;strong&gt;description&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;of the external step. In this case, the task is to update the company address in the footer of the website. Hit the&amp;nbsp;&lt;b&gt;&lt;strong&gt;Sync button&lt;/strong&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;h3&gt;3.2 Perform the task in CMS&lt;/h3&gt;
&lt;p&gt;The editor in CMS will now see the new task in the task pane.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/97c9e00763d343acafff37e82b07bd14.aspx&quot; width=&quot;1034&quot; height=&quot;803&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;Click the task&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;to read the instructions. Perform the task, then come back to the task instructions, and&amp;nbsp;&lt;b&gt;&lt;strong&gt;update the status from &quot;InProgress&quot; to &quot;Completed&quot; and then click the Publish button&lt;/strong&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;The step in&amp;nbsp;&lt;b&gt;&lt;strong&gt;CMP&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;will now be marked as&amp;nbsp;&lt;b&gt;&lt;strong&gt;Completed&lt;/strong&gt;&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/b&gt;&amp;nbsp;The nuget package will create a new Block type called CMP Task, that are also stored in a folder called CMPTasks.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;The integration is available on our nuget feed for installation (CMS 12 required):&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href=&quot;https://nuget.optimizely.com/package/?id=Research.CMP.CMS.Workflows&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://nuget.optimizely.com/package/?id=Research.CMP.CMS.Workflows&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Full source code is also available at Github together with Readme including the details of how to configure the integration.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/episerver/Research.CMP.CMS.Workflows/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://github.com/episerver/Research.CMP.CMS.Workflows/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Do you think this integration should be available as a standard integration? Feel free to comment with any feedback.&lt;/strong&gt;&lt;/p&gt;</description>            <guid>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2024/7/integrate-a-cmp-workflow-step-with-cms/</guid>            <pubDate>Wed, 10 Jul 2024 13:14:39 GMT</pubDate>           <category>Blog post</category></item><item> <title>Improved headless functionality in Customized Commerce</title>            <link>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2023/5/improved-headless-functionality-in-customized-commerce/</link>            <description>&lt;p&gt;&lt;strong&gt;Did you know that with the release of Content Delivery Commerce API 3.7 we have massively improved the out of the box headless capabilities of Customized Commerce v14?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since before the Content Delivery API were already supporting Catalog data, enabling you to fetch products using our Rest API. We also supported some of the basic commerce operations such getting markets, prices etc.&lt;/p&gt;
&lt;p&gt;When it comes to Rest APIs for Customized Commerce, we also had the Service API since before. This API supports all commerce related features like getting products, customers, creating carts and orders etc. But the intention of this API is for integration purposes, even if it could be used for headless scenarios.&lt;br /&gt;&lt;a href=&quot;https://docs.developers.optimizely.com/customized-commerce/v1.3.0-service-api-developer-guide/docs&quot; title=&quot;https://docs.developers.optimizely.com/customized-commerce/v1.3.0-service-api-developer-guide/docs&quot;&gt;https://docs.developers.optimizely.com/customized-commerce/v1.3.0-service-api-developer-guide/docs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feedback has been clear from you partners for a long time, and we understand your needs and where the market and trends are going. Today we need to be able to serve not only web, but also other channels, such as mobile apps. Also, the majority of new ecommerce sites on our platform are using Javascript frameworks, such as React, for their frontend. But you as a partner always needed to wrap much of our .Net APIs in your own Rest APIs for full ecommerce support.&lt;/p&gt;
&lt;p&gt;The newly released Content Delivery Commerce API now adds all Commerce related headless APIs you need. Easy to use since it extends the the Content Delivery APIs we already got, and you already are familiar with. &lt;br /&gt;&lt;a href=&quot;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&quot; title=&quot;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&quot;&gt;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;API overview&lt;/h2&gt;
&lt;p&gt;&lt;img alt=&quot;Rest-APIs.png&quot; src=&quot;/link/9dbe4395ddbe47b28540d623ef760a26.aspx&quot; width=&quot;700&quot; height=&quot;395&quot; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Carts &amp;ndash; create, modify, fetc, convert to purchase order&lt;/li&gt;
&lt;li&gt;Customers &amp;ndash; create, update, set password etc&lt;/li&gt;
&lt;li&gt;Inventory &amp;ndash; get status per SKU&lt;/li&gt;
&lt;li&gt;Markets &amp;ndash; get markets with all their settings such as languages, currencies, payments etc&lt;/li&gt;
&lt;li&gt;Payments &amp;ndash; fetch payment methods, assign to carts, process payments etc&lt;/li&gt;
&lt;li&gt;Pricing &amp;ndash; get different price options for a SKU&lt;/li&gt;
&lt;li&gt;Warehouse &amp;ndash; get available warehouses&lt;/li&gt;
&lt;li&gt;Orders &amp;ndash; search orders, update orders etc&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation and configuration&lt;/h2&gt;
&lt;p&gt;1. Install the nuget package from: &lt;br /&gt;&lt;a href=&quot;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&quot; title=&quot;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&quot;&gt;https://nuget.optimizely.com/package/?id=EPiServer.ContentDeliveryApi.Commerce&amp;nbsp;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Add the API configuration to your startup.cs:&lt;br /&gt;You need to set services.AddCommerceApi&amp;lt;SiteUser&amp;gt;(...) and services.AddOpenIDConnect&amp;lt;SiteUser&amp;gt;(...). &lt;br /&gt;Refer to Foundation code for example implementation (yes, the API is already installed in Foundation):&lt;br /&gt;&lt;a href=&quot;https://github.com/episerver/Foundation/blob/main/src/Foundation/Startup.cs&quot; title=&quot;https://github.com/episerver/Foundation/blob/main/src/Foundation/Startup.cs&quot;&gt;https://github.com/episerver/Foundation/blob/main/src/Foundation/Startup.cs&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Test using Postman&lt;/h2&gt;
&lt;p&gt;Let&#39;s see this in action using Postman. We will use the Cart API in our demo together with the existing APIs for login and fetching a variant/SKU.&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The scenario is to login as a customer&lt;/li&gt;
&lt;li&gt;Find a product (SKU)&lt;/li&gt;
&lt;li&gt;Add it to cart&lt;/li&gt;
&lt;li&gt;And then convert the cart to a purchase order&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;API reference:&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;You can find the v3 API reference here:&amp;nbsp;&lt;br /&gt;&lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/content-delivery-class-libraries-and-apis&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/content-delivery-class-libraries-and-apis&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/content-delivery-class-libraries-and-apis&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;1. Login and create token:&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;POST:&lt;/strong&gt; https://{{siteurl}}/api/episerver/connect/token/&lt;br /&gt;(See &lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/api-authentication&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/api-authentication&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/api-authentication&lt;/a&gt;)&amp;nbsp;&lt;br /&gt;&lt;strong&gt;Body:&lt;/strong&gt; grant_type, client_id, username, password &lt;br /&gt;&lt;strong&gt;Response:&lt;/strong&gt; access_token&lt;br /&gt;&lt;img alt=&quot;1-login.png&quot; src=&quot;/link/6dfdb5e5c1b749c6817dce8c8290142e.aspx&quot; width=&quot;900&quot; height=&quot;570&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;2. Get variant to add to cart&lt;/h3&gt;
&lt;p&gt;To add a variant to cart you need the Guid for the variant/SKU.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;GET:&lt;/strong&gt; https://{{siteurl}}/api/episerver/v3.0/search/content/{{searchterm}}&lt;br /&gt;(See &lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/content-delivery-api-and-commerce&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/content-delivery-api-and-commerce&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/docs/content-delivery-api-and-commerce&lt;/a&gt;)&amp;nbsp;&lt;br /&gt;&lt;strong&gt;Header:&lt;/strong&gt; Authorization with value &amp;ldquo;Bearer &amp;lt;access_token&amp;gt;&amp;rdquo;&lt;br /&gt;&lt;strong&gt;Response:&lt;/strong&gt; The variant as Json&lt;br /&gt;&lt;img alt=&quot;2-get-variant.png&quot; src=&quot;/link/8b1b3245064544dfa11d68b3f997082e.aspx&quot; width=&quot;900&quot; height=&quot;575&quot; /&gt;&lt;br /&gt;In this example we use the ID of first Variant/SKU of the Jodphur boot (50__CatalogContent), which is available in the Mosey Fashion Foundation site. &lt;br /&gt;We get the Guid &quot;8709E541-11F6-40D5-B488-800B961A1197&quot; back.&lt;/p&gt;
&lt;h3&gt;3. Create cart with line item&lt;/h3&gt;
&lt;p&gt;When updating a cart, the full cart needs to be posted. In a future release we will hopefully be able to update just a single line item. &lt;br /&gt;&lt;strong&gt;POST:&lt;/strong&gt; https://{{siteurl}}/api/episerver/v3.0/me/carts &lt;br /&gt;The /me/carts/ endpoint will create a cart for myself.&lt;br /&gt;(See &lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_mepostby&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_mepostby&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_mepostby&lt;/a&gt;)&lt;br /&gt;&lt;strong&gt;Header&lt;/strong&gt;: Authorization with value &amp;ldquo;Bearer &amp;lt;access_token&amp;gt;&amp;rdquo; &lt;br /&gt;&lt;strong&gt;Body:&lt;/strong&gt; Cart Json, see image and code below. Name, market, currency and shippingMethodId are mandatory to create a cart, but to create an order from it we also need a shipment with a lineitem. &lt;br /&gt;&lt;strong&gt;Response:&lt;/strong&gt; Our new cart created&amp;nbsp;&lt;br /&gt;&lt;img alt=&quot;3-create-cart1.png&quot; src=&quot;/link/3825bd4364834d25b04968ba8b1c1dfa.aspx&quot; width=&quot;900&quot; height=&quot;570&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=&quot;3-create-cart2.png&quot; src=&quot;/link/20ab67b003a04178beeca8e504af14d9.aspx&quot; width=&quot;900&quot; height=&quot;575&quot; /&gt;&lt;br /&gt;You now have a cart with ID 9 above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cart Json to post:&lt;/strong&gt; &lt;br /&gt;The contentId is from the Jodphur Boot and shippingMethodId is from the US standard shipping. Code belongs to the Jodphur Boot SKU as well.&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code&gt;{ 
    name: &quot;Default&quot;, market: &quot;US&quot;, currency: &quot;USD&quot;, 
    
    &quot;shipments&quot;: [
    {
        &quot;lineItems&quot;: [
        {
          &quot;quantity&quot;: 1,
          &quot;code&quot;: &quot;SKU-39813617&quot;,
          &quot;contentId&quot;: &quot;8709E541-11F6-40D5-B488-800B961A1197&quot;,
          &quot;placedPrice&quot;: 100
        }
      ],
      &quot;shippingMethodId&quot;: &quot;72457670-c12d-4270-9b31-1ad06743b7c0&quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can now find the cart in Order Management / CSR UI:&amp;nbsp;&lt;br /&gt;&lt;img alt=&quot;3-cart-csrui.png&quot; src=&quot;/link/59f5f62e797842b4baa2f9c176424b46.aspx&quot; width=&quot;900&quot; height=&quot;523&quot; /&gt;&lt;br /&gt;The shippingMethod used for the cart:&lt;br /&gt;&lt;img alt=&quot;3-shippingmethod.png&quot; src=&quot;/link/9e09ae2aac7e4a91a39d408968e2f9a4.aspx&quot; width=&quot;900&quot; height=&quot;498&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;3b. Get cart&lt;/h3&gt;
&lt;p&gt;When you want to fetch this cart again for display or to modify. Set the cartid in the url. &lt;br /&gt;&lt;strong&gt;GET:&lt;/strong&gt; https://{{siteurl}}/api/episerver/v3.0/me/carts/9&lt;br /&gt;(See &lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_megetbycartid&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_megetbycartid&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_megetbycartid&lt;/a&gt;)&lt;br /&gt;&lt;strong&gt;Header:&lt;/strong&gt; Authorization with value &amp;ldquo;Bearer &amp;lt;access_token&amp;gt;&amp;rdquo; &lt;br /&gt;&lt;strong&gt;Response:&lt;/strong&gt; The cart as Json&lt;/p&gt;
&lt;h3&gt;4. Convert cart to order&lt;/h3&gt;
&lt;p&gt;You now have a cart with ID 9, this can now be converted to a Purchase Order. &lt;br /&gt;Set the cartId in the url. &lt;br /&gt;&lt;strong&gt;POST:&lt;/strong&gt; https://{{siteurl}}/api/episerver/v3.0/me/carts/9/converttoorder&lt;br /&gt;(See &lt;a href=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_meconverttoorderbycartid&quot; title=&quot;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_meconverttoorderbycartid&quot;&gt;https://docs.developers.optimizely.com/content-management-system/v1.5.0-content-delivery-api/reference/cartapi_meconverttoorderbycartid&lt;/a&gt;)&lt;br /&gt;&lt;strong&gt;Header:&lt;/strong&gt; Authorization with value &amp;ldquo;Bearer &amp;lt;access_token&amp;gt;&amp;rdquo;&lt;br /&gt;&lt;strong&gt;Response:&lt;/strong&gt; Our new order created&lt;br /&gt;&lt;img alt=&quot;4-create-order.png&quot; src=&quot;/link/6a28cece2d704e2583723a7a259d5be6.aspx&quot; width=&quot;900&quot; height=&quot;578&quot; /&gt;&lt;br /&gt;&lt;br /&gt;You now have a Purchase order with order number PO9122.&lt;br /&gt;&lt;img alt=&quot;4-order-csrui1.png&quot; src=&quot;/link/1f794e1a07854e958cb3367cb621d677.aspx&quot; width=&quot;900&quot; height=&quot;444&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=&quot;4-order-csrui2.png&quot; src=&quot;/link/29a3037ea5954b2da0ab75b6e4c98473.aspx&quot; width=&quot;900&quot; height=&quot;445&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;This was a short intro to the REST Cart API for Customized Commerce. Hope you found it useful and that it gives you some input and ideas of also how to use the other new APIs available.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Feedback?&lt;/h2&gt;
&lt;p&gt;Please leave a comment, or feel free to post any feedback and suggestions of improvements in our feedback portal:&amp;nbsp;&lt;br /&gt;&lt;a href=&quot;https://feedback.optimizely.com/?project=COM&quot; title=&quot;https://feedback.optimizely.com/?project=COM&quot;&gt;https://feedback.optimizely.com/?project=COM&lt;/a&gt;&amp;nbsp;&lt;/p&gt;</description>            <guid>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2023/5/improved-headless-functionality-in-customized-commerce/</guid>            <pubDate>Thu, 25 May 2023 22:26:25 GMT</pubDate>           <category>Blog post</category></item><item> <title>Get started with Episerver Perform for personalized product recommendations</title>            <link>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2017/11/get-started-with-episerver-perform-for-personalized-product-recommendations/</link>            <description>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;&lt;span&gt;This year, Episerver has released a new suite of personalization products &lt;/span&gt;&lt;span&gt;combining machine learning, artificial intelligence, and statistical analysis&lt;/span&gt;&lt;span&gt;. The suite includes Episerver Perform, Episerver Reach, Episerver Advance (beta out Q1 2018), Episerver Insight (beta out now) and Personalized Find. All of them are SaaS services.&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Personalization has been around a long time in Episerver based on visitor groups. Now the personalization is brought to the individual level. As a visitor to an e-commerce site, you now get automatic product recommendations based on behaviour. This part of our new Personalization suite is called Episerver Perform and is covered in this blog post.&lt;/p&gt;
&lt;p&gt;The product recommendations are based on machine learning and behavioural data. Reports today show that visitors want personalization as part of their shopping experience, and that this in turn increases the revenue of the site.&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;Create an account and get on-boarded&lt;/h2&gt;
&lt;p&gt;First of all, as a partner you can email &lt;a href=&quot;mailto:personalization@episerver.com&quot;&gt;personalization@episerver.com&lt;/a&gt;&amp;nbsp;to get a free demo/test account. Pricing for Episerver Perform is based on traffic, just as our DXC Service, so you only pay for what you need. For a quote contact your partner or customer manager at Episerver.&lt;/p&gt;
&lt;p&gt;There is an on-boarding process included before the implementation takes start where Episerver together with you review your site and set up strategies for the recommendations. Our team have deep knowledge of how to setup strategies based on your goals.&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;How does it work?&lt;/h2&gt;
&lt;p&gt;The personalization process can be described in three parts:&lt;/p&gt;
&lt;p&gt;1. Capture - data is submitted to Episerver Perform by sending product data as well as behaviour data such as clicks, carts, orders&lt;/p&gt;
&lt;p&gt;2. Analyse - our algorithms analyse product data and customer profiles&lt;/p&gt;
&lt;p&gt;3. Visualize - relevant recommendations are sent to the right visitors&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;Installation and setup&lt;/h2&gt;
&lt;p&gt;There are different ways to integrate Episerver Perform on the site. If you are running Episerver Commerce v11.3 or later there is a native integration supported by adding a nuget package to the site. This gives many advantages and is fast to get started with as the basic job is already done.&lt;/p&gt;
&lt;p&gt;If you use an older version of Episerver Commerce, there is a Javascript API and a server-based API to use, but requires more work than the native API. Below will focus on the native integration &lt;em&gt;(a&lt;/em&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&amp;nbsp;native version of the Javascript API will also be released).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Get the nuget packages from here:&lt;br /&gt;&lt;a href=&quot;http://nuget.episerver.com/en/?search=EPiServer.Personalization.Commerce&quot;&gt;&lt;span&gt;http://nuget.episerver.com/en/?search=&lt;/span&gt;&lt;span&gt;EPiServer.Personalization.Commerce&lt;/span&gt;&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the package was earlier called &quot;EPiServer.Recommendations.Commerce&quot; in the beta version, supported from Commerce v10.4. If you already are using this version you need to update to the new version.&amp;nbsp;See&amp;nbsp;Gustavs&amp;nbsp;blog post for more details regarding the new nuget packages and their updates.&amp;nbsp;&lt;br /&gt;&lt;a href=&quot;/link/a074a9b3cccd4e3494ff44c86188aa6f.aspx&quot;&gt;https://world.episerver.com/blogs/the-episerver-personalization-blog/dates/2017/11/new-nuget-packages-for-our-episerver-personalization-suite/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The package will add a couple of appsettings, where you need to configure your account details such as site url and security token.&lt;br /&gt;&lt;a href=&quot;/link/86a5c5639e3f4892aed28c6766d5bc77.aspx#Installingandconfiguring&quot;&gt;http://world.episerver.com/documentation/developer-guides/commerce/personalization/recommendations/#Installingandconfiguring&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It also creates the scheduled job which will export the product data from Episerver Commerce to Episerver Perform.&amp;nbsp; If you want to customize the export, this is also possible using the new nuget package.&lt;br /&gt;&lt;a href=&quot;/link/021481efb63f498bac622eb74ec70041.aspx&quot;&gt;http://world.episerver.com/documentation/developer-guides/commerce/personalization/customizing-exported-product-information/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;Start tracking&lt;/h2&gt;
&lt;p&gt;Then you need to add the recommendations to your templates and start tracking visitor behaviour and actions such as pages visited, adding to cart, creating orders etc.&lt;/p&gt;
&lt;p&gt;By default, Episerver Perform comes with tracking types and widgets for the Home, Product, Search, Category, and Basket pages. Tracking types describe the various actions that visitors can track (more tracking types are available and can be added to the account).&lt;/p&gt;
&lt;p&gt;Widgets describe how recommendations should be displayed. For the various recommendations, the on-boarding process sets out the strategies that apply to each widget. Usually you are working with different strategies on the different pages.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Strategies can for example for the Home page (Start page) be targeted on abandoned or visited products or cross sells on earlier orders. On the Category pages recommendations could for example be items linked to browsing in category or emerging and bestseller products in category. All strategies are based on a set of different algorithms built in to Episerver Perform.&lt;/p&gt;
&lt;p&gt;On the Product page, there are two widgets included in the standard package. Strategies for the Product page are often setup as matching or alternative products. For a fashion site, it could also be popular cross sells. On the Basket or Checkout page recommendations are often setup as items linked to basket items or items of lower value to push the customer over the limit for free shipping.&lt;/p&gt;
&lt;p&gt;Based on the strategies given the recommendation engine will give relevant suggestions for all visitors based on their individual behaviour!&lt;/p&gt;
&lt;p&gt;As described above, the exact strategies are defined per site as part of the on-boarding process. The strategies can then be changed or updated as time goes on.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/3d08700d692944699294f4e252253435.aspx&quot; width=&quot;800&quot; alt=&quot;Image perform-recommendations.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tracking can be done both by adding a tracking attribute to the controller actions and by calling the tracking service directly. Tracking of specific actions needs to be done by calling the tracking service, for example adding to cart, or creating an order. Tracking of browsing a category or a product is easiest &lt;/span&gt;&lt;span&gt;achieved &lt;/span&gt;&lt;span&gt;by just adding the tracking attribute to the controller.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;See examples for more details:&lt;br /&gt;&lt;a href=&quot;/link/86a5c5639e3f4892aed28c6766d5bc77.aspx#Trackingandrecommendations&quot;&gt;http://world.episerver.com/documentation/developer-guides/commerce/personalization/recommendations/#Trackingandrecommendations&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Our demo site Quicksilver found on Github has all this functionality already included to start from.&lt;br /&gt;&lt;a href=&quot;https://github.com/episerver/Quicksilver&quot;&gt;https://github.com/episerver/Quicksilver&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;Reports and merchandizing capabilities&lt;/h2&gt;
&lt;p&gt;From the Personalization Portal (menu integration in CMS to be released soon) you get various types of reports on orders, revenue, products sold and much more based on the recommendations given from Episerver Perform.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/9db480c4221141abb12d43757d8de8df.aspx&quot; width=&quot;800&quot; alt=&quot;Image perform-dashboard.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are statistics based on page types (tracking types) and widgets. You can for example see which products are high converting vs low converting based on their traffic, and take different actions based on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/link/13bc50b529da42a7b8d999e34ab2d301.aspx&quot; width=&quot;800&quot; alt=&quot;Image perform-stats-converts.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;In Episerver Perform there is also a merchandizing functionality where you can override the recommendations given. For the different widgets, you can create rules that push specific products or products with specific attributes on the different positions of the recommendation widgets.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is really functionality where Episerver Performs stands out from its competitors! You can combine the &lt;/span&gt;&lt;span&gt;strength &lt;/span&gt;&lt;span&gt;of the AI with the flexibility to also do merchandizing together with the recommendations. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src=&quot;/link/5fe65574d88a4361b12b33cdb0118c2f.aspx&quot; width=&quot;800&quot; alt=&quot;Image perform-merchandizing.png&quot; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Besides the Personalization Portal, as a Episerver Personalization customer, you will also get a monthly report with a summary of the result from your personalization.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Send an email to &lt;a href=&quot;mailto:personalization@episerver.com&quot;&gt;personalization@episerver.com&lt;/a&gt;&amp;nbsp;today to start testing Episerver Perform! Or &lt;a href=&quot;http://www.episerver.com/contact/new/contact-us/&quot;&gt;contact Episerver to find out more&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This was an introduction to Episerver Perform. Episerver Reach will give you the same functionality to use in your email marketing. That will be covered in another blog post.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</description>            <guid>https://world.optimizely.com/blogs/marcus-hoffmann/dates/2017/11/get-started-with-episerver-perform-for-personalized-product-recommendations/</guid>            <pubDate>Wed, 08 Nov 2017 12:12:02 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>