November Happy Hour will be moved to Thursday December 5th.

Getting personalized content by using Content Delivery API

Z
Z
Vote:
 

Hi there. 

Im currently working on a project that exists of CMS solution and a frontend solution (SPA). We do not have any kind of serverside rendering - its completely headless, so everything is based on calls to the Content Delivery API.

Right now I am looking at visitorgroups and personalized content depending on wether the user is logged in (third-party auth) or not. 

As standard its pretty straight forward to get it working with recieving data from Content Delivery API, but I couldnt really found an example or documentation on how to call a specific version of a page for a certain visitorgroup.

Example: 

When user visits a specific page in frontend solution, we are taking the friendly url param and use it to call content delivery api: https://myepiserver.com/demo-page

and recieve this object. Inside respons below we have a mainContentArea where we take all the blocks created inside it and render them in our frontend solution where blocks corresponding to our components in frontend. 

{
    "contentLink": {
        "id": 71,
        "guidValue": "fa51a07e-6039-4472-87d6-0a1174c2c277"
    },
    "name": "demo-page",
    "language": {
        "displayName": "",
        "name": "da"
    },
    "contentType": [
        "Page",
        "StandardPage"
    ],
    "routeSegment": "demo-page",
    "mainContentArea": {
        "name": "MainContentArea",
        "value": [
            {
                "contentLink": {
                    "id": 73,
                    "guidValue": "c70383d8-13c8-4b5d-bc76-b3a16da30c9e"
                }
            }
        ],
        "propertyDataType": "PropertyContentArea"
    }
}

 What we want to achieve from here is to know if this demo-page has other versions/blocks for different visitorgroups.

Anyone out there? 

#266448
Nov 09, 2021 14:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.