Skip to main content

Cherwell: Insert Record

Description

Use the step to create a record in a particular Cherwell Business Object (forms). It creates a new record with for the provided form name and field values on specified Cherwell Server. It returns the Public ID/RecID and Result as output.

Configurations

Step name: Specify a unique name for the step.

CONNECTION
Field nameDescription
URLSpecify URL to access Cherwell.
The field is mandatory.
Username Specify the Cherwell username.
The field is mandatory.
Password
Accept value as variable/staticSpecify or select the password, as required.
If the Accept Value as variable/static checkbox is selected, then the password field appears as a text box and accepts static or variable values.
OR
If the Accept Value as variable/static checkbox is clear, then the password field appears as a dropdown in which you can select a field from the previous steps.
Client IDSpecify a Cherwell Client ID. The Client ID is used to communicate with the Cherwell instance.
The field is mandatory.
Note:
CSM Administrator (Orange client) and CSM client (Blue client) tools can be installed for administration and development purposes. Generate a Cherwell client ID from Orange Client using the navigation, CSM Administrator tool → Security → REST API client.
Test ConnectionClick to verify if the connection is available or not. If no values are provided or some values are missing, then it will display the validation error message.
For verification purpose, the fields coming from previous steps are not allowed since field values can only be accessed when workflow is in Running state. Static values and environment variables are allowed.
INPUT tab:Input Fields
Form NameSpecify the Cherwell form name or business object from which the record details will be fetched.
The field is mandatory.
Get FormsClick to populate the forms of the connected Cherwell Server depending on access or permissions of the user. If any required field values are missing, then it will display validation error message.
Select a form to populate the Form Name field.
Accept fields as JSONSelect the checkbox to accept field names as JSON input.
Important:
The JSON field is available only if the checkbox is selected.
JSON

Choose a field containing the JSON text. JSON text should contain key-value pairs enclosed by double quotes (“) enclosure. Provide all the required or mandatory fields as well as other fields to be inserted as as keys in the JSON.
Note:
The JSON could be from any input step such as Generate rows, Text File input, Excel Input, and so on. In Cherwell steps JSON text can only be accepted from input fields from previous steps and not as files directly.
Following is a sample JSON for inserting a record in Knowledge Article form. The JSON text has five key-value pairs denoting fields and their values to populate five fields. In the Cherwell instance Service and Title are mandatory for Knowledge Article Business Object.
Note:
Lookup field values must exactly match existing values in the Cherwell instance.
JSON text:

json
[
[
{
"displayName": "Service",
"value": "IT Service Desk"
},
{
"displayName": "Title",
"value": "Test_KA5"
},
{
"displayName": "Category",
"value": "Request Help"
},
{
"displayName": "SubCategory",
"value": "Submit Service Request"
},
{
"displayName": "Keywords",
"value": "Test for KA"
},
{
"displayName": "Visible to Customer Portal",
"value": "False"
},
{
"displayName": "Article Type",
"value": "How To"
}
]
]

Following is a sample JSON for inserting a record in Incident form. The JSON text has five key-value pairs denoting fields and their values to populate three fields. In the Cherwell instance Description, Short Description, Priority, Owned By, and Customer ID are mandatory for Incident Business Object.
Note:
Lookup field values must exactly match existing values in the Cherwell instance.

json
[
{
"displayName": "Description",
"value": " Computer is Slow "
},
{
"displayName": "Short Description",
"value": " Cannot open office applications "
},
{
"displayName": "Priority",
"value": "1"
},
{
"displayName": "Owned By",
"value": "Andrew"
},
{
"displayName": "Customer ID",
"value": "123"
}
]

Table FieldsThe fields are available only if the Accept fields as JSON checkbox is clear.
Variable Field NameChoose a field in input stream from the list or provide a user or system defined variable.
The field is optional.
Static Field NameClick a cell in the field column and a dialog with a list of form fields appears. Select one or multiple field names that you want to insert in the Business Object Form.
Field ValueSpecify the field values you want to insert in the corresponding chosen fields.
OUTPUT tab:Output Fields
RecIDSpecify a field name to return the RecID created with the input fields and field values provided.
The field is mandatory.
Public IDSpecify a field name to return the Business Object Public ID created with the input fields and field values provided.
The field is mandatory.