{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/zoho/main/json-schema/zoho-rule-group-response-schema.json",
  "title": "RuleGroupResponse",
  "description": "Rulegroup Response template",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoho-rulegroup-api-openapi.yml#/components/schemas/RuleGroupResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "createdTime": {
      "type": "string",
      "format": "date-time"
    },
    "modifiedTime": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "photoURL": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "modifiedBy": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "photoURL": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "engine": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "systemName": {
          "type": "string"
        }
      }
    },
    "module": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "apiName": {
          "type": "string"
        },
        "displayLabel": {
          "type": "string"
        }
      }
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sysName": {
            "type": "string"
          },
          "displayLabel": {
            "type": "string"
          },
          "userCriteria": {
            "type": "object",
            "properties": {
              "moduleMapping": {
                "type": "object",
                "properties": {
                  "primaryModule": {
                    "type": "object",
                    "properties": {
                      "apiName": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "criteria": {
                "$ref": "./Criteria.json#/components/schemas/criteriaFieldsObject"
              }
            }
          }
        }
      }
    },
    "departmentProperties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ruleGroupStatus": {
            "type": "string"
          },
          "ruleGroupOrder": {
            "type": "string"
          },
          "ruleGroupExecutionType": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "ruleGroupExecutionType",
          "ruleGroupOrder",
          "ruleGroupStatus"
        ]
      }
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "order": {
            "type": "integer"
          },
          "criteria": {
            "type": "object"
          },
          "cluster": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                },
                "createdTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "modifiedBy": {
                  "type": "string"
                },
                "modifiedTime": {
                  "type": "string",
                  "format": "date-time"
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "executionType": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "propertyType": {
                        "type": "string"
                      },
                      "propertyId": {
                        "type": "string"
                      },
                      "entityInfo": {
                        "type": "object",
                        "properties": {
                          "actionMappingId": {
                            "type": "string"
                          },
                          "actionId": {
                            "type": "string"
                          },
                          "actionType": {
                            "type": "string"
                          },
                          "actionParamMappings": {
                            "type": "object"
                          }
                        }
                      },
                      "childNodes": {
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/items"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}