Skip to content

Create a new custom entity trigger.

Request

Security
bearerAuth and apiKeyAuth
Bodyapplication/jsonrequired
idstring

Custom entity trigger id

entityTypestring

Type of entity on which its applicable

typestring

Type of trigger: Script, Rule Or Workflow

whenArray of strings

When to fire this trigger: on record create, update or delete

criteriaobject(Filter)

Entry criteria for the trigger to fire on an entity

actionstring

Depending upon type: it will have script, rule id or workflow definition id

enabledboolean

If this trigger is enabled

createdTimeinteger, (int64)

Created time for the custom entity trigger

modifiedTimeinteger, (int64)

Last modified time for the custom entity trigger

curl -i -X POST \
  https://developer.sprinklr.com/_mock/apis/sprinklr-v3/customEntity/trigger \
  -H 'Authorization: Bearer <YOUR_Token_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Key: YOUR_API_KEY_HERE' \
  -d '{
    "id": "string",
    "entityType": "string",
    "type": "string",
    "when": [
      "string"
    ],
    "criteria": {
      "type": "LEAVE_MANAGEMENT_ASSET_CLASS_LOOKUP",
      "filters": [
        {}
      ],
      "key": "string",
      "values": [
        "string"
      ]
    },
    "action": "string",
    "enabled": true,
    "createdTime": 0,
    "modifiedTime": 0
  }'

Responses

Success

Bodyapplication/json
idstring

Custom entity trigger id

entityTypestring

Type of entity on which its applicable

typestring

Type of trigger: Script, Rule Or Workflow

whenArray of strings

When to fire this trigger: on record create, update or delete

criteriaobject(Filter)

Entry criteria for the trigger to fire on an entity

actionstring

Depending upon type: it will have script, rule id or workflow definition id

enabledboolean

If this trigger is enabled

createdTimeinteger, (int64)

Created time for the custom entity trigger

modifiedTimeinteger, (int64)

Last modified time for the custom entity trigger

Response
{ "id": "string", "entityType": "string", "type": "string", "when": [ "string" ], "criteria": { "type": "LEAVE_MANAGEMENT_ASSET_CLASS_LOOKUP", "filters": [ … ], "key": "string", "values": [ … ] }, "action": "string", "enabled": true, "createdTime": 0, "modifiedTime": 0 }