{
  "slug": "actions-playerzero-web",
  "name": "PlayerZero Web",
  "mode": "device",
  "authentication": {
    "scheme": "custom",
    "fields": {
      "projectId": {
        "label": "PlayerZero Project ID",
        "description": "The Project ID where you want to send data. You can find this ID on the [Project Data Collection](https://go.playerzero.app/setting/data) page.",
        "type": "string",
        "required": true,
        "multiple": false,
        "choices": null,
        "default": null,
        "depends_on": null
      }
    }
  },
  "audienceConfig": null,
  "actions": {
    "trackEvent": {
      "title": "Track Event",
      "description": "Track events",
      "platform": "web",
      "defaultSubscription": "type = \"track\"",
      "hidden": false,
      "hasPerformBatch": false,
      "syncMode": null,
      "hooks": null,
      "dynamicFields": null,
      "fields": {
        "name": {
          "label": "Event name",
          "description": "The name of the event.",
          "type": "string",
          "required": true,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.event"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        },
        "properties": {
          "label": "Properties",
          "description": "A JSON object containing more information about the event.",
          "type": "object",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.properties"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        }
      }
    },
    "identifyUser": {
      "title": "Identify User",
      "description": "Sets the user identity",
      "platform": "web",
      "defaultSubscription": "type = \"identify\"",
      "hidden": false,
      "hasPerformBatch": false,
      "syncMode": null,
      "hooks": null,
      "dynamicFields": null,
      "fields": {
        "userId": {
          "label": "User ID",
          "description": "The user's id",
          "type": "string",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.userId"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        },
        "anonymousId": {
          "label": "Anonymous ID",
          "description": "The user's anonymous id",
          "type": "string",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.anonymousId"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        },
        "name": {
          "label": "Display Name",
          "description": "The user's name",
          "type": "string",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.traits.name"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        },
        "email": {
          "label": "Email",
          "description": "The user's email",
          "type": "string",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.traits.email"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        },
        "traits": {
          "label": "Traits",
          "description": "The Segment traits to be included as metadata in PlayerZero",
          "type": "object",
          "required": false,
          "multiple": false,
          "allowNull": false,
          "dynamic": false,
          "default": {
            "@path": "$.traits"
          },
          "choices": null,
          "placeholder": null,
          "properties": null,
          "category": null,
          "depends_on": null,
          "readOnly": null,
          "hidden": null,
          "minimum": null,
          "maximum": null,
          "defaultObjectUI": null,
          "disabledInputMethods": null,
          "displayMode": null,
          "format": null,
          "additionalProperties": false
        }
      }
    }
  },
  "presets": [
    {
      "name": "Track Event",
      "type": "automatic",
      "partnerAction": "trackEvent",
      "subscribe": "type = \"track\"",
      "mapping": {
        "name": {
          "@path": "$.event"
        },
        "properties": {
          "@path": "$.properties"
        }
      },
      "eventSlug": null
    },
    {
      "name": "Identify User",
      "type": "automatic",
      "partnerAction": "identifyUser",
      "subscribe": "type = \"identify\"",
      "mapping": {
        "userId": {
          "@path": "$.userId"
        },
        "anonymousId": {
          "@path": "$.anonymousId"
        },
        "name": {
          "@path": "$.traits.name"
        },
        "email": {
          "@path": "$.traits.email"
        },
        "traits": {
          "@path": "$.traits"
        }
      },
      "eventSlug": null
    }
  ]
}
