Search...
createWorkflow( )
Deprecated. This function is being discontinued in the upcoming months. We are working to provide alternatives, and we'll provide timely updates before implementing any changes. We understand that this transition might present challenges, and we appreciate your patience and understanding.
Description
Creates a new workflow.
The createWorkflow()
function returns a Promise that resolves to the created workflow
ID.
Syntax
function createWorkflow(workflowInfo: CreateWorkflowRequest): Promise<string>
createWorkflow Parameters
NAME
TYPE
DESCRIPTION
workflowInfo
CreateWorkflowRequest
Workflow to create.
Returns
Fulfilled - ID of the newly created workflow.
Return Type:
Promise<string>
Was this helpful?
Create a new workflow
Copy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { workflows } from 'wix-crm-backend';34export const createWorkflow = webMethod(Permissions.Anyone, () => {5 return workflows.createWorkflow(6 {7 "name": "My Workflow",8 "description":"The best workflow!"9 }10 );11});1213// Returns a promise that resolves to:14// "3c9683ea-f6cc-470b-b0d1-2eb6b8cea912"