Create Layout Rule
POST {{baseUrl}}/api/v1/layouts/:layout_id/layoutRules?name=<string> max chars : 255&fieldName=<string> max chars : 100&fieldConditions=<list>
This API creates a rule for a field in a layout.
OAuth Scope
Desk.settings.CREATE
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
include | string | Additional information related to the rules. Values allowed are: creator and modifier. | |
name | string | Name of the rule | |
description | string | A short description of the rule | |
fieldName | string | Name of the primary field to be used for creating the rule | |
displayLabel | string | Display Label of the primary field to be used for creating the rule | |
status | string | Activation status of the rule: ACTIVE or DEACTIVE | |
executeInHelpCentre | string | To execute the rule in help centre or not: true or false | |
fieldConditions | string | Conditions in the layout rule |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"fieldConditions":[{"name":"condition 2","pattern":"(1and2)","conditions":[{"condition":"is","fieldName":"email","value":["carol@zylker.com"]},{"condition":"is","fieldName":"phone","value":["9993292892"]}],"actions":{"showSections":["Additional Information"],"showFields":["subject"],"setMandatoryFields":["priority"]}}],"modifiedTime":"2018-09-14T01:08:42.000Z","fieldName":"email","description":"Rule 2 for layout","systemGenerated":false,"layoutId":"4000000007723","executeInHelpCentre":true,"createdBy":"4000000015963","name":"Rule 2","createdTime":"2018-09-14T01:07:22.000Z","modifiedBy":"4000000015963","id":"4000000021001","status":"active"}