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.
Creates a new workflow.
The createWorkflow()
function returns a Promise that resolves to the created workflow
ID.
function createWorkflow(workflowInfo: CreateWorkflowRequest): Promise<string>;
Workflow to create.
import { Permissions, webMethod } from "wix-web-module";
import { workflows } from "wix-crm-backend";
export const createWorkflow = webMethod(Permissions.Anyone, () => {
return workflows.createWorkflow({
name: "My Workflow",
description: "The best workflow!",
});
});
// Returns a promise that resolves to:
// "3c9683ea-f6cc-470b-b0d1-2eb6b8cea912"
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.