Plug Sample #8 - Track your ecommerce order real-time with Zobot - Zoho Commerce integration

Plug Sample #8 - Track your ecommerce order real-time with Zobot - Zoho Commerce integration

Hi Everyone!

Zoho SalesIQ's Zobot is an intelligent tool to increase customer engagement and provide support, especially in the e-commerce industry. A crucial aspect of e-commerce is ensuring your customers can easily keep track of their orders. Just imagine your Zobot providing real-time updates on your customers' order status, tracking URL, shipment details, and estimated delivery dates. Sounds cool, right? That's what we are going to look at in this post. 



Zoho Commerce is a comprehensive e-commerce platform for building a website, accepting orders, tracking inventory, processing payments, and more. With SalesIQ's Zobot seamlessly integrated with Zoho Commerce, you can now provide exceptional support and prioritize convenience for your customers by making your bot actively promote your key offers, assist in tracking orders, create support tickets, and much more. 

To learn more about chatbots usage in the e-commerce industry, check out our exclusive webinar and help article. Now, let's dive into the step-by-step process of how to make your bot track orders with the codeless bot builder.

Overview of tracking orders



Step 1 - Create a connection between SalesIQ and Zoho Commerce.

  •  In your SalesIQ Dashboard, navigate to Settings > Developers > Plugs > Click on Add.
  •  Provide your plug a name, and description, select the Platform as SalesIQ Scripts, and finally, click on Connection to your left bottom. You will be redirected to the connection interface.

  •  Click on Create connection at the top right corner. Under Default connection, select Zoho OAuth service. 

  • Provide your connection name, connection link name, and choose the scopes below.
    • ZohoCommerce.salesorders.READ
    • ZohoCommerce.items.READ
  • Click on Create And Connect to connect Zoho SalesIQ and Zoho Commerce. 


  • Upon successful authentication,  Zoho SalesIQ will be connected with Zoho Commerce. 
Note: The Connection Link Name will be used in the scripts to invoke URL tasks.
 

 

Step 2 - Fetch the "Shipped" orders (Plug 1)

First, let's look at how to list all the shipped orders of the visitor from Zoho Commerce. To do this, we need the email address of the visitor. By List all sales orders API, the bot can fetch all the orders from the visitors (email). Then using the status as a filter, all the Shipped orders can be fetched and displayed to the visitors as options. 

Input Parameter:
  • Name: email | Type: Email
Output Parameter: 
  • Name: orderList | Type : Options list


Copy/paste the below code to list all the shipped orders. 
 
  1. response = Map();
  2. if(session.containsKey("email"))
  3. {
  4. email = session.get("email").get("value");
  5. }
  6. params = Map();
  7. params.put("email",email);
  8. params.put("page","1");
  9. params.put("per_page","5");
  10. header = Map();
  11. //Insert your Zoho Commerce Org ID (From your Zoho Commerce, navigate to the Store > Settings > Organization Profile > Organization ID)
  12. header.put("X-com-zoho-store-organizationid","<org_ID>");
  13. check_status = invokeurl
  14. [
  15. url :"https://commerce.zoho.com/store/api/v1/salesorders"
  16. type :GET
  17. parameters:params
  18. headers:header
  19. connection:"zohocommerce"
  20. ];
  21. array = check_status.get("salesorders");
  22. optionList = List();
  23. for each  entry in array
  24. {
  25. salesorder_id = entry.get("salesorder_id");
  26. URL = "https://commerce.zoho.com/store/api/v1/salesorders/" + salesorder_id;
  27. get_order_details = invokeurl
  28. [
  29. url :URL
  30. type :GET
  31. headers:header
  32. connection:"zohocommerce"
  33. ];
  34. shipping_status = get_order_details.get("salesorder").toList().get(0).get("shipped_status").toUpperCase();
  35. //Printing the shipped orders
  36. if(shipping_status == "SHIPPED")
  37. {
  38. product_ordered = get_order_details.get("salesorder").get("line_items").toList().get(0).get("name");
  39. quantity = get_order_details.get("salesorder").get("line_items").toList().get(0).get("quantity").toNumber();
  40. display_text = product_ordered + " (" + quantity + ")";
  41. optionList.add({"id":salesorder_id,"text":display_text});
  42. }
  43. }
  44. response.put("orderList",optionList);
  45. return response;
  • Then, click Save, preview the plug and Publish it. 
Note: API invoked in the plug List all sales orders 

Step 3- Getting order details (Plug 2)

In the previous step, we fetched all the "Shipped" orders and displayed them to the visitors. When they click on a specific order, the bot will get the order details from the Retrieve sales order API and provide them to the visitor. 

Input Parameter:
  • Name : orderID | Type : String
Output Parameter: 
  • Name: shippingAddress | Type : String
  • Name: deliveredDate | Type : String
  • Name: orderName | Type : String
  • Name: orderNumber | Type : String
  • Name: quantity | Type : Number
  • Name: orderCost | Type : Number
  • Name: trackingUrl | Type : String
  • Name: shippedDate | Type : String
  • Name: paymentMode | Type : String
  • Name: shippingStatus | Type : String


 Copy and paste the below code to get the order details.
 
  1. if(session.containsKey("orderID"))
  2. {
  3. salesorder_id = session.get("orderID").get("value");
  4. }
  5. header = Map();
  6. //Insert your Zoho Commerce Org ID (From your Zoho Commerce, navigate to the Store > Settings > Organization Profile > Organization ID)
  7. header.put("X-com-zoho-store-organizationid","<ord_ID>");
  8. URL = "https://commerce.zoho.com/store/api/v1/salesorders/" + salesorder_id;
  9. get_order_details = invokeurl
  10. [
  11. url :URL
  12. type :GET
  13. headers:header
  14. connection:"zohocommerce"
  15. ];
  16. order_number = get_order_details.get("salesorder").toList().get(0).get("salesorder_number");
  17. product_ordered = get_order_details.get("salesorder").get("line_items").toList().get(0).get("name");
  18. cost = get_order_details.get("salesorder").get("line_items").toList().get(0).get("rate").toNumber();
  19. quantity = get_order_details.get("salesorder").get("line_items").toList().get(0).get("quantity").toNumber();
  20. payment_mode = get_order_details.get("salesorder").get("offline_payment_details").toList().get(0).get("payment_mode");
  21. shipping_address = get_order_details.get("salesorder").get("shipping_address").toList().get(0).get("address");
  22. tracking_url = get_order_details.get("salesorder").get("packages").toList().get(0).get("status_message");
  23. shipping_address = get_order_details.get("salesorder").get("shipping_address").toList().get(0).get("address");
  24. shipping_status = get_order_details.get("salesorder").toList().get(0).get("shipped_status").toUpperCase();
  25. if(shipping_status == "FULFILLED")
  26. {
  27. shipping_status = "Delivered";
  28. tracking_url = "No tracking URL";
  29. delivered_date = get_order_details.get("salesorder").get("packages").toList().get(0).get("shipment_date");
  30. shipped_date = get_order_details.get("salesorder").get("packages").toList().get(0).get("shipment_date");
  31. }
  32. else if(shipping_status == "SHIPPED")
  33. {
  34. shipping_status = "Shipped";
  35. tracking_url = get_order_details.get("salesorder").get("packages").toList().get(0).get("status_message");
  36. shipped_date = get_order_details.get("salesorder").get("packages").toList().get(0).get("shipment_date");
  37. delivered_date = get_order_details.get("salesorder").get("packages").toList().get(0).get("shipment_date");
  38. }
  39. else
  40. {
  41. shipping_status = "Yet to Ship";
  42. tracking_url = "No tracking URL available";
  43. shipped_date = "NA";
  44. delivered_date = "NA";
  45. }
  46. response = Map();
  47. response.put("orderNumber",order_number);
  48. response.put("orderCost",cost);
  49. response.put("orderName",product_ordered);
  50. response.put("quantity",quantity);
  51. response.put("shippingStatus",shipping_status);
  52. response.put("paymentMode",payment_mode);
  53. response.put("shippingAddress",shipping_address);
  54. response.put("trackingUrl",tracking_url);
  55. response.put("shippedDate",shipped_date);
  56. response.put("deliveredDate",delivered_date);
  57. return response;
  • Then, click Save, preview the plug and Publish it. 
Note: API invoked in the plug Retrieve sales order
 

Step 4 - Adding these plugs to the Codeless bot builder

  • Navigate to Settings > Bot > Add, provide the necessary information, and select Codeless Bot as a bot platform or open an existing bot.
  • To list the shipped orders, get the email address from the visitor by email card. 
  • Then, select the Plugs under Action Cards and select listShippedOrder (Plug 1). In the input parameters, select the Email context variable and provide a name (tracking.order) to save the list of shipped orders. 


  • Next, use the Single choice card to display all the shipped orders. Provide an option "Can't find my order" and click on dynamic suggestions and select the (tracking.order) variable. 

  • Next, click on Save in bot context (post.tracking.order) and store the visitor's order choice. 

  • Then, use the criteria router to route the flow based on the visitor's choice. 

  • After that, select the orderDetails plug in Plug card. And provide the post.tracking.order as the input and provide names for the outputs. 



  • Finally, use these context variables by typing % in the Send message card to display the order details to track orders. 

  • Also, use the markups to provide the tracking URL as a hyperlink.  


Bot Preview (Output)

  • The bot will ask for the email address and then provide the "shipped" orders list.  

  • Then the visitor selects one order, and the bot will provide the information about the order.  

  • Once the bot flow is complete, click Publish to deploy Zobot on your website or online store. Zobot will be ready to engage with your customers, provide support, and assist with their purchasing journey.
 
Related links:
To know more about the features of Zobot, kindly visit our Resources Section. 

    Access your files securely from anywhere


          All-in-one knowledge management and training platform for your employees and customers.






                                Zoho Developer Community




                                                      • Desk Community Learning Series


                                                      • Digest


                                                      • Functions


                                                      • Meetups


                                                      • Kbase


                                                      • Resources


                                                      • Glossary


                                                      • Desk Marketplace


                                                      • MVP Corner


                                                      • Word of the Day


                                                      • Ask the Experts





                                                                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

                                                                                                  Get Started. Write Away!

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

                                                                                                    Zoho CRM コンテンツ





                                                                                                      Nederlandse Hulpbronnen


                                                                                                          ご検討中の方





                                                                                                                    • Recent Topics

                                                                                                                    • Auto-approval for shared key access not working for new users

                                                                                                                      Hello, I'm an admin of a Zoho Vault organization (34 active users, ZOHO identity provider). I have the "Auto-approval for shared key access" setting enabled in Settings → Fine-Grained Controls → Global, but it does not work as expected. The problem: When
                                                                                                                    • Zoho Analytics UI Bug

                                                                                                                      Hello, all, The Aggregate Formulas in Zoho Analytics' list of fields have a 3-dot menu: If the formula has a long name, the name is not fully visible in the list, and a 3-dot menu is not accessible from it: This is not convenient, especially when the
                                                                                                                    • Canvases Auto-Skewing/Adding Scroll Bars When They Were Not There Prior

                                                                                                                      Is anyone else noticing rendering issues in their canvases today? It seems to be mainly icons which now have scroll bars added which makes them all look off, though some fields seemed to revert to squished length as well. Were the icons replaced with
                                                                                                                    • Ability to Use Both AND and OR When Creating Rules (Advanced Conditions)

                                                                                                                      I'd like to be able to use more complicated logic when setting up rules. E.g. in Zoho Mail, I can choose "Advanced conditions (AND/OR) to create a rule that can be applied to multiple subject lines from the same sender. But in Zoho TeamInbox, I will have
                                                                                                                    • Marketing Tip #37: Reduce purchase doubts with better product images

                                                                                                                      When customers shop online, they cannot pick up, turn around, or inspect a product in person. That is why your product images need to do more of the selling. Two simple upgrades can make a big difference: Use zoom-friendly images so customers can look
                                                                                                                    • Why don't Zia agents support file uploads?

                                                                                                                      I am trying to build a Zia Agent that allows uploading of a PDF file and uses the GLM5 model to process it and extract information. But agents.zoho.com has no way to enable file uploads on the agent. Additionally, GLM5 based agents keep outputting their
                                                                                                                    • Zia Agent built in ChatKit UI does not render markdown

                                                                                                                      Hi, You have a major shortcoming in the Zia Agent UI. The test UI that is embedded in agents.zoho.com allows you to test the agent has full support for rendering markdown, but your ChatKit UI does not have support for rendering markdown. If I embed it
                                                                                                                    • How to use Zoho Billing info in a workflow

                                                                                                                      We have Zoho Billing and CRM sync'd and the Billing info appears as expected for each Account in Zoho CRM, including subscription status, plan type etc. But how can we use this in a workflow? Thanks Dylan
                                                                                                                    • Zoho Forms - Failed CRM Sync Improvement

                                                                                                                      I'd like to suggest an enhancement to the Zoho Forms and Zoho CRM integration. Currently, once a form entry has been submitted, there is no simple way to push that individual entry to CRM again if needed. Before anyone mentions it, I am aware that the
                                                                                                                    • Will I see emails sent via campaigns in CRM?

                                                                                                                      It would be useful for people to be able to see emails sent via campagins in Zoho CRM is that possible?
                                                                                                                    • Cliq iOS can't see shared screen

                                                                                                                      Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
                                                                                                                    • Zoho Books | Product updates | June 2026

                                                                                                                      Hello users, Welcome to this month's roundup of what's new in Zoho Books! We have an exciting line-up this time. The highlight is the launch of the all-new France Edition with full ISCA compliance. We're also introducing features such as Layout Rules
                                                                                                                    • What is MCP and How Does It Connect to Zoho Invoice?

                                                                                                                      If you've ever wished you could just tell your invoicing software what to do, without clicking through menus, pulling up reports manually, or switching tabs every five minutes, that's exactly what the Zoho MCP server is built for. MCP stands for Model
                                                                                                                    • Add spaces to input format

                                                                                                                      In Zoho Inovices, I am trying to do a custom input format for a custom field. I have tried a few variations, but this is my most recent: ^[a-z][A-Z][0-9][,][-][_][:][ ]$ In this field, I will be entering different alphanumeric information, depending on
                                                                                                                    • Enhancement in Zoho CRM: Introducing New Return Types for String Fields Based on Character Length

                                                                                                                      Dear Customers, We hope you’re well! In Zoho CRM, formula field with string return type is used in various scenarios where text is involved like concatenating customers’ first and last names, trimming characters from texts, performing find and replace
                                                                                                                    • GLM 5 not available

                                                                                                                      Hello, I am trying to setup a Zia Agent using agents.zoho.com. The settings says that GLM5 is among the list of free zoho hosted models available. However, when I try to setup an agent and pick a model from the list only GLM 4.7 Flash is available. How
                                                                                                                    • Supervisor Rules --> Custom Function

                                                                                                                      Hello, currently I can't add a custom function to a supervise rule. Is there a reason for this? Background: We have BluePrint managed tickets and actually we have a Supervise rule which should set the ticket to "closed" after 168 hours since the last
                                                                                                                    • Vault Chrome Extension Asks for Master Password every single time

                                                                                                                      Is this supposed to be a feature, or is this a bug?  My assumption is that it's a bug, because every time I click on the Extension, there is a red exclamation mark/notification on the Zoho Vault extension.  Is the idea with the Extension that I have to
                                                                                                                    • What's New in Zoho Inventory | April & May 2026

                                                                                                                      Hello users, We're excited to roll out the latest Zoho Inventory updates for April and May 2026. These enhancements are designed to make your daily operations smoother and more efficient, from advanced inventory management and flexible pricing to automated
                                                                                                                    • How to display Pick List values with vertical separation in Canvas

                                                                                                                      I have a Multi-Select Pick List whose values I would like displayed vertically. So far, I have only been able to figure out how to adjust the width and other sizing of the field itself or even how to wrap the values to the next line below. I am trying
                                                                                                                    • "Make online" not clearing previously downloaded files from disk

                                                                                                                      I downloaded a large folder via "Make offline" so I could copy it to another location. This worked. When I was done I hoped that "Make online" would restore it to the previous state where those files are not stored locally in TrueSync. This did not work—Finder
                                                                                                                    • Permission Denied for Worklogs URL

                                                                                                                      We're attempting to pull worklogs data from service desk plus and when using the below URL we are met with a message stating we do not have permission. https://sdpondemand.manageengine.com/api/v3/requests/xxxxxx/worklogs/ We used SDPOnDemand.requests.ALL
                                                                                                                    • Anyone in Australia using Zoho Books AND has their account with NAB?

                                                                                                                      Hi I have an account with both NAB and Suncorp. Suncorp transaction come in the next day however NAB transactions take 4-5 business days to appear. eg: A deposit made today in my Suncorp will be imported into Zoho tomorrow. A deposit made today to the NAB account will be imported maybe Saturday (Friday overnight). I have contacted both Zoho and NAB but noone seems to know why. I was just wondering if anyone else in Australia uses NAB and has this issue (or doesn't) maybe we could compare notes and
                                                                                                                    • Please Make Zoho CRM Cadences Flexible: Allow Inserting and Reordering Follow-Up Steps

                                                                                                                      Sales processes are not static. We test, learn, and adapt as customers respond differently than expected. Right now, Zoho Cadences do not support inserting a new step between existing follow-ups or changing the type of an existing primary step. If I realize
                                                                                                                    • Partner with HDFC And Sbi Bank.

                                                                                                                      Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
                                                                                                                    • #12 Never Leave a Billable Hour Behind

                                                                                                                      A client approves a website redesign project. The estimated effort? 40 hours. The project is going well. A few additional review meetings are scheduled. Several rounds of content changes are requested. A few "quick fixes" get added along the way. The
                                                                                                                    • Close task on Completion Date entry

                                                                                                                      This discussion is similar to my issue: "backdated-task-completion-date" discussion Scenario: A bunch of tasks have been completed. But, they have not been closed. Time goes by You finally get around to closing those tasks Projects assigns the date the
                                                                                                                    • Can I add Conditional merge tags on my Templates?

                                                                                                                      Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                                                                                                    • Records from ATE 29: Knowledge Base, Community, and AI for smarter user education

                                                                                                                      Hi Everyone, "Ask the Experts 29" was an engaging session, where we explored how to utilize the Knowledge Base for customers and internal teams, as well as emphasizing the importance of our Community. This post highlights the questions and use cases discussed,
                                                                                                                    • Deleted User Emails

                                                                                                                      I need to delete a user as I need to re-use their license, but I'd like to keep all their emails that are attached to various contacts in the CRM. Their emails are hosted externally on an M365 license. Anyone any idea how best to engineer this? TIA
                                                                                                                    • Its 2022, can our customers log into CRM on their mobiles? Zoho Response: Maybe Later

                                                                                                                      I am a long time Zoho CRM user. I have just started using the client portal feature. On the plus side I have found it very fast and very easy (for someone used to the CRM config) to set up a subset of module views that make a potentially extremely useful
                                                                                                                    • Zoho CRM upload files error

                                                                                                                      Since today, we have been experiencing issues with uploading photos to opportunities. The message indicates that the storage is full, but as far as I can see, there is still plenty of space available. Could there be an issue or a bug?
                                                                                                                    • Kaizen #246 - Incoming Lead Email Intent Detection using Zia Assistant API in Zoho CRM

                                                                                                                      Hello all! Welcome back to a fresh Kaizen week. In this post, we will explore how Zia detects positive intent from incoming emails in the Leads module using the Zia Assistant API along with Workflow Rules and Custom Functions in Zoho CRM. Use Case Problem
                                                                                                                    • Smart URL Determination

                                                                                                                      I would like to see Vault implement some sort of "smart" URL determination. When one starts to add a new username-password combination from a new site, Vault brings in the exact URL of the page from which this is happening. All too often, it looks something
                                                                                                                    • Removing To or CC Addresses from Desk Ticket

                                                                                                                      I was hoping i could find a way to remove unnecessary email addresses from tickets submitted via email. For example, a customer may email the support address AND others who are in the helpdesk notification group, in either the TO or CC address. This results
                                                                                                                    • Tip #76- Exploring Technician Console: Quick Launch- 'Insider Insights'

                                                                                                                      Hello Zoho Assist Community! Welcome back to our Technician Console series. Last time we explored Power Options, and this time we are turning the spotlight on a feature that quietly saves you dozens of clicks in every session by getting you exactly where
                                                                                                                    • Multi-Book Accounting Support in Zoho Books

                                                                                                                      Currently, businesses that operate multiple entities, regions, or divisions need to maintain separate Zoho Books instances or resort to manual consolidation processes. This creates significant operational friction and increases the risk of errors. PROBLEM:
                                                                                                                    • Automated Multi-Subsidiary Consolidation Engine in Zoho Books

                                                                                                                      For organizations managing multiple subsidiaries across different geographies or business units, consolidation is a quarterly/annual nightmare. Zoho Books lacks native consolidation tools, forcing companies to export data, manipulate it in Excel, and
                                                                                                                    • Zoho Books | Product updates | April 2026

                                                                                                                      Hello users, Welcome to our April 2026 product updates roundup! Highlights include profit margin for sales transactions, insights in reports, recording deposits from undeposited funds in banking, and faster production workflows with improved assembly
                                                                                                                    • Unable to charge GST on shipping/packing & Forwarding charges in INDIA

                                                                                                                      Currently, tax rates only apply to items. It does not apply tax to any shipping or packing & forwarding charges that may be on the order as well. However, these charges are taxable under GST in India. Please add the ability to apply tax to these charges.
                                                                                                                    • Next Page