Steps

Define and manage individual workflow steps including step types, creation, updates, and mappable field configurations

Get Step Types

GET /v1/steps/types

Get available step types for workflow creation.

Response (200 OK):

[
    {
        "content": [
            {
                "id": "forms",
                "label": "Forms",
                "group": "Function"
            },
            {
                "id": "data-activation",
                "label": "Data Activation",
                "group": "Function"
            },
            {
                "id": "notifications",
                "label": "Notifications",
                "group": "Function"
            },
            {
                "id": "integration",
                "label": "Integration",
                "group": "Function"
            },
            {
                "id": "sign",
                "label": "Digital Signature",
                "group": "Function"
            },
            {
                "id": "workflows",
                "label": "Sub-Workflow",
                "group": "Control"
            },
            {
                "id": "task",
                "label": "Manual Task",
                "group": "Human"
            }
        ]
    }
]

Create Workflow Step

POST /v1/steps

Create a new workflow step.

Request Body:

Required fields:

  • workflowId
  • type
  • edges

Optional fields:

  • description
  • version
{
    "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "type": "forms",
    "description": "Patient Registration Form",
    "version": 1,
    "edges": [
        {
            "prev": "step-111",
            "next": "step-333"
        }
    ]
}

Response (201 Created):

{
    "id": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
    "description": "Patient Registration Form",
    "type": "forms",
    "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "createdAt": "2024-01-20T15:30:00.000Z",
    "updatedAt": "2024-01-20T15:30:00.000Z",
    "configurationStatistics": {
        "amountOfAssignees": 0
    }
}

Get Step by ID

GET /v1/steps/{stepId}

Get details of a specific workflow step.

Path Parameters:

  • stepId (string, required): Step UUID

Response (200 OK):

{
    "id": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
    "description": "Patient Registration Form",
    "type": "forms",
    "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "stepMetadata": [
        {
            "id": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "key": "displayName",
            "value": "Patient Registration",
            "createdAt": "2024-01-20T15:30:00.000Z",
            "updatedAt": "2024-01-20T15:30:00.000Z"
        }
    ],
    "createdAt": "2024-01-20T15:30:00.000Z",
    "updatedAt": "2024-01-20T15:30:00.000Z",
    "configurationStatistics": {
        "amountOfAssignees": 3
    }
}

Update Step

PATCH /v1/steps/{stepId}

Update a workflow step's description.

Path Parameters:

  • stepId (string, required): Step UUID

Request Body:

Required fields:

  • description
{
    "description": "Enhanced Patient Registration Form"
}

Response (200 OK):

{
    "id": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
    "description": "Enhanced Patient Registration Form",
    "type": "forms",
    "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
    "version": 1,
    "organizationId": "org-123456789",
    "userId": "user-987654321",
    "stepMetadata": [
        {
            "id": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "key": "displayName",
            "value": "Patient Registration",
            "createdAt": "2024-01-20T15:30:00.000Z",
            "updatedAt": "2024-01-20T15:30:00.000Z"
        }
    ],
    "createdAt": "2024-01-20T15:30:00.000Z",
    "updatedAt": "2024-01-20T16:00:00.000Z",
    "configurationStatistics": {
        "amountOfAssignees": 3
    }
}

Delete Step

DELETE /v1/steps/{stepId}

Delete a workflow step.

Path Parameters:

  • stepId (string, required): Step UUID

Response (200 OK):

No response body.


Get Step Mappable Fields

GET /v1/steps/{stepId}/mappable-fields

Get available fields that can be mapped from this step to other steps.

Path Parameters:

  • stepId (string, required): Step UUID

Response (200 OK):

[
    {
        "id": "source-step-123",
        "stepType": "forms",
        "label": "Patient Registration Form",
        "step": {
            "id": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
            "description": "Patient Registration Form",
            "type": "forms",
            "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
            "version": 1,
            "organizationId": "org-123456789",
            "userId": "user-987654321",
            "createdAt": "2024-01-20T15:30:00.000Z",
            "updatedAt": "2024-01-20T15:30:00.000Z",
            "configurationStatistics": {
                "amountOfAssignees": 3
            }
        },
        "description": "Patient information collection form",
        "fields": [
            {
                "id": "patient_name",
                "label": "Patient Full Name",
                "groupId": "personal_info",
                "groupLabel": "Personal Information",
                "primitiveType": "string",
                "complexType": "text",
                "entity": {
                    "id": "patient",
                    "label": "Patient"
                }
            },
            {
                "id": "patient_email",
                "label": "Email Address",
                "groupId": "contact_info",
                "groupLabel": "Contact Information",
                "primitiveType": "string",
                "complexType": "email",
                "entity": {
                    "id": "patient",
                    "label": "Patient"
                }
            },
            {
                "id": "date_of_birth",
                "label": "Date of Birth",
                "groupId": "personal_info",
                "groupLabel": "Personal Information",
                "primitiveType": "date",
                "complexType": "date",
                "entity": {
                    "id": "patient",
                    "label": "Patient"
                }
            }
        ],
        "attachments": [
            {
                "originalName": "insurance_card.pdf",
                "outputName": "insurance_card_processed.pdf",
                "fileType": "application/pdf",
                "filePath": "/attachments/insurance_card.pdf"
            }
        ]
    }
]

Get Step Logic Rules

GET /v1/steps/{stepId}/logic-rules

Get logic rules associated with a workflow step.

Path Parameters:

  • stepId (string, required): Step UUID

Response (200 OK):

[
    {
        "id": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
        "stepId": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
        "name": "Skip if Emergency",
        "type": "SKIP",
        "ruleConditions": [
            {
                "topLevelCondition": "all",
                "logicRuleId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
                "conditions": [
                    {
                        "id": "condition-123",
                        "section": 1,
                        "fact": {
                            "sourceId": "source-step-456",
                            "sourceForeignFieldId": "emergency_type",
                            "sourceForeignDataType": "string"
                        },
                        "operator": "Equal",
                        "value": "critical"
                    }
                ]
            }
        ],
        "stepLogicRule": {
            "step": {
                "id": "7b24fdc8-3ded-5g52-8d90-85305e2b3db2",
                "description": "Emergency Notification Step",
                "type": "notification",
                "workflowId": "6c06edfb-1cec-4f41-9c89-96204f1a2cb0",
                "version": 1,
                "organizationId": "org-123456789",
                "userId": "user-987654321",
                "createdAt": "2024-01-20T09:00:00.000Z",
                "updatedAt": "2024-01-20T09:00:00.000Z",
                "configurationStatistics": {
                    "amountOfAssignees": 3
                }
            }
        },
        "createdAt": "2024-01-20T14:30:00.000Z",
        "updatedAt": "2024-01-20T14:30:00.000Z"
    }
]

Get Step Datasets

GET /v1/steps/{stepId}/datasets

Get datasets available for a workflow step.

Path Parameters:

  • stepId (string, required): Step UUID

Response (200 OK):

[
    {
        "content": [
            {
                "stepId": "9a15edfb-1cec-4f41-9c89-96204f1a2cb1",
                "stepName": "Patient Registration Form",
                "datasets": [
                    {
                        "id": "patient_dataset",
                        "label": "Patient"
                    },
                    {
                        "id": "medical_record_dataset",
                        "label": "Medical Record"
                    },
                    {
                        "id": "insurance_dataset",
                        "label": "Insurance Information"
                    }
                ]
            }
        ]
    }
]

Get Dataset Entities

GET /v1/steps/{stepId}/datasets/{datasetId}/entities

Get entities within a specific dataset for a workflow step.

Path Parameters:

  • stepId (string, required): Step UUID
  • datasetId (string, required): Dataset UUID

Response (200 OK):

[
    {
        "content": [
            {
                "id": "patient_entity",
                "label": "Patient",
                "fields": [
                    {
                        "id": "patient_id",
                        "type": "string",
                        "label": "Patient ID"
                    },
                    {
                        "id": "first_name",
                        "type": "string",
                        "label": "First Name"
                    },
                    {
                        "id": "last_name",
                        "type": "string",
                        "label": "Last Name"
                    },
                    {
                        "id": "date_of_birth",
                        "type": "date",
                        "label": "Date of Birth"
                    },
                    {
                        "id": "email",
                        "type": "string",
                        "label": "Email Address"
                    }
                ]
            },
            {
                "id": "emergency_contact_entity",
                "label": "Emergency Contact",
                "fields": [
                    {
                        "id": "contact_name",
                        "type": "string",
                        "label": "Contact Name"
                    },
                    {
                        "id": "contact_phone",
                        "type": "string",
                        "label": "Contact Phone"
                    },
                    {
                        "id": "relationship",
                        "type": "string",
                        "label": "Relationship"
                    }
                ]
            }
        ]
    }
]

Automap Step

POST /v1/steps/{stepId}/automap

Automatically create field mappings for a workflow step based on available data sources.

Path Parameters:

  • stepId (string, required): Step UUID

Response (204 No Content):

No response body.