dealFields data mandatory_flag should be boolean?

Mandatory flag data value
found unconsistent across all deal files api

“mandatory_flag”: true

   "mandatory_flag": {
            "person_id": "<=0"
        },

and

“mandatory_flag”: {
“status”: “=lost”
},
“bulk_edit_allowed_conditions”: {
“status”: “=lost”
}

Hello @bidyut.kalita1!

Indeed in some dealFields responses the mandatory_flag field is not true/false.

If there is no person attached to the deal, then organization is mandatory:
mandatory_flag: "{org_id: '<=0'}"
When there’s no organization attached to the deal, then person is mandatory:
mandatory_flag: "{person_id: '<=0'}"

The below example is returned in the case of a “Lost reason” dealField:

"mandatory_flag": {
"status": "=lost"
}

Do let us know in case of further questions! :slight_smile:

Can you update the Open API description to match the actual behavior? The API documentation states that the field is boolean and nothing is said about possibility of having instead of boolean value more complex structure. From the easy of working with the API (especially if you use statically typed languages and deserialize json output to your data class) it’s better to keep the fields separately.

For instance:

mandatory_flag: true,
mandatory_flag_precondition: {person_id: "<=0"}

where mandatory_flag_precondition is nullable field.