Choose where you’d like to start

Mark status in Zoho Inventory

Note: This task is applicable to all Zoho services except Zoho Creator.

Overview

The zoho.inventory.markStatus task is used to change the status field with one of the allowed values in the specified Zoho Inventory module.

Syntax

<response> = zoho.inventory.markStatus(<module>, <org_id>, <record_id>, <status>, [<connection>]);
where:

 

ParamsData typeDescription

<response>

KEY-VALUE

The status of the executed task.

<module>

TEXT

The name of the Zoho Inventory module in which the status field's value will be changed.

Allowed Values:

  • SalesOrders
  • ShipmentOrders

<org_id>

TEXT

The organization ID of the account in which the value of the status field will be changed.

Note: Learn how to fetch organization ID from the UI and from the response of zoho.inventory.getOrganization task.

<record_id>

TEXT

The ID of the record whose status needs to be changed.

Note: Learn how to fetch the ID of a record after creating or fetching it.

<status>

TEXT

The status value. The following table lists the allowed status values for each module:

Module Name - Allowed values
  • SalesOrders - void
  • ShipmentOrders - delivered

<connection>

(optional)*

TEXT

The name of the connection.

*Note: This parameter is mandatory in Zoho Cliq.

Example

The following script sets the status of the specified record to void, in the Zoho Inventory module - SalesOrders.

 response = zoho.inventory.markStatus("SalesOrders", "59XXXX43", "528XXXXXXXXXXX043", "void", "inventory_connection");

where:

response
The KEY-VALUE that represents the status of the executed task.
"SalesOrders"
The TEXT that represents the module name.
"59XXXX43"
The TEXT that represents the organization ID of the Zoho Inventory account.
"528XXXXXXXXXXX043"
The TEXT that represents the record ID whose status needs to be changed.
"void"
The TEXT that represents the status value.
"inventory_connection"
The TEXT that represents the connection name.

Response Format

Success Response

  • The success response will be returned in the following format:

      {
      "code": 0,
      "message": "The status of the Sales order has been changed to Void.",
      "data": {
      }
      }

Failure Response

  • The failure response returned for incorrect or non-existent organization ID will be returned in the following format:

      {
      "code": 6041,
      "message": "This user is not associated with the CompanyID/CompanyName: 58XXXX50."
      }
  • The failure response returned for incorrect or non-existent record ID will be returned in the following format:

      {
      "code": 1002,
      "message": "Sales Order does not exist."
      }
  • The failure response returned for supplying unallowed status value will be returned in the following format.

      {
      "code": 5,
      "message": "Invalid URL Passed"
      }

Related Links

Get Started Now

Execute