Choose where you’d like to start

Update Transitions

Overview

You can update the status of the record in the specified transactional module using the zoho.fsm.updateTransitions() Deluge task.

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.updateTransitions(<module_name>, <record_id>,<transition_details>, <optional_data_map>, <connection>);

where,

ParamsData typeDescription
<variable> KEY-VALUEis the task response returned as a Map.
<module_name>TEXT

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

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

<record_id>TEXTis the unique ID of the record whose transitions you want to update.
<transition_details>KEY-VALUEis a Map parameter to pass the details required to move the record from one status to another.
<optional_data_map>KEY-VALUEis 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 will update the status of a record with ID 23033XXXXXXXXXXXXXX in the Zoho FSM module Service Appointments to Cannot Complete.

emptyMap = Map();

transitionInfo = Map();
transitionInfo = {"blueprint":[{"transition_id":"2373000000169069","data":{"Notes":"Customer not present at the location"}}]};

response = zoho.fsm.updateTransitions("Service_Appointments", 23033XXXXXXXXXXXXXX, transitionInfo, emptyMap, "fsm_connection");
info response;

info response;

where:

"Service_Appointments"
is the TEXT that represents the API name of the Zoho FSM module for whose record you want to update the transition
23033XXXXXXXXXXXXXX
is the TEXT that represents the ID of the record that will be updated.
transitionInfo

is the KEY-VALUE input with details to update the status of the record. 

The transition_id is the NUMBER that represents the status to which you want to update the record. To know the transition_id, click here, navigate to <Module> APIs -> List <ModuleName> Transitions

The data is the KEY-VALUE input with the details of the note that need to be added when cancelling or terminating a record.

"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","details":{},"message":"Action executed successfully","actions":{"before":{},"after":{}},"status":"success"}

Related Links

Get Started Now

Execute