Skip to main content
All CollectionsEnboarder API DocsWorkflow Engine
Enboarder API Docs: Cancel a Workflow
Enboarder API Docs: Cancel a Workflow

This API Cancels an Enboarder workflow.

Adam Faludi avatar
Written by Adam Faludi
Updated over a week ago

Cancel Workflow

Base URL:

API Endpoint

Request Method: POST

This API Cancels Enboarder workflow. If Workflow is not available or is already Complete or Cancelled API return error response.

Sample Request:

{
"externalid": "ENB-494398793433",
"comments": "Employee has voluntarily terminated”,
“mode”: “ALL”
}

Response

  • On Success, the below response will be returned:

Resposne Body:

{ "message": "Workflow updated successfully for externalid [ENT-68736879-0001]", }

Where the referenceid is the externalid passed in the request body or uniqueid generated by system launched from.

  • On Error, the below response will be returned:

Resposne Body:

{ "message": "Error: externalid [ENT-68736879-0005] not found" }

Message will contain error message.

Attribute Names & Descriptions:

externalid

Identifier that uniquely identifies an instance of running Workflow in Enboarder

Required

comments

any additional comments for cancellation of workflow

Optional

mode

Determines workflow to cancel. Multiple workflows can be launched with same externalid but with different criteria, so while cancelling specific workflow can be cancelled by providing specific criteria and mode as SELECTED. Possible values are:

ALL (Default): All workflows for the externalid will be cancelled. All Workflows must be either in Pending, InProcess, Cancel or Deleted state.

SELECTED: Specific workflow with matching criteria will be cancelled.

CANCEL_ALL: All workflows for the external which are in PENDING or INPROGRESS state will be canceled, rest will be ignored.

Optional

customfields

List of all custom fields for the workflow. They are name , value pairs. name should match the name of custom field defined in Enboarder. Brand, location and optional categories can also be provided in custom fields with name as ‘brand’, ‘location’ and category name in Enboarder respectively.

Optional


Parent Child Mapping

We've made it easy for you to integrate with one account in Enboarder (the parent account), and then be able to pass data into other child accounts. In order to enable data to flow from a parent account to a child account, you will need to configure child account IDs.

What you will need to change in the payload

  • The source system should send this child account ID in the payload in attribute childAccountID.

  • The possible values of this field should be provided to Enboarder support so that they can configure these IDs to each child account

  • When the payload is received, Enboarder will check the value of the childAccountID field. If an ID matches with any of the child account IDs, the workflow will be canceled in that child account. If an ID does not match a child account, then the workflow will look to be canceled into the parent account.

Example: If you have 3 child accounts in Enboarder and you are using the office location city as child ID, you will need to send us the below data in a CSV file:

Child Account Name

External id

Account 1

Sydney

Account 2

Brisbane

Account 3

London

Here is a sample payload for canceling a workflow. Enboarder will cancel the workflow into Account 2 in this case.

{ 
"nhnm": "Jane Doe",
"nheml": "john@enboarder.com",
"childAccountID":"Brisbane",
"nhstdt": "2021-08-12",
"managers": [
{ "nm": "Jane Van",
"eml": "johndoe@enboarder.com",
"mgrlbl": "Direct Manager"
}
],
"customfields": [
{ "name": "brand",
"value": "enboarder"
}
],
"externalid": "687368798490",
"mode": 0
}

Set up in Enboarder

We need a mapping of your child account names and the unique ID of each child account. The child account ID can be any ID that is unique per child account and available in the source system. This ID will be used to find the child's account in Enboarder. The ID can be alphanumeric or string. It should be passed to our system as a string.


Did this answer your question?