Note: The Workflows API will be discontinued in the upcoming months. If you're already using this module in your code, it will continue to work. Our team is 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.
The Workflows API is used to manage your site's workflows.
A workflow consists of a number of phases, also known as steps. The final phase in the workflow, the phase that indicates the workflow has been completed, is know as the win phase. Each phase can contain cards that move between the phases, indicating the card's progression through the workflow.
Each workflow is limited to 5,000 cards. To avoid hitting this limit, archive cards when they're no longer needed.
When working with the Workflows API, you will often need to specify the ID of a workflow, phase, or card.
You can retrieve these IDs using the following functions:
Sometimes, you need to use more than one of these functions to retrieve
the ID you need. For example, if you are looking to retrieve a specific card's ID
using the listCards()
function, you need to at least provide a
workflow ID. So, you call listWorkflowsInfo()
to retrieve
the workflow ID and then pass that ID to listCards()
to get the
card ID.
Note that IDs for workflows, phases, and cards are also returned when they are
created using the createWorkflow()
, createPhase()
,
and createCard()
functions. You can store these returned IDs and
use them later.
To use the Workflows API, import workflows
from the wix-crm-backend
module: