Update Audience Filter

Update Audience Filter API is used to update an existing Audience Filter.

Here are the steps and API endpoints to Update Audience Filter in the Accelevents platform.

📘

Required

  • User should have login credentials with Admin/ Super Admin Role or needs host side Access.

Calling these following API sequence will help you to update Audience Filter in our platform

StepDescriptionAPI Reference
Get Master Json to set Form FieldsGet Available Fields and their value options.

This API will provide you JSON data in which there will be field like type ,field
Get Master JSON
Update Audience FilterThis API will be used to update an Audience Filter.
In Response, the Long value of created filter id will be returned.
Update Audience Filter

1. Get Master JSON

This API used to get Configure Json that includes filter type, field, value type.
API used at host side by event admin and super admin can access this API. It will return data in JSON.

2. update Audience Filter

This API is used to create an Audience Filter.
In Response, there will be Id of that created filter.

Here is a sample for Request Body of filter json which will send to API.

{
  "filterJson": {
    "date": {
      "startDate": "",
      "endDate": "",
      "format": "MM-DD-YYYY"
    },
    "conditionalOperator": "all",
    "conditions": [
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "columnName": "firstName",
          "columnValue": "Test",
          "operator": "CONTAINS",
          "dataType": "string"
        },
        "filterName": "profile"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "dataType": "string",
          "operator": "CONTAINS",
          "columnName": "lastName",
          "columnValue": "Test"
        },
        "filterName": "profile"
      }
    ]
  }
}
{
  "filterJson": {
    "date": {
      "startDate": "",
      "endDate": "",
      "format": "MM-DD-YYYY"
    },
    "conditionalOperator": "all",
    "conditions": [
      {
        "type": "single",
        "condition": {
          "isInstance": true,
          "columnName": "firstName",
          "columnValue": "Test",
          "operator": "CONTAINS",
          "dataType": "string",
          "instanceName": "purchaser"
        },
        "filterName": "register"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": true,
          "dataType": "string",
          "operator": "CONTAINS",
          "columnName": "firstName",
          "columnValue": "Test",
          "instanceName": "ticketHolder"
        },
        "filterName": "register"
      }
    ]
  }
}
{
  "filterJson": {
    "date": {
      "startDate": "",
      "endDate": "",
      "format": "MM-DD-YYYY"
    },
    "conditionalOperator": "all",
    "conditions": [
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "columnName": "sessionid",
          "columnValue": "11257",
          "operator": "IS",
          "dataType": "number",
          "mappedValue": "new test session (second-audience-org )",
          "attribute": [
            {
              "columnName": "eventid",
              "isInstance": false,
              "operator": "IS",
              "dataType": "number",
              "columnValue": "5309",
              "mappedValue": "first-event-audience",
              "mappingKey": "eventName",
              "mappingDataType": "string"
            }
          ],
          "mappingKey": "joinedsession",
          "mappingDataType": "string"
        },
        "filterName": "engagement"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "dataType": "string",
          "operator": "CONTAINS",
          "columnName": "likepost",
          "columnValue": "aa"
        },
        "filterName": "engagement"
      }
    ]
  }
}
{
  "filterJson": {
    "date": {
      "startDate": "",
      "endDate": "",
      "format": "MM-DD-YYYY"
    },
    "conditionalOperator": "all",
    "conditions": [
      {
        "type": "group",
        "conditionalOperator": "all",
        "conditions": [
          {
            "type": "single",
            "condition": {
              "isInstance": false,
              "columnName": "firstName",
              "columnValue": "Test",
              "operator": "CONTAINS",
              "dataType": "string"
            },
            "filterName": "profile"
          },
          {
            "type": "single",
            "condition": {
              "isInstance": false,
              "dataType": "string",
              "operator": "CONTAINS",
              "columnName": "lastName",
              "columnValue": "Test"
            },
            "filterName": "profile"
          },
          {
            "type": "single",
            "condition": {
              "isInstance": true,
              "columnName": "firstName",
              "columnValue": "Test",
              "operator": "CONTAINS",
              "dataType": "string",
              "attribute": [
                {
                  "columnName": "eventid",
                  "isInstance": false,
                  "operator": "IS",
                  "dataType": "number",
                  "columnValue": "5309",
                  "mappedValue": "first-event-audience",
                  "mappingKey": "eventName",
                  "mappingDataType": "string"
                }
              ],
              "instanceName": "purchaser"
            },
            "filterName": "register"
          }
        ]
      }
    ]
  }
}
{
  "filterJson": {
    "date": {
      "startDate": "",
      "endDate": "",
      "format": "MM-DD-YYYY"
    },
    "conditionalOperator": "all",
    "conditions": [
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "columnName": "firstName",
          "columnValue": "Test",
          "operator": "CONTAINS",
          "dataType": "string"
        },
        "filterName": "profile"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": true,
          "columnName": "firstName",
          "columnValue": "Test",
          "operator": "CONTAINS",
          "dataType": "string",
          "instanceName": "purchaser"
        },
        "filterName": "register"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": true,
          "dataType": "string",
          "operator": "CONTAINS",
          "columnName": "firstName",
          "columnValue": "Test",
          "instanceName": "ticketHolder"
        },
        "filterName": "register"
      },
      {
        "type": "single",
        "condition": {
          "isInstance": false,
          "columnName": "sessionid",
          "columnValue": "11257",
          "operator": "IS",
          "dataType": "number",
          "mappedValue": "new test session (second-audience-org )",
          "mappingKey": "joinedsession",
          "mappingDataType": "string"
        },
        "filterName": "engagement"
      }
    ]
  }
}