Search.../

listWorkflowsInfo( )

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

Retrieves a list of the site's workflows info.

The listWorkflowsInfo() function returns a Promise that resolves to a list containing information about the site's workflows.

Use the options parameter to specify which workflows to retrieve and in which order to retrieve them. Workflows can be sorted based on their "name". If no limit parameter is passed, the first 100 workflows are returned. Sort order defaults to by "name" ascending.

Syntax

function listWorkflowsInfo([options: ListOptions]): Promise<WorkflowList>

listWorkflowsInfo Parameters

NAME
TYPE
DESCRIPTION
options
Optional
ListOptions

Options to use when getting the list of workflows.

Returns

Fulfilled - List of retrieved workflows.

Return Type:

Promise<WorkflowList>
NAME
TYPE
DESCRIPTION
items
Array<WorkflowInfo>

List of workflows matching the list options.

length
number

Number of items in the current results page.

totalCount
number

Total number of workflows in the site.

pageSize
number

Number of items returned per page with the current list options.

totalPages
number

Total number of results pages.

currentPage
number

Index of the current page. Indices are zero-based.

Was this helpful?

Get a list of workflows info

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const listWorkflowsInfo = webMethod(Permissions.Anyone, () => {
5 return workflows.listWorkflowsInfo(
6 {
7 "limit": 2,
8 "skip": 10,
9 "order": {
10 "field": "name",
11 "sort": "asc"
12 }
13 }
14 );
15});
16
17/* Returns a promise that resolves to:
18 *
19 * {
20 * "items": [
21 * {
22 * "id": "f01971ac-5514-43b0-bf6c-dde93345e4e3",
23 * "name": "First Workflow",
24 * "createdDate": "2019-03-25T12:19:28.952Z",
25 * "description": "First workflow description.",
26 * },
27 * {
28 * "id": "d5a7848d-121b-4ee3-ab53-9ec6f4acaecc",
29 * "name": "Second Workflow",
30 * "createdDate": "2019-05-05T09:49:16.580Z",
31 * "description": "Second workflow description.",
32 * }
33 * ],
34 * "length": 2,
35 * "totalCount": 100,
36 * "pageSize": 2,
37 * "totalPages": 50,
38 * "currentPage": 5
39 * }
40 */