Kaizen #53 - Sales Orders #API

Kaizen #53 - Sales Orders #API

Hello everyone!
Welcome back to another week of Kaizen.
In this post, we will discuss inserting, updating, and deleting a Sales Order via an API.

What is a Sales Order?
A Sales Order is a document sent to your customers to confirm the items and prices of a sale. It is usually created after a quote is accepted by your customers, and your items are ready to be shipped or delivered to them.

Getting a Sales Order
Use the Get Records API to get the record(s) from the Sales Order module.

Request URL: {api-domain}/crm/v2/Sales_Orders (or)
                        {api-domain}/crm/v2/Sales_Orders/ {record_id}
Request Method: GET

Sample Response



Creating a Sales Order
Use the Insert Records API to insert a record in the Sales Order module.

Request URL: {api-domain}/crm/v2/Sales_Orders
Request Method: POST

Sample Input

{
    "data": [
        {
            "Account_Name": {
                "id": "3652397000000624046"
            },
            "Subject": "SO Kaizen 53",
            "Product_Details": [
                {
                    "product": {
                        "id": "3652397000000416001"
                    },
                    "quantity": 10,
                    "Discount": 20,
                    "Unit Price": 1000,
                    "line_tax": [
                        {
                            "percentage": 10,
                            "name": "Sales Tax"
                        },
                        {
                            "percentage": 1,
                            "name": "VAT"
                        }
                    ]
                }
            ]
        }
    ]
}

Request JSON

Key 
Description
Account_Name
Mandatory, JSON object
The record ID of the account you want to associate the sales order with. Use the Get Records API to fetch the Account_Name.
Subject
Mandatory, string
The subject line of your sales order.
Product_Details
Mandatory, JSON array
An array of details of the product you want to generate the sales order for. For more details on the keys inside this array, refer to our post on Handling product line items in the inventory modules.
Owner
Optional, JSON object
The record ID of the owner you want to assign this sales order record to. Use the Get Users API to fetch the owner's details.
Deal_Name
Optional, JSON object
The record ID of the deal you want to associate with this sales order. Use the Get Records API to fetch the Deal_Name.
Quote_Name
Optional, JSON object
The record ID of the quote that is associated with the sales order.
Contact_Name
Optional, JSON object
The record ID of the contact you want to associate with the sales order. Use the Get Records API to fetch the Contact_Name.
Discount
Optional, integer
The discount you want to offer on the sales order.
Description
Optional, string
A description of the sales order.
Customer_No
Optional, string
The customer number that you are generating the sales order for. This is for your own internal reference.
Tax
Optional, integer
The tax you want to apply for the sales order (this is different from the tax inside the product details section, which pertains to the taxes levied on that product).
Carrier
Optional, string
The name of the carrier that will ship the sales order. You can get the possible values through the Fields Metadata API.
Sales_Commission
Optional, integer
The commission that is applicable for the sale.
Due_Date
Optional, string
The date in the yyyy-mm-dd format on which the sales order is due.
Adjustment
Optional, integer
The adjustment in the sale, if any, that is added to the grand total of that product.
Terms_and_Conditions
Optional, string
The terms and conditions of the sales order, if any.
Excise_Duty
Optional, integer
The excise duty levied on the sale of the product, if any.
$line_tax
Optional, JSON array
The tax that you want to apply to the Sub Total of the line items while generating the sales order. For more details,  refer to Handling product line items in the inventory modules.
Status
Optional, string
The status of the sales order. You can get the possible values through the Fields Metadata API.

Apart from the above keys, you can also specify the keys about the billing and shipping details. Go to Setup > Developer Space > APIs > API Names > Sales Orders to know the API names of these fields. You can also use the Fields Metadata API.

Sample Response



Note
  • You can insert a maximum of 100 sales orders in an API call.
  • You can associate up to 200 products with a sales order. Add a JSON object for each product in the Product_Details section.

Updating a Sales Order
Use the Update Records API to update the record(s) in the Sales Order module.

Request URL: {api-domain}/crm/v2/Sales_Orders/record_id (or)
{api-domain}/crm/v2/Sales_Orders (with record IDs in the input body)
Request Method: PUT

Sample Input
In this example, we have updated the product associated with the sales order.



Sample Response



Note
  • You can update a maximum of 100 sales orders in an API call. 
  • When you update multiple sales orders in a single call, pass the record ID of each sales order in the JSON object under the root key "data". Example:
    {
        "data": [
            {
    "id":"3652397000002791035",
            },
            {
    "id":"3652397000002791004",
            }
        ]
    }

Deleting a Sales Order
Use the Delete Records API to delete the record(s) in the Sales Order module.

Request URL: {api-domain}/crm/v2/Sales_Orders/{record_id} (or)
                         {api-domain}/crm/v2/Sales_Orders?ids=record_id1,record_id2
Request Method: DELETE

Sample Response



Note
You can delete a maximum of 100 sales orders in a single API call.


We hope you found this post useful. Let us know your questions and feedback in the comments section, or write to us at support@zohocrm.com.

Cheers!





    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




                                                            • Sticky Posts

                                                            • Kaizen #197: Frequently Asked Questions on GraphQL APIs

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                              Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

                                                              Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
                                                            • Kaizen #193: Creating different fields in Zoho CRM through API

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Client Script | Update - Introducing Commands in Client Script!

                                                              Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands


                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • New in Cadences: Option to Resume or Restart follow-ups when re-enrolling records into a Cadence, and specify custom un-enrollment criteria

                                                                                                              Managing follow-ups effectively involves understanding the appropriate timing for reaching out, as well as knowing when to take a break and resume later, or deciding if it's necessary to start the follow-up process anew. With two significant enhancements
                                                                                                            • Email Reminders on Shared Calendars

                                                                                                              How do we turn off the setting that emails reminders to everyone who has accepted or declined a calendar invite? If 8 of us have been invited to the same meeting, we receive 8 notifications for every step of the process, from invitation to decision.
                                                                                                            • Default Sorting on Related Lists

                                                                                                              Is it possible to set the default sorting options on the related lists. For example on the Contact Details view I have related lists for activities, emails, products cases, notes etc... currently: Activities 'created date' newest first Emails - 'created
                                                                                                            • additional accounts

                                                                                                              If I brought 5 emails to my account. Can I later buy additional emails.
                                                                                                            • Passing the CRM

                                                                                                              Hi, I am hoping someone can help. I have a zoho form that has a CRM lookup field. I was hoping to send this to my publicly to clients via a text message and the form then attaches the signed form back to the custom module. This work absolutely fine when
                                                                                                            • Zoho Workdrive - Communication Bar

                                                                                                              Hi Team, Please consider adding an option to allow admins to turn on or off the Zoho Communication Bar. Example of what I mean by Communication Bar: It's such a pain sometimes when I'm in WorkDrive and I want to share a link to a file with a colleague
                                                                                                            • How can I track which zoho users are actively using Zoho CRM

                                                                                                              I have several licenses of Zoho CRM. We now need to add a new user. I could purchase a new license, but before I do, I would like to see if any of our existing users are not actively using the license assigned to them. How can I determine the activity
                                                                                                            • WebDAV / FTP / SFTP protocols for syncing

                                                                                                              I believe the Zoho for Desktop app is built using a proprietary protocol. For the growing number of people using services such as odrive to sync multiple accounts from various providers (Google, Dropbox, Box, OneDrive, etc.) it would be really helpful if you implemented standard protocols such as WebDAV / FTP / SFTP so that alternative inc clients can be used.
                                                                                                            • mask Customer phone number and agents cant see customer phone number

                                                                                                              Is there any way we can integrate Zoom Phone with Zoho CRM while ensuring that customer phone numbers remain masked? We need a solution where agents can make outbound calls but cannot see customer phone numbers. Please let us know if there is any solution
                                                                                                            • Open Sans Font in Zoho Books is not Open Sans.

                                                                                                              Font choice in customising PDF Templates is very limited, we cannot upload custom fonts, and to make things worse, the font names are not accurate. I selected Open Sans, and thought the system was bugging, but no, Open Sans is not Open Sans. The real
                                                                                                            • How to refresh a ticket view ?

                                                                                                              I am doing a widget where I send a rest api call to make a new draft to the ticket I am viewing. The issue is sometimes it refresh a ticket view and I can see inserted draft right away, but sometimes I do not see it even if it is inserted correctly and
                                                                                                            • Ugh! - Text Box (Single Line) Not Enough - Text Box (Multi-line) Unavailable in PDF!

                                                                                                              I provide services, I do not sell items. In each estimate I send I provide a customized job description. A two or three sentence summary of the job to be performed. I need to be able to include this job description on each estimate I send as it's a critical
                                                                                                            • Automatic Project Owner change

                                                                                                              Is there a way to change Project Owner automatically once a specific Milestone in a project is marked as completed. Different Teams are working on projects in our Org, they have their own Milestones to complete and so we transfer the project from team
                                                                                                            • customer data security

                                                                                                              We are exploring ways to enhance our within Zoho CRM. Our Goal: We want to fully integrate RingCentral with Zoho CRM to enable click-to-call functionality for our sales team. However, to comply with data privacy regulations and protect customer contact
                                                                                                            • Supervisor Rules - Zoho Desk

                                                                                                              Hi, I have set up a Supervisor Rule in Zoho Desk to send an email alert when a ticket has been on hold for 48 hours. Is there a way to change it so that the alert only sends once and not on an hourly basis? Thank you Laura
                                                                                                            • ResponseCode 421, 4.7.0 [TSS04] Messages from 136.143.188.51 temporarily deferred due to user complaints

                                                                                                              Had email bounce. Let me know if you can fix this. Thanks. Michael
                                                                                                            • Sync CRM inventory data with Zoho Books

                                                                                                              I just switched everything over to ZoHo books, but I am trying to find out why the CRM Estimates, Invoices, and Sales Orders created in ZoHo CRM are not then duplicated in ZoHo Books? I had Quickbooks before, and had to do everything twice, I thought
                                                                                                            • Track Zoho Campaign and Workflow sales impact

                                                                                                              I am attempting to measure the performance of our marketing workflows and campaigns by comparing the date each campaign was sent to a contact with the purchase date of the contact. For example, if Contact A was sent Email A on 9/1 and made a purchase
                                                                                                            • Automation #15: Automatically Adding Static Secondary Contacts

                                                                                                              Rockel is a top-tier client of Zylker traders. Marcus handles communications with Rockel and would like to add Terence, the CTO of Zylker traders to the email conversations. In this case, the emails coming from user address rockel.com should have Terence
                                                                                                            • Fuel up your sales with the Zoho SalesIQ + Bigin integration

                                                                                                              Hi everyone! We’re happy to bring you the all-new Zoho SalesIQ + Bigin integration. With this, every prospect from your website instantly becomes a contact in Bigin, complete with transcripts and follow-up tasks, so you never lose a lead again. Let's
                                                                                                            • New Zoho triggers Google Dangerous flag due toabnormal charcters

                                                                                                              Just signed up and doing my first email test. I sent it to my google email account but it got flagged as Dangerous" due abnormal characters. My DNS setup looks ok. Page snips attached Help Please Thanks, Rick DC PowerWorld
                                                                                                            • Top Bar Shifting issue still not fixed yet

                                                                                                              I mentioned in a previous ticket that on Android, the top bar shifts up when you view collections or when you're in the settings. That issue still hasn't been fixed yet. I don't wanna have to reinstall the app as I've noticed for some reason, reinstalling
                                                                                                            • Introducing Connected Records to bring business context to every aspect of your work in Zoho CRM for Everyone

                                                                                                              Hello Everyone, We are excited to unveil phase one of a powerful enhancement to CRM for Everyone - Connected Records, available only in CRM's Nextgen UI. With CRM for Everyone, businesses can onboard all customer-facing teams onto the CRM platform to
                                                                                                            • Triggering Zoho Flow on Workdrive File Label

                                                                                                              Right now Im trying to have a zoho flow trigger on the labeling/classification of a file in a folder. Looking at the trigger options they arent great for something like this. File event occurred is probably the most applicable, but the events it has arent
                                                                                                            • Is there a way to set Document Owner/Sender via the API

                                                                                                              When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
                                                                                                            • SendMail to multiple recipients

                                                                                                              Hi, I'm trying to send an email to a list of recipients.  Right now the "to" field is directed to a string variable. (List variables won't work here). In the string variable, how can I make it work? trying "user@app.com;user2@app.com" or "user@app.com; user2@app.com" just failed to send the emails. Ravid
                                                                                                            • Populate drop down field from another form's subform

                                                                                                              Hello, I found how to do that, but not in case of a subform. I have a Product form that has a subform for unit and prices. A product might have more than one unit. For example, the product "Brocoli" can be sold in unit at 3$ or in box of 10 at 25 $. Both
                                                                                                            • Usar o Inventory ou módulo customizado no CRM para Gestão de Estoque ?

                                                                                                              Minha maior dor hoje em usar o zoho é a gestão do meu estoque. Sou uma empresa de varejo e essa gestão é fundamental pra mim. Obviamente preciso que esse estoque seja visível no CRM, Inicialmente fiz através de módulos personalizados no próprio Zoho CRM,
                                                                                                            • Signup forms behaviour : Same email & multiple submissions

                                                                                                              My use case is that I have a signup form (FormA) that I use in several places on my website, with a hidden field so I can see where the contact has been made from. I also have a couple of other signup forms (FormB and FormC) that slight differences. All
                                                                                                            • getting error in project users api

                                                                                                              Hello, I'm getting a "Given URL is wrong" error when trying to use the Zoho Projects V3 API endpoint for adding users to a project. The URL I'm using is https://projectsapi.zoho.com/api/v3/portal/{portalid}/projects/{projectid}/projectusers/ and it's
                                                                                                            • Change total display format in weekly time logs

                                                                                                              Hi! Would it be possible to display the total of the value entered in the weekly time log in the same format that the user input? This could be an option in the general settings -> display daily timesheet total in XX.XX format or XX:XX.
                                                                                                            • Problem with Submit Button Design

                                                                                                              I have made a template to apply to my forms and under the button controls, I have it set to "standard" and yet it's still filling the container. This is super frustrating and looks weird. Why do we not have full control over button size? How can I fix
                                                                                                            • In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subf

                                                                                                              In the Zoho Creator Customer Payment form i Have customer field on select of the field Data want to fetch from the invoice from based on the customer name In the Customer Payment form i Have subform update Invoice , there i have date field,Invoice number
                                                                                                            • Different Company Name for billing & shipping address

                                                                                                              We are using Zoho Books & Inventory for our Logistics and started to realize soon, that Zoho is not offering a dedicated field for a shipping address company name .. when we are creating carrier shipping labels, the Billing Address company name gets always
                                                                                                            • How to display historical ticket information of the total time spent in each status

                                                                                                              Hi All, Hoping someone can help me, as I am new to Zoho Analytics, and I am a little stuck. I am looking to create a bar chart that looks back over tickets raised in the previous month and displays how much time was spent in each status (With Customer,
                                                                                                            • Zoho Projects iOS app update: Global Web Tabs support

                                                                                                              Hello everyone! In the latest version(v3.10.10) of the Zoho Projects app update, we have brought in support for Global Web Tabs. You can now access the web tabs across all the projects from the Home module of the app. Please update the app to the latest
                                                                                                            • Zoho Community Weekend Maintenance: 13–15 Sep 2025

                                                                                                              Hi everyone, We wanted to give you a heads-up that Zoho Community will undergo scheduled maintenance this weekend. During this period, some community features will be temporarily unavailable, while others will be in read-only mode. Maintenance Window:
                                                                                                            • Agent Performance Report

                                                                                                              From data to decisions: A deep dive into ticketing system reports An agent performance report in a ticketing system provides a comprehensive view of how support agents manage customer tickets. It measures efficiency and quality by tracking key performance
                                                                                                            • Show both Vendor and Customers in contact statement

                                                                                                              Dear Sir, some companies like us working with companies as Vendor and Customers too !!! it mean we send invoice and also receive bill from them , so we need our all amount in one place , but in contact statement , is separate it as Vendor and Customer, 
                                                                                                            • Pourquoi dans zohobooks version gratuite on ne peut ajouter notre stock d'ouverture??

                                                                                                              Pourquoi dans zohobooks version gratuite on ne peut ajouter notre stock d'ouverture ??
                                                                                                            • Next Page