Migration Guide: Migrating from Cases to Records
Overview
This guide outlines the changes related to workflow execution in the API and provides steps for adapting integrations accordingly.
Key Changes
Creating a Case is Now Optional
Previously, running a workflow required associating it with a case.
Now, workflows can be executed without creating a case.
In the new API, creating a case is no longer necessary, and workflows can be executed independently.
Deprecation of Case API
The API for creating cases will be marked as deprecated in favor of the new Records system.
Workflows can still be run independently, even without using Records.
Running Workflows for Records
A
recordIdcan be provided to execute a workflow for a specific record.If
recordIdis omitted, workflows can create records dynamically if configured properly.
Important: recordId is optional unless you want to use our CRM system. If you wish to do so, please contact [email protected] for configuration. Without this, you can still execute workflows and retrieve results as usual.
API Changes
Migration Steps
1. Update Workflow Execution
Changes:
Old:
POST /workflows/run(usescaseId)New:
POST /workflows/run(usesrecordId)
Migration Steps:
Replace
caseIdwithrecordIdin the request payload.Ensure that the correct
recordIdis passed when applicable.If no
recordIdis given, workflows will execute normally.
2. Update Workflow Status Retrieval
Changes:
Old:
GET /workflows/{workflowId}returnscaseId.New:
GET /workflows/{workflowId}returnsrecordId
Migration Steps:
Modify your integration to use
recordIdinstead ofcaseIdin the response when applicable.Ensure that any business logic that depends on
caseIdis updated accordingly.
3. Update Workflow Result Retrieval
Changes:
Old:
GET /case/{caseId}returns case-based data (deprecated).New:
GET /workflows/{workflowId}/resultreturns workflow-based data.The response structure remains the same.
Steps:
Update all API references from
/case/{caseId}to/workflows/{workflowId}/result.Ensure that workflows are correctly mapped to their corresponding
workflowId.
4. Update Token Generation
Changes:
Old:
POST /token(usescaseId).New:
POST /token(usesrecordId).
Steps:
Replace
caseIdwithrecordIdin the token generation request.Ensure that the correct
recordIdis passed when applicable.
5. Update Link Generation
Changes:
Old:
POST /linkandPOST /link/send(usescaseId).New:
POST /linkandPOST /link/send(usesrecordIdand requiresemailinPOST /link/send).
Steps:
Replace
caseIdwithrecordIdin link generation requests.Ensure that the correct
recordIdis passed when applicable.Ensure that
emailis included inPOST /link/sendrequests.
Frequently Asked Questions (FAQ)
1. Do I need to use recordId for all workflows?
recordId for all workflows?No, recordId is optional unless you are using our CRM system. Workflows can still be executed without it.
2. What should I do if I used the /cases/{caseId} endpoint to retrieve the process result?
/cases/{caseId} endpoint to retrieve the process result?You have two options:
Migrate to the record-based functionality by updating your workflow to use
recordIdinstead ofcaseId. This may require modifying workflows to ensure compatibility with the new Records system.Use the
/workflows/{workflowId}/resultendpoint to retrieve workflow results instead of/case/{caseId}.
3. Can I still use the caseId parameter?
caseId parameter?No, caseId is deprecated. You must switch to using recordId instead.
4. What should I do if my integration depends on caseId?
caseId?Update all references to caseId and replace them with recordId. Ensure that workflows function correctly with the updated API.
For further assistance, contact our support team at [email protected]
Was this helpful?