[BulkTrackAPI] Duplicate profiles created

Found in

EPiServer.Profiles.Client 1.7.0

Fixed in

EPiServer.Profiles.Client 1.8.0

Created

Nov 07, 2018

Updated

May 03, 2019

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Send the below content via bulk track API.

[{
            "DeviceId": "demo4",
            "EventType": "demo4",
            "Value": "demo4",
            "Scope": "9bec7f88-c235-4c93-8363-3a741810f9e8",
            "CountryCode": "VN",
            "PageUri": "/en/fashion/womens/womens-tees/p-39745548/",
            "PageTitle": "demo4",
            "RemoteAddress": "103.37.29.106",
            "Payload": {
                "channel": "web",
                "type": "home",
                "ip": "103.37.29.106",
                "session": "new",
                "cuid": "189096200|d5vhxXKVCBBFheMxHZ2tQyi2m25f4r3Zeukm-6RkE64",
                "lang": "en",
                "customAttributes": {},
                "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0"
            },
            "User": {
                "Name": "demo4@example.com",
                "Email": "demo4@example.com"
            }
        },
        {
            
            "DeviceId": "demo4",
            "EventType": "basket",
           
            "Value": "Modified the cart.",
            "Scope": "9bec7f88-c235-4c93-8363-3a741810f9e8",
            "CountryCode": "VN",
            "PageUri": "/Cart/AddToCart",
            "PageTitle": "basket",
            "RemoteAddress": "103.37.29.106",
            "Payload": {
                "channel": "web",
                "basket": {
                    "items": [
                        {
                            "qty": 1,
                            "price": 11.6,
                            "variant": {
                                "sku": "SKU-39745548"
                            },
                            "refCode": "P-39745548"
                        }
                    ],
                    "currency": "USD"
                },
                "type": "basket",
                "ip": "103.37.29.106",
                "session": "132070150|kXOtQFQd9iVX2Tj5puEGaYEk8C1Ngo81s20bVXbFvVU",
                "cuid": "189466850|DA1AzwQ3dkUrQqZlhCxAoQ",
                "lang": "en",
                "smartProducts": [],
                "customAttributes": {
                    "marketId": "US"
                },
                "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
             
            },
            "User": {
                "Name": "demo4@example.com",
                "Email": "demo4@example.com"
            }
        },
        {
            "DeviceId": "demo4",
            "EventType": "checkout",
            
            "Value": "Visited the checkout page.",
            "Scope": "9bec7f88-c235-4c93-8363-3a741810f9e8",
            "CountryCode": "VN",
            "PageUri": "http://huphqs.azurewebsites.net/en/checkout/",
            "PageTitle": "Checkout",
            "RemoteAddress": "103.37.29.106",
            "Payload": {
                "checkout": {
                    "subtotal": 137.6,
                    "shipping": 40,
                    "total": 177.6,
                    "items": [
                        {
                            "qty": 1,
                            "price": 11.6,
                            "variant": {
                                "sku": "SKU-39745548"
                            },
                            "refCode": "P-39745548"
                        },
                        {
                            "qty": 1,
                            "price": 5.5,
                            "variant": {
                                "sku": "SKU-39672546"
                            },
                            "refCode": "P-39672546"
                        },
                        {
                            "qty": 3,
                            "price": 26.8,
                            "variant": {
                                "sku": "SKU-39850363"
                            },
                            "refCode": "Product1_1"
                        },
                        {
                            "qty": 1,
                            "price": 6,
                            "variant": {
                                "sku": "SKU-36181494"
                            },
                            "refCode": "P-36181494"
                        },
                        {
                            "qty": 1,
                            "price": 11.6,
                            "variant": {
                                "sku": "SKU-36127195"
                            },
                            "refCode": "P-36127195"
                        },
                        {
                            "qty": 1,
                            "price": 4.5,
                            "variant": {
                                "sku": "SKU-39672756"
                            },
                            "refCode": "P-39672756"
                        },
                        {
                            "qty": 1,
                            "price": 4.5,
                            "variant": {
                                "sku": "SKU-39745558"
                            },
                            "refCode": "P-39745548"
                        },
                        {
                            "qty": 3,
                            "price": 4.5,
                            "variant": {
                                "sku": "SKU-39745548"
                            },
                            "refCode": "P-39745548"
                        }
                    ],
                    "currency": "USD"
                },
                "type": "checkout",
                "ip": "103.37.29.106",
                "lang": "en",
                "customAttributes": {
                    "marketId": "US"
                },
                "channel": "web",
                "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
            },
            "User": {
                "Name": "demo4@example.com",
                "Email": "demo4@example.com"
            }
        }
        ]

The first time you send the request it might not happen.

2. Click send bulk request 2 more times very fast.

3. Open Insight.

Expected:
Only 3 profiles created.

Actual:
More than 3 profiles created.

No such issue in 1.6 PROD/PREP