This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Estimates in Zoho Books
The createEstimate
operation creates an estimate for your customer.
createEstimate
<zohobooks.createEstimate> <customerId>{$ctx:customerId}</customerId> <contactPersons>{$ctx:contactPersons}</contactPersons> <send>{$ctx:send}</send> <exchangeRate>{$ctx:exchangeRate}</exchangeRate> <referenceNumber>{$ctx:referenceNumber}</referenceNumber> <terms>{$ctx:terms}</terms> <date>{$ctx:date}</date> <adjustment>{$ctx:adjustment}</adjustment> <discountType>{$ctx:discountType}</discountType> <salesPersonName>{$ctx:salesPersonName}</salesPersonName> <taxExemptionId>{$ctx:taxExemptionId}</taxExemptionId> <vatTreatment>{$ctx:vatTreatment}</vatTreatment> <ignoreAutoNumberGeneration>{$ctx:ignoreAutoNumberGeneration}</ignoreAutoNumberGeneration> <avataxUseCode>{$ctx:avataxUseCode}</avataxUseCode> <lineItems>{$ctx:lineItems}</lineItems> <note>{$ctx:note}</note> <customFields>{$ctx:customFields}</customFields> <adjustmentDescription>{$ctx:adjustmentDescription}</adjustmentDescription> <expiryDate>{$ctx:expiryDate}</expiryDate> <isDiscountBeforeTax>{$ctx:isDiscountBeforeTax}</isDiscountBeforeTax> <shippingCharge>{$ctx:shippingCharge}</shippingCharge> <estimateNumber>{$ctx:estimateNumber}</estimateNumber> <discount>{$ctx:discount}</discount> <templateId>{$ctx:templateId}</templateId> <avataxExemptNo>{$ctx:avataxExemptNo}</avataxExemptNo> <taxId>{$ctx:taxId}</taxId> <taxAuthorityId>{$ctx:taxAuthorityId}</taxAuthorityId> </zohobooks.createEstimate>
Properties
Required - The ID of the customer.customerId:
Array of contact person(s) to whom the estimate has to be sent.contactPersons:
Send the estimate to the contact person(s) associated with the estimate. Allowed Values: true and falsesend:
Exchange rate of the currency.exchangeRate:
Reference number for the estimate.referenceNumber:
Terms and conditions for the estimate.terms:
The date the estimate was created.date:
Adjustments made to the invoice.adjustment:
How the discount is specified. Allowed values are entity_level or item_level. Allowed Values: entity_level and item_level.discountType:
Name of the sales person.salesPersonName:
The ID of the tax exemption (US Edition only).taxExemptionId:
VAT treatment for the invoice (UK Edition only).vatTreatment:
Ignore auto estimate number generation for this estimate. This mandates the estimate number. Allowed Values: true and falseignoreAutoNumberGeneration:
Used to group like customers for exemption purposes. It is a custom value that links customers to a tax rule (Avalara integration only).avataxUseCode:
Array containing item details.lineItems:
Note for an estimate.note:
Array of the custom fields for an estimate.customFields:
Customize the adjustment description. E.g. Rounding off.adjustmentDescription:
Date the estimate is valid up to.expiryDate:
Used to specify how the discount has to applied. Either before or after the calculation of tax.isDiscountBeforeTax:
Shipping charges applied to the invoice.shippingCharge:
Refers to the estimate number. Mandatory if auto number generation is disabled.estimateNumber:
Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190.discount:
The ID of the PDF template associated with the estimate.templateId:
Exemption certificate number of the customer (Avalara integration only).avataxExemptNo:
The ID of the tax or tax group applied to the estimate (US Edition only).taxId:
The ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority. (US Edition only).taxAuthorityId:
Sample Request
Following is a sample REST/JSON request that can be handled by the createEstimate operation.
Sample Request for createEstimate
{ "apiUrl": "https://books.zoho.com", "authToken": "40652e2f50fb0873728fddf4d27f3a10", "organizationId": "48221130", "customerId": "111948000000038079", "contactPersons": [ "111948000000038081" ], "send": "true", "exchangeRate": "1.00", "referenceNumber": "testref123", "terms": "test term", "date": "2014-02-16", "adjustment": "1", "discountType": "entity_level", "salesPersonName": "Sam Liyanage", "taxExemptionId": "", "vatTreatment": "", "ignoreAutoNumberGeneration": "true", "avataxUseCode": "", "lineItems": [ { "item_id": "111948000000038093", "name": "Premium Plan - Web hosting", "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases", "rate": 33, "item_order": 0, "quantity": 1, "discount": 0 } ], "note": "test note", "customFields": [ { "index": 1, "value": "15 Aug 2013" } ], "adjustmentDescription": "test ajustment desc", "expiryDate": "2015-02-23", "isDiscountBeforeTax": "false", "shippingCharge": "200", "estimateNumber": "", "discount": "10%", "templateId": "", "avataxExemptNo": "", "taxId": "", "taxAuthorityId": "" }
Related Zoho Books Documentation
https://www.zoho.com/books/api/v3/estimates/#create-an-estimate
Sample Configuration
Following is a sample proxy service that illustrates how to connect to Zoho Books with the init
operation and use the createEstimate operation. The sample request for this proxy can be found in the createEstimate sample request. You can use this sample as a template for using other operations in this category.
Sample proxy
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="zohobooks_createEstimate" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="authToken" expression="json-eval($.authToken)"/> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="organizationId" expression="json-eval($.organizationId)"/> <property name="contactPersons" expression="json-eval($.contactPersons)"/> <property name="send" expression="json-eval($.send)"/> <property name="exchangeRate" expression="json-eval($.exchangeRate)"/> <property name="referenceNumber" expression="json-eval($.referenceNumber)"/> <property name="terms" expression="json-eval($.terms)"/> <property name="date" expression="json-eval($.date)"/> <property name="customerId" expression="json-eval($.customerId)"/> <property name="adjustment" expression="json-eval($.adjustment)"/> <property name="discountType" expression="json-eval($.discountType)"/> <property name="salesPersonName" expression="json-eval($.salesPersonName)"/> <property name="taxExemptionId" expression="json-eval($.taxExemptionId)"/> <property name="vatTreatment" expression="json-eval($.vatTreatment)"/> <property name="ignoreAutoNumberGeneration" expression="json-eval($.ignoreAutoNumberGeneration)"/> <property name="avataxUseCode" expression="json-eval($.avataxUseCode)"/> <property name="lineItems" expression="json-eval($.lineItems)"/> <property name="note" expression="json-eval($.note)"/> <property name="customFields" expression="json-eval($.customFields)"/> <property name="adjustmentDescription" expression="json-eval($.adjustmentDescription)"/> <property name="expiryDate" expression="json-eval($.expiryDate)"/> <property name="isDiscountBeforeTax" expression="json-eval($.isDiscountBeforeTax)"/> <property name="shippingCharge" expression="json-eval($.shippingCharge)"/> <property name="estimateNumber" expression="json-eval($.estimateNumber)"/> <property name="discount" expression="json-eval($.discount)"/> <property name="templateId" expression="json-eval($.templateId)"/> <property name="avataxExemptNo" expression="json-eval($.avataxExemptNo)"/> <property name="taxId" expression="json-eval($.taxId)"/> <property name="taxAuthorityId" expression="json-eval($.taxAuthorityId)"/> <zohobooks.init> <authToken>{$ctx:authToken}</authToken> <apiUrl>{$ctx:apiUrl}</apiUrl> <organizationId>{$ctx:organizationId}</organizationId> </zohobooks.init> <zohobooks.createEstimate> <contactPersons>{$ctx:contactPersons}</contactPersons> <send>{$ctx:send}</send> <exchangeRate>{$ctx:exchangeRate}</exchangeRate> <referenceNumber>{$ctx:referenceNumber}</referenceNumber> <terms>{$ctx:terms}</terms> <date>{$ctx:date}</date> <customerId>{$ctx:customerId}</customerId> <adjustment>{$ctx:adjustment}</adjustment> <discountType>{$ctx:discountType}</discountType> <salesPersonName>{$ctx:salesPersonName}</salesPersonName> <taxExemptionId>{$ctx:taxExemptionId}</taxExemptionId> <vatTreatment>{$ctx:vatTreatment}</vatTreatment> <ignoreAutoNumberGeneration>{$ctx:ignoreAutoNumberGeneration}</ignoreAutoNumberGeneration> <avataxUseCode>{$ctx:avataxUseCode}</avataxUseCode> <lineItems>{$ctx:lineItems}</lineItems> <note>{$ctx:note}</note> <customFields>{$ctx:customFields}</customFields> <adjustmentDescription>{$ctx:adjustmentDescription}</adjustmentDescription> <expiryDate>{$ctx:expiryDate}</expiryDate> <isDiscountBeforeTax>{$ctx:isDiscountBeforeTax}</isDiscountBeforeTax> <shippingCharge>{$ctx:shippingCharge}</shippingCharge> <estimateNumber>{$ctx:estimateNumber}</estimateNumber> <discount>{$ctx:discount}</discount> <templateId>{$ctx:templateId}</templateId> <avataxExemptNo>{$ctx:avataxExemptNo}</avataxExemptNo> <taxId>{$ctx:taxId}</taxId> <taxAuthorityId>{$ctx:taxAuthorityId}</taxAuthorityId> </zohobooks.createEstimate> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>