Update record in Zoho Billing
Table of ContentsUp
Note:
- Each time the zoho.billing.update integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.billing.update integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
This task is used to update a record in Zoho Billing using the record ID. This task is based on Zoho Billing API <ModuleName> -> Update a <ModuleName>.
Syntax
<variable> = zoho.billing.update(<moduleName>, <organization_id>, <record_ID>, <data_map>, <connection>);
where:
| Params | Data type | Description |
| <variable> | KEY-VALUE | is the variable which will hold the response returned by Zoho Billing. |
| <module_name> | TEXT | is the name of the module in Zoho Billing where the record will be updated. |
| <organization_id> | TEXT | Org id of the organization in which the record will be updated. Note: Learn how to fetch organization ID from the UI and from the response of zoho.billing.getOrganization task. |
<record_ID>
| TEXT | ID of the record which will be updated. Learn how to fetch the record ID after creating or fetching records. |
| <data_map> | KEY-VALUE | Key-value pairs with key as the field name in Zoho Billing and value as its updated value. To learn about the field names, click here and go to |
| <connection> | TEXT | specifies the link name of the Zoho Billing connection. Note:
|
Example: Update record in Zoho Billing
When the following script gets executed, the specified record is updated in the "Subscriptions" module in Zoho Books.
values = Map(); values.put("plan_code", 101); response = zoho.billing.update("Subscriptions", "66XXXX66", "52849000000170032", values, "billing_connection");
where:
response
values
"Subscriptions"
"66XXXXX66"
"52849000000170032"
"billing_connection"
Sample Response
The following is a sample success response:
"message":"Subscription has been updated successfully.",
"subscription":{
"subscription_id":"115888000000047005",
"payment_terms":0,
"interval":1,
"product_id":"115888000000037018",
"payment_terms_label":"Due on Receipt",
"next_billing_at":"2015-04-10",
"product_name":"zoho",
"current_term_starts_at":"2015-03-10",
"customer":{
"payment_terms":0,
"payment_terms_label":"",
"zcrm_account_id":"",
"shipping_address":{
"zip":"",
"fax":"",
"street":"",
"state":"",
"country":"",
"city":""
},
"first_name":"",
"display_name":"ram",
"email":"ram.s@gmail.com",
"company_name":"",
"zcrm_contact_id":"",
"last_name":"",
"customer_id":"115888000000046001",
"billing_address":{
"zip":"",
"fax":"",
"street":"",
"state":"",
"country":"",
"city":""
}
},
"interval_unit":"months",
"updated_time":"2015-03-10T11:06:10+0530",
"current_term_ends_at":"2015-04-10",
"amount":1000,
"salesperson_name":"",
"name":"zoho-monthly",
"reference_id":"",
"salesperson_id":"",
"currency_symbol":"Rs.",
"activated_at":"2015-03-10",
"currency_code":"INR",
"custom_fields":"[]",
"child_invoice_id":"115888000000046015",
"status":"live",
"addons":"[]",
"last_billing_at":"2015-03-10",
"contactpersons":[
{
"phone":"",
"email":"ram.s@gmail.com",
"zcrm_contact_id":"",
"contactperson_id":"115888000000046003",
"mobile":""
}
],
"expires_at":"",
"plan":{
"tax_name":"",
"setup_fee":0,
"price":1000,
"tax_type":"",
"name":"monthly",
"tax_id":"",
"quantity":1,
"tax_percentage":"",
"plan_code":"monthly"
},
"created_time":"2015-03-10T11:00:18+0530",
"taxes":"[]",
"auto_collect":false
},
"code":0
}
The following is a sample failure response:
"message":"The action is not allowed for this profile as there are no changes made in the plan or addons.",
"code":26005
}