Need Help with Creating a Sales Order Form on Creator

Need Help with Creating a Sales Order Form on Creator

I asked ChatGPT to write me some code for a sales order form that pulls data from Zoho Books and Zoho CRM. Essentially, I want to be able to check for duplicates using the email address, and also pull the auto-generated sales order number from Books. Then, when the sales order is filled, redirect to a page that says: Pending Appoval. Submit it for approval, when it's approved, automatically convert it to an invoice and go to a payment page.

This is my ChatGPT prompt:
1. Allow users to sign in using their Zoho Email and password. 2. User enters basic contact information into it. Check Zoho CRM / Books for duplicates using email address. If the record exists, use that record. If it doesn't exist, create a new record. Pull the tax rate from the record in Zoho Books if it exists. Allow users to change the tax rate from the available rates in the picklist that exists in Zoho Books. Apply this default tax rate to line items in step 2. 3. Allow users to select any number of products using a subform. Show images of each product, and allow sales reps to apply discounts to each line item. Pull these products from our product list inside of Zoho Books. We have already integrated Zoho Inventory with Zoho Books, so the products already display inside of Books. Show the tax rate for each product as well in each line item. Essentially copy the layout of sales orders and invoices from books in include it in this form. Include a grand total section, with a subtotal field, total tax field in dollars, shipping charge field, and price adjustment field. Apply tax only to subtotal, not shipping. 4. Once the sales order is good to go, show a button that says Submit for Approval. Then, send a webhook for the sales order that is pending approval, and a manager will approve the sales order. 5. Once the sales order is approved, automatically convert it into an Invoice and allow payment processing through Square. We have already integrated Square with Zoho Books. Get the payment link from the invoice, and redirect to that payment page. 6. After payment is processed, redirect to a thank you page.

This is what is responded with:

  1. // Step 1: Allow users to sign in using their Zoho Email and password.
    // Assuming you have a form with username and password fields

    // Step 2: Check for duplicates in Zoho CRM/Books and handle contact information
    // Here's a basic example of how you might do this

    // Check if contact exists in Zoho CRM or Books
    existingContact = zoho.crm.searchRecords("Contacts", "email:email_address");

    if(existingContact.isEmpty()) {
        // Create new contact
        newContact = zoho.crm.createRecord("Contacts", {"Email": input.email});
        // Check for tax rate in Zoho Books and set default tax rate
        // Code to pull tax rate from Zoho Books and set default tax rate
    } else {
        // Use existing contact
        existingContact = existingContact.get(0); // Assuming only one contact is found
        // Code to pull tax rate from existing contact in Zoho Books and set default tax rate
    }

    // Step 3: Allow users to select products and apply discounts
    // Assuming you have a subform for selecting products with fields like product name, quantity, price, discount, etc.

    // Step 4: Submit for Approval and send webhook
    // Assuming you have a button to submit for approval

    // Submit data to webhook
    response = postUrl("<webhook_url>", inputData);

    // Step 5: Convert sales order to invoice and process payment through Square
    // Assuming you have a button to convert to invoice and process payment

    // Convert sales order to invoice in Zoho Books
    invoice = zoho.books.createInvoice(inputData);

    // Get payment link from invoice (assuming Square integration is already set up)
    paymentLink = invoice.get("payment_link");

    // Redirect to payment page
    openUrl(paymentLink);

    // Step 6: Redirect to thank you page after payment processing
    // Assuming you have a thank you page URL to redirect to
    redirectUrl("<thank_you_page_url>");



        • Recent Topics

        • Subforms in stateless forms

          I think the title says it all. We need to be able to add subforms to stateless forms. Currently the only workaround is to create a Form and delete each record upon submission of the form. I need to build an interface to update our inventory. Basically
        • Text wrap column headers in reports?

          Is it possible to auto wrap column headers so that a longer multi-word header displays as two lines when the column is narrower than the width of the header title?
        • Request to Permanently Delete Email User (info@mehboobgulf.com ) from Old Organization

          “Please permanently delete the user email info@mehboobgulf.com It is still associated with my old Zoho organization. I cannot delete it because it shows ‘You cannot delete email. Zoho host’. I need to use this email in a new Zoho account.” I shell very
        • Request to Permanently Delete Email User (info@mehbobgulf.com ) from Old Organization

          Please permanently delete the user email info@mehbobgulf.com It is still associated with my old Zoho organization. I cannot delete it because it shows ‘You cannot delete email. Zoho host’. I need to use this email in a new Zoho account.”
        • What’s New in Zoho Inventory — Latest Features, Integrations & Updates | December 2025

          Zoho Inventory has evolved significantly over the past months, bringing you smarter, faster, and more connected tools to streamline your operations. Whether you’re managing multichannel sales, complex fulfillment workflows, or fast-moving stock, our newest
        • Marketer’s Space - Multi-Channel Campaigns for the Biggest Shopping Week with Zoho Marketing Automation

          Hello marketers, Welcome back to another post in Marketers Space! The biggest shopping week of the year is almost here, and it’s your moment to shine without the stress. With Black Friday and Cyber Monday just around the corner, being present across email,
        • Client host [89.36.170.5] blocked using Spamhaus

          Hello please make make actions for delist ..... "Client host [89.36.170.5] blocked using Spamhaus"
        • Pricing Strategies: #5 Stay local, Price & Sell Global

          Arun had always dreamed of taking his handmade craft business beyond his hometown. For years, he sold locally. Most of his customers are familiar faces, in our usual currency and with the exact expectations. But one day, a traveller visited his workshop
        • What is the easiest way to move Hotmail emails to an IMAP server?

          The easiest way to move Hotmail (Outlook.com) emails to an IMAP server is to add your Hotmail account directly to any email client that supports IMAP, then copy the messages across. This avoids paid tools and keeps the process simple. Fastest free method:
        • No feedback from Zoho Books regarding Yodlee feeds for Investec

          I reported on 6 Feb 2025 that the Bank Feeds for Investec bank via Yodlee are not working. To date there has been no resolution. You are charging us for a suite of products where the functionality does not work. Please advise how you will refund me for
        • Turn off Knowlege Base Follow options and Follower lists

          Is there a way to hide or turn off the option in the Knowledge Base for users to follow specific departments/categories/sections/articles? If not, is there a way to turn off the public list of followers for each of those things? Otherwise, customer names
        • Suggestion: Option to Re-run a migration

          As I'm going through a migration process, I like the IMAP migration tool, but it would be better if there were an option to re-run the same migration as configured. There's not even an option to copy/edit one that's already there. Just run if it hasn't
        • Text snippet

          There is a nice feature in Zoho Desk called Text Snippet. It allows you to insert a bit of text anywhere in a reply that you are typing. That would be nice to have that option in Zoho CRM as well when we compose an email. Moderation Update: We agree that
        • Service One. Bill Another. Zero Hassle.

          In field service operations, one challenge often comes up: the person who needs the service isn’t always the one who pays for it. Think about tenants vs. property managers, corporate offices vs. their finance departments, or school buildings vs. central
        • Presenting ABM for Zoho CRM: Expand and retain your customers with precision

          Picture this scenario: You're a growing SaaS company ready to launch a powerful business suite, and are looking to gain traction and momentum. But as a business with a tight budget, you know acquiring new customers is slow, expensive, and often delivers
        • Can Zoho Flows repeat Actions more than once?

          I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
        • Video interviews not compatible on mobile

          Hi Zoho,  The 2-way video interview feature you have added to Recruit would be great if the candidate was able to use the link to the video on a mobile phone, it doesn't work on Samsung browser, it doesn't work on chrome/firefox mobile version of browser,
        • Zoho Desk View Open Tickets and Open Shared Tickets

          Hi, I would like to create a custom view so that an agent can view all the open tickets he has access to, including the shared tickets created by a different department. Currently my team has to swich between two views (Open Tickets and Shared Open Tickets).
        • Enviro Recycling EHF Fee's

          ​​I'm in Canada and each province has it's own recycling program with it's own fee's. There are numerous categories that electronics fall into and each category has a taxable rate applied to it. I need a way to be able to apply the correct rate depending
        • Zoho Desk API - Influence which layout is used

          Hello, how can the ticket layout be changed using the API? I would like to choose the layout directly when creating the ticket. If this is not possible, my question would be how can I change it afterwards? Best regards, Sven
        • Has CSS Changed for Common Elements?

          I noticed today that the standard title headings on my Forms and Reports display smaller in size than before. Google Dev Tools (attached), seems to confirm my suspicion. Something appears to be overriding the 1.375rem to 1.125rem. The font size on the
        • Text field alignment

          Is it possible to align text in the text field? Or even better, is there a possibility to have a field which accepts only numbers?
        • email moderation issue when email is sent in the name of a mail group

          Symptom: an email that is sent by a mail group moderator in the name of a moderated mail group is held back for approval. Reproduction: Create a moderated mail group with members and moderators. Allow that mails can be sent in the name of the group (extended
        • Pipeline in Custom Modules

          I love the way the Sales Pipeline looks and functions with reports. I would like to add the save pipeline features and visualization to a custom module, however, I only see that these pipelines are only available for the Deals module. Is there a way to add pipelines to custom modules?
        • Tip #53- Remote Billing: Your End-to-End Billing Solution in Zoho Assist- 'Insider Insights'

          Manual invoicing, after every remote support session, can be time-consuming and often error-prone. As an MSP, IT admin, or even a freelance support technician, it may become overwhelming to keep track of session time, service rates, and client invoices.
        • Record history and ticket interaction tab in contacts and accounts

          Hello everyone! We have improved the History tab to help users trace updates in the interaction activity logs of the Contacts and Accounts detail pages in the Customer Module. This enhancement make it easier to get clear details about who made each update,
        • Is there an API to "File a Ticket" in Desk

          Hi, Is there an API to "File a Ticket" in Desk to zoho projects?
        • Keyboard UX for Assemblies

          The new Assembly module has a counter-intuitive behavior that ought to be corrected. When an Assembly is ready to be entered, there are two options given, the blue-highlighted "Assemble" and the gray "Save as Draft". This correctly implies that the normal
        • How to Move Behavior, Acquisition, Polls & Forms Data from Zoho PageSense to Zoho Analytics?

          Hi Zoho Community, I'm looking for a way to transfer data from Zoho PageSense to Zoho Analytics, specifically: Behavioral data (clicks, scrolls, heatmaps, etc.) Acquisition data (traffic sources, campaigns, etc.) Polls and forms data As far as I can tell:
        • Why can't I see images uploaded by other users in the Library for Campaigns

          We are several users of zoho Campaign. I have uploaded visuals of our company, but my team members can't see them.
        • zoho sheet stuck

          I Need help. ZOHO sheets stuck on the loading screen. I've already deleted the system cache and cookies of my browser (google chrome) but it's still not opening. 
        • Tip of the Week #78 – Cut response time with multichannel shared inboxes

          If you’ve ever felt your team juggling between multiple email accounts, social pages, and chat apps just to reply to customers, you’re not alone. Managing conversations in multiple channels can quickly turn messy. Important messages across inboxes, replies
        • Need a way to run a client script longet than 10 seconds

          By The Grace of G-D. Hi, Currently, Client Scripts are Timing out at 10 seconds. We have complex logics that needs more time. Can you add a feature request to increase the timeout?
        • FSM Improvement Idea - Show an Import button when there is no data

          I am setting up FSM for a client and I noticed that there is no option to import data, see screenshot below. Even when you click Create Contact there is only an option to Import from Zoho Invoice. It is only after you add at lease 1 record that the Import
        • Unable to Send Different Email Templates for Different Documents in Zoho Sign

          Hello Zoho Community, I am facing a limitation with Zoho Sign regarding email notifications sent to customers when a document is sent for signing. Currently, whenever I send any template/document for signing, the email notification that goes to the customer
        • Timeline Tracking Support for records updates via module import and bulk write api

          Note: This update is currently available in Early Access and will soon be rolled out across all data centers (DCs) and for all editions of Zoho CRM. The update will be available to all users within your organization, regardless of their profiles or roles.
        • UI Improvement - Ability to Collapse Flow

          The UI for Flow is generally pretty good. However, when multiple decision trees are used, the layout can get pretty convoluted and hard-to-follow (see one of my Flows below): In these cases, even the auto-arrange fails to make this something that a normal
        • Tasks Statuses

          Hi, The task status "Completed" is a final status which closes the task. We need to have a status "Cancelled". However, when the status is set to "Cancelled", the task prompt still has a blue button to Close Task. When the customer clicks that and closes
        • Add Lookup Field in Tasks Module

          Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (
        • Create New Tasks Layout in CRM

          I am able to do this in Leads, Contacts, Meetings, Calls - every other module, but cannot create a new layout in tasks. I have the appropriate access but it's simply not appearing as an option. Only "Standard" option shows. Please help!
        • Next Page