Choose where you’d like to start

Get Transitions

Overview

Using the zoho.fsm.getTransitions Deluge task you can fetch all the possible transitions (statuses) the record in the specified module can take from its current status.
E.g. if a service appointment is in the Dispatched status, then the possible transitions (statuses) the service appointment can take are In Progress, Cannot Complete, and Cancelled.

This task is based on Zoho FSM API -> <Module> -> List <ModuleName> Transitions.

Note: This task is not applicable to Zoho Creator.

Syntax

<variable> = zoho.fsm.getTransitions(<module_name>, <record_id>, <optional_data_map>, <connection>);

where,

ParamsData typeDescription

<variable> 

KEY-VALUE

is the task response returned as a Map.

<module_name>

TEXT

is the API name of the module whose record's transitions you want to fetch.

Note: To know the API name, click here, navigate to <Module> APIs -> List <ModuleName> Transitions and refer to the Request URL

<record_id>

TEXT

is the unique ID of the record whose transitions you want to retrieve.

<optional_data_map>

KEY-VALUE

is a Map parameter to pass any additional values. If you want to ignore this parameter, supply an empty map.

<connection>

TEXT

is the connection created for Zoho FSM.

Note: To know the relevant scopes, click here, navigate to <Module> APIs -> List <ModuleName> Transitions.

Example

The following script fetches all the transitions for the record with ID - 23033XXXXXXXXXXXXXX in the Zoho FSM module - Service Appointments.

emptyMap = Map();
response = zoho.fsm.getTransitions("Service_Appointments", 23033XXXXXXXXXXXXXX, emptyMap, "fsm_connection");

info response;

where:

"Service_Appointments"
is the TEXT that represents the API name of the Zoho FSM module for whose record you want to fetch the transitions
23033XXXXXXXXXXXXXX
is the TEXT that represents the ID of the record whose transitions you want to fetch.
"fsm_connection"
is the TEXT that represents the link name of the connection created for Zoho FSM.

Response Format

Success Response

  • The response returned is of the following format:

     {"code":"SUCCESS","process_info":{"field_id":"2373000000115398","api_name":"Status","field_label":"Status","name":"Service Appointments","field_value":"New"},"transitions":[{"next_field_value":"Scheduled","name":"Schedule","id":"2373000000169054","type":"primary","enabled":true},{"next_field_value":"Cancelled","name":"Cancel","id":"2373000000169066","fields":[{"display_label":"Notes","data_type":"notes","id":"0","transition_sequence":1,"mandatory":true}],"enabled":true},{"next_field_value":"Cannot Complete","name":"Terminate","id":"2373000000169069","fields":[{"display_label":"Notes","data_type":"notes","id":"0","transition_sequence":1,"mandatory":true}],"enabled":true},{"next_field_value":null,"name":"Download","id":"2373000000298004","enabled":true},{"next_field_value":null,"name":"Print","id":"2373000000298008","enabled":true}],"status":"success"}

Related Links

Get Started Now

Execute