Tip #4.1 Auto-creating package and shipment records for your offline sales orders

Tip #4.1 Auto-creating package and shipment records for your offline sales orders

Hello,


Hope this post finds you in good health.
Last week we saw how we could automate item weight calculation for your orders. This week we will go a step further and see how you can automate the process of creating packages and shipments for your sales orders. 

To make it easier for the reader, this post has been split into two. Part 1 or tip #4.1 will tell you how you can auto-create package and shipment records in Zoho Inventory for your offline orders while tip #4.2 or part 2 will tell you how to do the same for online orders.

Who is this for?

Any business that ships goods as soon as an order is made and has very less time on their hands for paperwork (same day shipments using a single carrier/by self).


How does this work? 

It all begins with a sales order draft inside of Zoho Inventory. As soon as you email the sales order to a client or manually mark it as confirmed, the system uses this status change as a trigger for creating a package record (with all of the items on your sales order). Once this is done, the system will record a manual shipment record within the system against a preset shipping medium (which can be configured by you as you write the custom function into Zoho Inventory). 

Now, let's see how we can write this custom function for your business.

Setting up the custom function:

Log in to your Zoho account and click on this link to generate an Auth Token which is required to make this work.
  • Open your Zoho Inventory organization.

  • Navigate to Settings using the gear icon from the top-right corner.

  • Select Automation from the sidebar. Now click on the button adjacent to +New Workflow Rule.

  • Out of the four options from the drop-down, select Custom Functions.

  • Now let's add a name for this workflow rule and make sure that there are no spaces between words.

  • Select Sales Orders against module.

  • Add a description if you need one.

  • Now, the workflow type is going to be Event Based.

  • The condition to set shall be, "When a Sales Order is created".

  • And, for the trigger, it will be "When Sales Order status is Confirmed".

  • Now copy and paste this code snippet into the deluge pane:

salesorderID = salesorder.get("salesorder_id"); 

salesorderdate = salesorder.get("date").toDate();

organizationID = organization.get("organization_id");

authtoken = "Copy and paste your authtoken here";

mapper = Map();

customerID = salesorder.get("customer_id").toString();

//package_number = salesorder.get("salesorder_number").replaceFirst("SO","PA");

//mapper.put("package_number",package_number);

mapper.put("customer_id",customerID);

mapper.put("date",salesorderdate);

lineItems = salesorder.get("line_items").toList();

newLineItems = List();

for each lineItem in lineItems

{

lineItemMap = Map();

solineitemID = lineItem.get("line_item_id");

lineItemMap.put("so_line_item_id",solineitemID);

quantity = lineItem.get("quantity");

lineItemMap.put("quantity",quantity);

newLineItems.add(lineItemMap);

}

mapper.put("line_items",newLineItems);

jsonString = Map();

jsonString.put("JSONString",mapper);

response = invokeurl

[

url :"https://inventory.zoho.com/api/v1/packages?authtoken=" + authtoken + "&salesorder_id=" + salesorderID + "&organization_id=" + organizationID

type : POST

parameters:jsonString

];

info mapper;

info response.toMap();

//shipment

pack=response.get("package");

packid=pack.get("package_id");

ship=Map();

ship.put("date",salesorderdate);

ship.put("delivery_method","dhl"); //REPLACE WITH SHIPPING CARRIER NAME OR DELIVERY BY SELF

jsons=Map();

jsons.put("JSONString",ship);

resp = invokeurl

[

url: "https://inventory.zoho.com/api/v1/shipmentorders?package_ids="+packid+"&salesorder_id=" +salesorderID+ "&authtoken="+authtoken+"&organization_id=" + organizationID

type: POST

parameters: jsons

];

info resp.toMap().get("message");


  • Copy and replace your authtoken number with the text on line 4 of the code.

    • authtoken = "copy and paste your authtoken here"to something like, authtoken = "67xxxxxxxxxxxxxxxxx".

  • You can change the carrier name/shipping medium by making changes to line 38 of the code that says: ship.put("delivery_method","dhl"); //REPLACE WITH SHIPPING CARRIER NAME - for e.g., "dhl" can be replaced with "fedex" or something of your choice like say, "delivery_by_self" or "picked_up_by_customer".

  • Note: If you have enabled auto-generation of package numbers for your organization, then you don't need these two lines:

    • //package_number = salesorder.get("salesorder_number").replaceFirst("SO","PA");

    • //mapper.put("package_number",package_number);

  • Once everything is ready, hit Save.


Henceforth, all your offline sales orders (that have been confirmed) will have packages and manual shipment records created inside of Zoho Inventory.

Please check out the part 2 of this post titled - Tip #4.2 Auto-creating package and shipment records for your online sales orders on our forums.

Until next time.

Your everyday end user,
Ajay Aadhithya Chandrasekaran
Zoho Inventory


    • Recent Topics

    • Introducing Bin Locations In Zoho Inventory

      Hello users, We are excited to let you know that your wait for the Bin Locations feature has now come to an end! Yes, you heard us right! We are here to introduce the much-awaited Bin Locations now in Zoho Inventory. But before we dive into the feature
    • Error "Invalid client task found corresponding properties" only when triggered from workflow ?

      Hi All, I am facing an error message I never encountered previously: Error in executing On Add - On Load script Error in executing thisapp.get_all_projects_api_call function. Line:(2) Error in executing thisapp.getAccessTokenFromRefreshToken function.
    • How to interpret Campaign report statistics - definitions/explanation

      I am trying to make sure I understand the Campaign report correctly Do you have a list of definitions for: Delivered - it has reached the recipient's inbox Campaign reach - is this the number that have opened the campaign email? Unique Opens Clicks/Open
    • Add Custom Reports To Dashboard or Home Tab

      Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad
    • Feature request - pin or flag note

      Hi, It would be great if you could either pin or flag one or more notes so that they remain visible when there are a bunch of notes and some get hidden in the list. Sometimes you are looking for a particular name that gets lost in a bunch of less important
    • Schedule a Call by Date and Time when a specific lead status is selected

      Hi Wanting to create a workflow where a call can be scheduled by date & time when a specific lead status is selected. Can only currently set the date by Due Date - Trigger Date - Plus 'x' day(s) Thanks
    • Zoho CRM's Copy Customization functionality now works across DCs, for customized accounts, and more

      Availability This feature is available in Standard, Professional, Enterprise, and Ultimate editions. These changes have been rolled out to all users in all DCs. For more information, please refer to these help documents: Overview | Instructions Hello
    • How can I bold text on Zoho Forms submit buttons?

      In the old theme builder, I could bold the text on a form's submit button. With the new theme builder, I can only change the text of the header or fields in the form, and not the button itself.
    • Stage History

      when viewing a ticket , and you look at stage history tab (kanban view) and look at the stage duration column in days, it shows the current stage of the ticket as " current stage ". Should it not rather show the amount of days it has been in that current
    • 5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ (10/31)

      ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの中野です。 10月開催のZoho ワークアウトについてお知らせします。 今回はZoomにて、オンライン開催します。 参加登録はこちら(無料):https://us02web.zoom.us/meeting/register/BGYTysOnSqa9LA9eY2IKww ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的とした
    • Hiding Pre-defined Views

      You can enhance Zoho with custom views - but you cannot hide the pre-defined views. Most users focus on 4 or 5 views. Right now for EVERY user EVERY time they want to move to one of their 4 or 5 views - they have to scroll down past a long list of pre-defined views - we don't use ANY of the pre-defined views. Adding the feature to allow a predefined view to be hidden completely or only visible to certain users would be a big improvement in usability for Zoho CRM. This feature is already available
    • Rich-text fields in Zoho CRM

      Hello everyone, We're thrilled to announce an important enhancement that will significantly enhance the readability and formatting capabilities of your information: rich text options for multi-line fields. With this update, you can now enjoy a more versatile
    • Send Automated WhatsApp Messages and Leverage the Improved WhatsApp Templates

      Greetings, I hope all of you are doing well. We're excited to announce a major upgrade to Bigin's WhatsApp integration that brings more flexibility, interactivity, and automation to your customer messaging. WhatsApp message automation You can now use
    • [Integration Edition] Deluge Learning Series – Third-Party Integrations with Deluge | October 2025

      We’re excited to continue this three-month edition of the Deluge Learning Series: Session 1 – Integrating Zoho Apps with Deluge Using Built-In Integration Tasks Session 2 – Integrating Zoho Apps with Deluge Using invokeURL and invokeAPI Session 3 – Third-Party
    • Feature Request: Tag, Search, and Report on Individual Private Comments

      Zoho Desk Team, First, I want to say that we are extensive users of Zoho Desk and it is a core part of our support operations. We rely heavily on the private comments feature for internal communication, knowledge sharing, and maintaining a clear history
    • Zoho CRM Community Digest - August 2025 | Part 2

      Hello Everyone! Here's a quick round-up of handy tips, clever workarounds, and product updates from late August. Product Updates: Meeting Enhancements in Zoho CRM! Track whether a meeting is online, in-office, or at the client’s location using the new
    • Assistance Needed: Ticket Status Not Updating and Sorting by Last Customer Reply in Zoho Desk

      Hello, I’m facing two issues in Zoho Desk that I’d like your guidance on: Ticket Status Not Updating: When a customer replies to a ticket, the status does not change to Reopened. Instead, it remains in Waiting on Customer, even after the customer’s response
    • Round robin

      Hi, I'm trying to set up a round robin to automatically distribute tickets between agents in my team but only those tickets that are not otherwise distributed by other workflows or direct assignments. Is that possible and if so which criteria should I
    • Time Entry Notifications

      Hi All - I have support staff who place notes of their work in the time entry section of Zoho Desk. Is there a specific workflow or setting I need to enable to have the ticket holder updated via email when an entry is saved?
    • Change text in help desk

      Hi, Please let me know how can i change the this text, see screenshot.
    • Customer happiness customisation

      Hi, I was wondering if it's possible to somehow customise to whom and when customer happiness request is sent? Can you enable it only for selected tickets for example based on workflow or any other criteria (customer name, tag or anything else)? Also
    • Sign in process is beyond stupid. I'd rather plug my phone into USB and copy files than sign in to this POS.

      792 clicks and fields to fill in just to get into a 3rd rate app is too stupid for me.
    • Cells Border

      Hi I am using Zoho Sheet on S Tab , is there any option to make all border of any cell at once. I think this is very basic which we are missing. This is available in mobile but not in tab or suggest if i am missing this function. And for Tab can you give
    • Zoho Sheets saying locked when not locked

      Zoho Sheets won't let me add more rows to sheet because it's saying the sheet is locked, but the sheet is not locked. I tried using a different browser but I still have the same issue.
    • No Zoho Support Response in Months

      I want to say that I love Zoho FSM, Books, and CRM, but the support is scary bad. About 2-3 months ago, I emailed Zoho FSM support with two specific issues I needed help with, and I have still not received one single response. I also submitted a support
    • Has anyone built a custom AI support agent inside Zoho (SalesIQ/Zobot)?

      Hi all, I’ve been experimenting with building my own AI support assistant and wanted to see if anyone here has tackled something similar within Zoho. Right now, I’ve set up a Retrieval-Augmented Generation (RAG) pipeline outside of Zoho using FAISS. It
    • Null

      If a result is null how do I make it so that a custom error pops up instead of the default error? Can someone write an example as if I were using the script builder?
    • Slow uploads of large files

      I'm wanting to use Workdrive for transferring large images and video (we're talking things from 100MB-5GB). I'm running solo on a 500MBit/sec fiber connection. I'm getting upload speeds to Workdrive of no more than about 1-3Mbytes/sec when going through
    • Format a "return" message

      Good day, Is there a way to format the message of the "return" function in CRM deluge script?
    • Items Below Reorder Point Report?

      Is there a way to run a report of Items that are below the Reorder Point? I don't see this as a specific report, nor can I figure out how to customize any of the other stock reports to give me this information. Please tell me I'm missing something s
    • Change Last Name to not required in Leads

      I would like to upload 500 target companies as leads but I don't yet have contact people for them. Can you enable the option for me to turn this requirement off to need a Second Name? Moderation update (10-Jun-23): As we explore potential solutions for
    • Having Trouble Opening The Candidate Portal

      Recently am having trouble opening the Candidate Portal. It keeps loading but cannot display any widgets. Tried Safari, Chrome and Edge. Non of them work. Please solve the problem ASAP.
    • Dynamically catching new file creations

      I have a team folder with many subfolders, and in those folders we add new documents all the time. I'd like to have a workflow or script to notify me (and then take other actions) when a file is added anywhere in that structure that ends in "summary.txt".
    • Migrate Your Notes from OneNote to Zoho Notebook Today

      Greetings Notebook Users, We’re excited to introduce a powerful new feature that lets you migrate your notes from Microsoft OneNote to Zoho Notebook—making your transition faster and more seamless than ever. ✨ What’s New One-click migration: Easily import
    • Tip of the Week - Spot Risky Sales with Conditional Formatting

      In Zoho Analytics, small tweaks can lead to big insights. One such feature is Conditional formatting based on other columns, your key to instantly spotting where sales success is overshadowed by product returns. Our tip this week shows you how to apply
    • How do I duplicate / copy a campaign

      I am evaluation Zoho Campaigns and sent an email to one of my personal email accounts from Zoho Campaigns.  It went into my junk file in Hotmail. I want to duplicate that same (1-page) campaign and send it to another of my personal accounts to try to
    • For a Bill, can "Pay via Check" - Can we also "Pay via Check" when documenting refund for payment?

      We really like when we have a Bill in Zoho Books that we can record payment by selecting "Pay via Check" and that will cut the check for us from Zoho Books. However, when we have to write checks as a result of invoice overpayment, we can not select "Pay
    • Creator Change History: Ways to improve

      Hi Everyone, Recently been working in developing this change history(an idea from Zoho Forms) - unlike forms that you can this with a click but using Creator, we can use "old" keyword. The concept I come up with is to put the result in a table however,
    • Currency selector (based on variable) usage in comparsion

      Hi, I've developed a currency selector based on the following topic, and it's working well in pivot tables and charts: https://help.zoho.com/portal/en/community/topic/how-can-i-allow-my-users-to-choose-a-currency-for-the-dashboard I also have a comparison
    • Suitability of Zoho One (Single User License) for Multi-State GST Compliance & Cost Analysis

      Hello Zoho Team, I am an e-commerce business owner selling on platforms like Amazon, Flipkart, and Meesho, and I'm currently using their fulfillment warehouses. I have two GSTIN registrations and am planning to register for an additional 2-3 to expand
    • Next Page