Personalize content does not work for segment via API

Found in

EPiServer.Profiles.Client 1.6.0

Fixed in

EPiServer.Profiles.Client 1.8.0

Created

Nov 22, 2018

Updated

May 03, 2019

State

Closed, Fixed and tested


Description

Precondition:
Config scope of site is site2
Profile with email site2@episerver.com belongs to site2 scope.

Steps to reproduce:

1. Create a segment by API with the body as below:

 
POST: /api/v1.0/segments/
{
  "Scope": "site2",
  "SegmentManager": "HoangAnhMinh",
  "ProfileQuery": "Info.Email eq site2@episerver.com",
  "AvailableForPersonalization": true,
  "Archived": false,
  "FavoredBy": [
    "string"
  ],
  "Name": "Site2",
  "Description": "Site2"
}

Observed: Segment is created successfully.

{
    "SegmentId": "d5cdf87e-9dca-4cd5-93fb-0feab2602810",
    "Scope": "site2",
    "SegmentManager": "HoangAnhMinh",
    "ProfileQuery": "Info.Email eq site2@episerver.com",
    "AvailableForPersonalization": true,
    "Archived": false,
    "FavoredBy": [
        "string"
    ],
    "Name": "Site2-bb73293396",
    "Description": "Site2",
    "CreatedDate": "2018-11-22T08:48:46.2333594Z",
    "ModifiedDate": "2018-11-22T08:48:46.2333594Z",
    "MatchingProfiles": 1
}

2. Create a Visitor group for this segment.
3. Set personalize content for this visitor group.
4. Go to site.
5. Login as user profile site2@episerver.com and view the personalized content.

Expected:
Logged user can see the personalized content

Actual:
He can not see the content.

  • Note: For the segment created via Insight, it works fine.