Try our conversational search powered by Generative AI!

[ProfileAPI]: Profile with info identical to existing one still created without conflict error when using PUT/POST

Found in

EPiServer.Profiles.Client 1.7.0

Fixed in

EPiServer.Profiles.Client 1.8.0

(Or a related package)

Created

Dec 06, 2018

Updated

May 03, 2019

State

Closed, Fixed and tested


Description

Precondition: There are some profiles with LastSeen in last month (it only happens on profiles with LastSeen in last month, doesn't happen with Lastseen in current month)

Example: There is a profile like this:

{
    "ProfileId": "7ee1724f-d9ca-4dfe-accb-eae29b6196db",
    "Name": "oQIhikDLPc",
    "ProfileManager": null,
    "FirstSeen": "2018-11-27T09:13:04.5716338Z",
    "LastSeen": "2018-11-27T09:18:59.8576901Z",
    "Visits": 1,
    "Info": {
        "InferredCountry": "VN",
        "Email": "oQIhikDLPc@ZNZ.com"
    },
    "ContactInformation": [
        "Mailable",
        "Known"
    ],
    "DeviceIds": [
        "qdftpUk46oQ7NSD",
        "nBVtKE7W0QDQyUI"
    ],
    "Scope": "default",
    "Payload": null
}

1. Create a new profile with exactly same the profile in Precondition, like this:

POST: /api/v1.0/profiles
{
    "ProfileId": "7ee1724f-d9ca-4dfe-accb-eae29b6196db",
    "Name": "oQIhikDLPc",
    "ProfileManager": null,
    "FirstSeen": "2018-11-27T09:13:04.5716338Z",
    "LastSeen": "2018-11-27T09:18:59.8576901Z",
    "Visits": 1,
    "Info": {
        "InferredCountry": "VN",
        "Email": "oQIhikDLPc@ZNZ.com"
    },
    "ContactInformation": [
        "Mailable",
        "Known"
    ],
    "DeviceIds": [
        "qdftpUk46oQ7NSD",
        "nBVtKE7W0QDQyUI"
    ],
    "Scope": "default",
    "Payload": null
}

Expected:
Returns a 409 Conflict. Cannot create new profile successfully because of conflict DeviceId and Email.

Actual:
Returns a 201 and creates a profile successfully.

Note: It still occurs when using PUT to update/create a new profile.(If updating profile, the bugs occurs when 2 profile have both LastSeen in last month)