This document explains the possibilities and limitations of using REST calls to create a ticket which Category or Request Area contains Properties.
Note it is not proposed to provide a sample code to address this request.
Is it possible to add Request Area or Category Properties to a ticket created via REST call?
CA Service Desk Manager (SDM) r12.7, 12.9, 14.x
In theory it is possible by following these rules:
- After creation of a ticket, the properties should be there (existent) already, based on the definition of the Ticket Area/Category, which already has the Properties previously set. This implies that you don't have to create them, as SDM will create them for you.
- Now that the Properties were created, you need to find them. At this point you can use REST to get their persistent_id, and label, and set the values.
However, if you have Mandatory properties in the Request Area, the ticket creation may fail if the mandatory ones don't have a default value.
In face of that, you could have the mandatory properties with a default value set.
But this could cause another problem: uses who open the cases via SDM interface using these categories would not fill the correct values (which would then cause a problem related to the customer's process of creating tickets).
One possible solution would be to create a Web Services object to then include it in Rest and then access the information.
One way to set a default for a property is to create a property validation rule. In the Property Value List, there is a "Set Default" button, such as for a Validation Rule Type that is set to Dropdown. The docops page that describes "Create Property Validation Rules" is at this link:
For guidance on creating codes to manipulate the data, you should go to the Service Management group in the CA Communities site.