Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am trying to use the CaseType API to create a case_type but I can not find any documentation on how to set the definition parameter. Any hints or should I just dive into the code?
It's probably actually easiest to look at the code. CRM_Case_BAO_CaseType::convertDefinitionToXML() gives the list of array elements to set, e.g.
$definition = array(
'activityTypes' => array(
'key1' => 'value1',
'key2' => 'value2',
'statuses' => array(
You can use the Api Explorer to fetch an existing case type with definition and inspect it.
Required, but never shown