{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-commission-split-audit-info-schema.json",
  "title": "CommissionSplitAuditInfo",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-commissionsplits-api-openapi.yml#/components/schemas/CommissionSplitAuditInfo",
  "allOf": [
    {
      "$ref": "#/$defs/AuditInfoOfCommissionSplitInfo"
    },
    {
      "type": "object",
      "description": "Audit info for commission split",
      "additionalProperties": false
    }
  ],
  "$defs": {
    "AuditInfoOfCommissionSplitInfo": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "entityAction"
      ],
      "properties": {
        "entityId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Required for Update and Delete. It is invalid to provide an id for a Create.",
          "format": "int32"
        },
        "entityAction": {
          "$ref": "#/$defs/EntityActionOption"
        },
        "info": {
          "description": "The information used to create or update an entity. It is invalid to provide this for a Delete.",
          "oneOf": [
            {
              "$ref": "#/$defs/DeltaOfCommissionSplitInfo"
            }
          ]
        }
      }
    },
    "CommissionSplitInfo": {
      "type": "object",
      "description": "Commission Split info",
      "additionalProperties": false,
      "properties": {
        "payeeId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The id for the payee. Example: \"5003000000D8cuIQAA\".\n\nThis id is intended for use by a caller in conjunction with the values in the `PayeeIdSource*` properties.\n            \nUniqueness is enforced over PayeeId, PayeeIdSourceType, and PayeeIdSourceEntityName as a tuple.\n            \nNOTE TO IMPLEMENTERS: If your source system potentially has multiple \"versions\" of the same ID\n(e.g. Salesforce which offers both 15-character and 18-character IDs),\nit is your responsibility to consistently use the same \"version\".",
          "maxLength": 36
        },
        "payeeIdSourceType": {
          "type": [
            "string",
            "null"
          ],
          "description": "The source type of the id used for the payee. Example: \"Salesforce\".\n\nThis id is intended for use by a caller in conjunction with the values in the `PayeeIdSource*` properties.\n            \nUniqueness is enforced over PayeeId, PayeeIdSourceType, and PayeeIdSourceEntityName as a tuple.",
          "maxLength": 32
        },
        "payeeIdSourceEntityName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the source entity of the id used for the payee. Example: \"Contact\".\n\nThis id is intended for use by a caller in conjunction with the values in the `PayeeIdSource*` properties.\n            \nUniqueness is enforced over PayeeId, PayeeIdSourceType, and PayeeIdSourceEntityName as a tuple.",
          "maxLength": 32
        },
        "commissionPeriodId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The id of the CommissionPeriod that is the parent of this record.\n\nCommissionSplit is dependent on CommissionPeriod.",
          "format": "int32"
        },
        "amount": {
          "type": [
            "number",
            "null"
          ],
          "description": "The amount to be paid to the payee.\n            \nThe amount is used with the CommissionCalculationStrategy and the CommissionCalculationStrategy.\n            \nOnly two(2) significant decimal places are supported.",
          "format": "decimal",
          "maximum": 999999.0,
          "minimum": 0.0,
          "pattern": "^\\d+\\.?\\d{0,2}$"
        },
        "generation": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Indicates the \"generation\" in which the payee's payment amount is calculated.\n\nPayments within a period are calculated by \"generation\": the amounts for payees in the generation with the smallest value are calculated first. Successive generations are calculated from the amount left after the previous generation has been calculated.\n            \nThis allows for scenarios where there is an outside producer who is paid against the gross and internal producers who are paid against the remaining amount.\n            \nGeneration zero(0) is recommended for internal producers.\n            \nIt is recommended that \"space\" be left between generation values(e.g. -200, -100, 0) so that the addition of a generation between two existing generations does not require modifying those records.",
          "format": "int32",
          "default": 0,
          "maximum": 0.0,
          "minimum": -2147483648.0
        }
      }
    },
    "DeltaOfCommissionSplitInfo": {
      "type": "object",
      "description": "A wrapper for values to be used for updating or creating a record.",
      "additionalProperties": false,
      "properties": {
        "updateOrCreateInformation": {
          "description": "The information to use for updating or creating.  Null values are ignored.",
          "oneOf": [
            {
              "$ref": "#/$defs/CommissionSplitInfo"
            }
          ]
        }
      }
    },
    "EntityActionOption": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Create",
        "Update",
        "Delete"
      ],
      "enum": [
        "Create",
        "Update",
        "Delete"
      ]
    }
  }
}