Neha Kumari created UNOMI-239:
---------------------------------

             Summary: Qualification of Event segment having negative condition 
                 Key: UNOMI-239
                 URL: https://issues.apache.org/jira/browse/UNOMI-239
             Project: Apache Unomi
          Issue Type: Bug
          Components: core
    Affects Versions: 1.4.0
            Reporter: Neha Kumari


Created a segment to get all visitor who perform add_to_cart event but did not 
added item with name "onePlus_mobile" in their cart.

ConditionType for  Segment:

{
    "itemId": "itemNotAddedInCartCondition",
    "itemType": "conditionType",
    "conditionEvaluator": null,
    "queryBuilder": null,
    "parentCondition": {
      "parameterValues": {
          "subConditions": [
          {
             "parameterValues": {
                 "eventTypeId": "add_to_cart"
             },
             "type": "eventTypeCondition"
          },
         {
             "parameterValues": {
                 "propertyName": "properties.item_name",
                 "propertyValue": "parameter::itemName",
                 "comparisonOperator": "notEquals"
            },
             "type": "eventPropertyCondition"
        }
      ],
     "operator": "and"
   }, 
  "type": " booleanCondition"
 },
"metadata": {
        "id": "itemNotAddedInCartCondition",
        "name": "itemNotAddedInCartCondition",
        "description": "Item not added in cart",
        "scope": "amazon",
        "tags": [],
        "systemTags": [
                "behavioral",
                "usableInPastEventCondition"
          ],
        "enabled": true,
        "missingPlugins": false,
        "hidden": false,
         "readOnly": true
 },
 "parameters": [
 {
       "id": "itemName",
        "type": "string",
        "multivalued": false,
       "defaultValue": null
  }
]}

Segment defination :

{
    "metadata": {
       "id": "onePluseMobileNotAddedInCartVisitors",
       "name": "onePluseMobileNotAddedInCartVisitors",
        "description": "user not added a paticular Item in Cart in past 30 days 
atleast 1 times                      and maximum 2 times",
        "scope": "amazon",
        "readOnly": true
     },
    "condition": {
       "parameterValues": {
       "numberOfDays": 30,
       "eventCondition": {
       "parameterValues": {
               "itemName": "onePlus_mobile"
         },
       "type": "itemNotAddedInCartCondition"
       },
      "minimumEventCount": 1,
      "maximumEventCount": 2
    },
   "type": "pastEventCondition"
   }
}

 

If a visitor perform add_to_cart event with itemName="Laptop" , visitor get 
qualified in the segment which is ideally correct.

Visitor perform another add_to_cart event with itemName = "onePlus_mobile" then 
ideally  visitor should get disqualified from the segment  but  the visitor is 
not getting disqualified.

Is my assumption is correct regarding this scenario.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to