custom fields not populating from deluge script into invoice

custom fields not populating from deluge script into invoice

Hello,

I've created some Deluge script that is meant to take a few inputted invoice custom fields and calculate a few others. I can see when I execute the function that my inputted custom fields are being passed, yet im still ending up with all "null" values at the bottom. Can someone take a look and see what I'm doing wrong?

info invoice;

// Fetch values from the custom fields
assessed_value = invoice.get("cf_assessed_value_unformatted");
final_value = invoice.get("cf_final_value_unformatted");
tax_rate = invoice.get("cf_tax_rate_unformatted");
ETP_Fee = invoice.get("cf_easy_tax_protest_fee_unformatted");
// Calculate Assessment Reduction
assessment_reduction = final_value - assessed_value;
// Calculate Tax Savings
tax_savings = assessment_reduction * tax_rate;
// Calculate Easy Tax Protest Fee (25% of Tax Savings)
easy_tax_protest_fee = tax_savings * ETP_Fee;
// Update the invoice with calculated values
invoice.put("cf_assessment_reduction",assessment_reduction);
invoice.put("cf_tax_savings",tax_savings);
invoice.put("easy_tax_protest_fee1",easy_tax_protest_fee);
// Save the updated invoice
zoho.books.updateRecord("invoices",ClientAPI,invoice.get("invoice_id"),invoice);
info "Assessment Reduction: " + assessment_reduction;
info "Tax Savings: " + tax_savings;
info "Easy Tax Protest Fee: " + easy_tax_protest_fee;

info "Assessed Value: " + assessed_value;
info "Final Value: " + final_value;
info "Tax Rate: " + tax_rate;
info "ETP Fee: " + ETP_Fee;

my log incase youre interested:

Log Messages

{"date":"2024-12-19","notes":"Thank you for the payment. You just made our day.","zcrm_potential_id":"","discount":"0.0","billing_address":"{\"zip\":\"99501\",\"country\":\"United States\",\"address\":\"639 Main St\",\"city\":\"Anchorage\",\"phone\":\"\",\"street\":\"639 Main St\",\"attention\":\"\",\"street2\":\"\",\"state\":\"AK\",\"fax\":\"\"}","line_items":"[{\"line_item_id\":\"5693121000000120027\",\"documents\":[],\"discount_amount\":0,\"item_type\":\"sales\",\"item_type_formatted\":\"Sales Items (Service)\",\"discount\":0,\"internal_name\":\"\",\"sales_rate_formatted\":\"$0.00\",\"discounts\":[],\"project_id\":\"\",\"sku\":\"\",\"pricing_scheme\":\"unit\",\"pricebook_id\":\"\",\"bill_id\":\"\",\"bcy_rate_formatted\":\"$0.00\",\"image_document_id\":\"\",\"expense_receipt_name\":\"\",\"item_total\":0,\"tax_id\":\"\",\"tags\":[],\"unit\":\"\",\"cost_amount\":0,\"tax_type\":\"tax\",\"time_entry_ids\":[],\"cost_amount_formatted\":\"$0.00\",\"name\":\"protest\",\"line_item_tds\":[],\"markup_percent_formatted\":\"0.00%\",\"discount_amount_formatted\":\"$0.00\",\"bcy_rate\":0,\"item_total_formatted\":\"$0.00\",\"salesorder_item_id\":\"\",\"discount_account_name\":\"\",\"rate_formatted\":\"$0.00\",\"header_id\":\"\",\"discount_account_id\":\"\",\"description\":\"\",\"item_order\":1,\"bill_item_id\":\"\",\"rate\":0,\"account_name\":\"Other Charges\",\"sales_rate\":0,\"quantity\":1,\"item_id\":\"5693121000000111097\",\"tax_name\":\"\",\"header_name\":\"\",\"item_custom_fields\":[],\"line_item_taxes\":[],\"markup_percent\":0,\"account_id\":\"5693121000000010001\",\"tax_percentage\":0,\"expense_id\":\"\"}]","payment_expected_date_formatted":"","shipping_charge_inclusive_of_tax":"0.0","balance":"0.0","bcy_shipping_charge_tax":"","terms":"","invoice_id":"5693121000000120019","shipping_charge_tax_exemption_code":"","invoice_number":"INV-000002","recurring_invoice_id":"","shipping_charge_tax":"","exchange_rate":"1.0","custom_fields":"[{\"field_id\":\"5693121000000111027\",\"customfield_id\":\"5693121000000111027\",\"show_in_store\":false,\"show_in_portal\":false,\"is_active\":true,\"index\":1,\"label\":\"Assessed Value\",\"show_on_pdf\":true,\"edit_on_portal\":false,\"edit_on_store\":false,\"api_name\":\"cf_assessed_value\",\"show_in_all_pdf\":true,\"value_formatted\":\"$10,000,000.00\",\"search_entity\":\"invoice\",\"data_type\":\"amount\",\"placeholder\":\"cf_assessed_value\",\"value\":1.0E7,\"is_dependent_field\":false},{\"field_id\":\"5693121000000111031\",\"customfield_id\":\"5693121000000111031\",\"show_in_store\":false,\"show_in_portal\":false,\"is_active\":true,\"index\":2,\"label\":\"Final Value\",\"show_on_pdf\":true,\"edit_on_portal\":false,\"edit_on_store\":false,\"api_name\":\"cf_final_value\",\"show_in_all_pdf\":true,\"value_formatted\":\"$100,000.00\",\"search_entity\":\"invoice\",\"data_type\":\"amount\",\"placeholder\":\"cf_final_value\",\"value\":100000,\"is_dependent_field\":false},{\"field_id\":\"5693121000000111043\",\"customfield_id\":\"5693121000000111043\",\"show_in_store\":false,\"show_in_portal\":false,\"is_active\":true,\"index\":3,\"label\":\"Tax Rate\",\"show_on_pdf\":true,\"edit_on_portal\":false,\"edit_on_store\":false,\"api_name\":\"cf_tax_rate\",\"show_in_all_pdf\":true,\"value_formatted\":\"1.85%\",\"search_entity\":\"invoice\",\"data_type\":\"percent\",\"placeholder\":\"cf_tax_rate\",\"value\":1.85,\"is_dependent_field\":false},{\"field_id\":\"5693121000000111051\",\"customfield_id\":\"5693121000000111051\",\"show_in_store\":false,\"show_in_portal\":false,\"is_active\":true,\"index\":4,\"label\":\"Easy Tax Protest Percent\",\"show_on_pdf\":true,\"edit_on_portal\":false,\"edit_on_store\":false,\"api_name\":\"cf_easy_tax_protest_fee\",\"show_in_all_pdf\":true,\"value_formatted\":\"25%\",\"search_entity\":\"invoice\",\"data_type\":\"percent\",\"placeholder\":\"cf_easy_tax_protest_fee\",\"value\":25,\"is_dependent_field\":false},{\"field_id\":\"5693121000000111055\",\"customfield_id\":\"5693121000000111055\",\"show_in_store\":false,\"show_in_portal\":false,\"is_active\":true,\"index\":5,\"label\":\"Invoiced Amount\",\"show_on_pdf\":true,\"edit_on_portal\":false,\"edit_on_store\":false,\"api_name\":\"cf_invoiced_amount\",\"show_in_all_pdf\":true,\"value_formatted\":\"$1.00\",\"search_entity\":\"invoice\",\"data_type\":\"amount\",\"placeholder\":\"cf_invoiced_amount\",\"value\":1,\"is_dependent_field\":false}]","estimate_id":"","shipping_charge_tax_exemption_id":"","shipping_charge_formatted":"$0.00","status_formatted":"Draft","reference_number":"","shipping_charge_tax_id":"","price_precision":"2","shipping_charge_account_id":"","shipping_charge_tax_percentage":"","adjustment":"0.0","shipping_charge_tax_name":"","status":"draft","due_date_formatted":"19 Dec 2024","tax_total":"0.0","adjustment_formatted":"$0.00","balance_formatted":"$0.00","shipping_charge_inclusive_of_tax_formatted":"$0.00","ach_payment_initiated":"false","payment_terms":"0","currency_code":"USD","shipping_charge_exclusive_of_tax":"0.0","total":"0.0","shipping_charge_exclusive_of_tax_formatted":"$0.00","tax_total_formatted":"$0.00","date_formatted":"19 Dec 2024","custom_field_hash":"{\"cf_invoiced_amount\":\"$1.00\",\"cf_easy_tax_protest_fee_unformatted\":25,\"cf_assessed_value\":\"$10,000,000.00\",\"cf_tax_rate\":\"1.85%\",\"cf_final_value\":\"$100,000.00\",\"cf_assessed_value_unformatted\":1.0E7,\"cf_final_value_unformatted\":100000,\"cf_invoiced_amount_unformatted\":1,\"cf_tax_rate_unformatted\":1.85,\"cf_easy_tax_protest_fee\":\"25%\"}","sub_total_formatted":"$0.00","shipping_address":"{\"zip\":\"\",\"country\":\"\",\"address\":\"\",\"city\":\"\",\"phone\":\"\",\"street\":\"\",\"attention\":\"\",\"street2\":\"\",\"state\":\"\",\"fax\":\"\"}","salesorders":"[]","shipping_charge_tax_formatted":"","shipping_charge_tax_type":"","currency_symbol":"$","due_date":"2024-12-19","shipping_charge_account_name":"","shipping_bills":"[]","payment_expected_date":"","salesperson_name":"","salesperson_id":"","shipping_charge":"0.0","deliverychallans":"[]","sub_total":"0.0","customer_name":"Capla Paprocki (Sample)","customer_id":"5693121000000104063","total_formatted":"$0.00","currency_id":"5693121000000000097","invoice_url":"https://zohosecurepay.com/books/easytaxprotestcom/secure?CInvoiceID=2-854572fa05a13029cb3fab0979e19423fc03f8b92474d85207c608f1b5b1402d68b7fa21be278db756d4d12a5338e9ffd618b1603607149470b563487343172211e80a707f5b3196 ","payment_terms_label":"Due On Receipt"}

Assessment Reduction: null

Tax Savings: null

Easy Tax Protest Fee: null

Assessed Value: null

Final Value: null

Tax Rate: null

ETP Fee: null

    • Topic Participants

    • Jimmy

    • Recent Topics

    • Problem adding emails to my account / Email Address already exists or associated in another Organisation

      Hello, I am trying to create 3 emails that I previously deleted, but it gives me the message that you see on the screen below, I tried to write to support but I still have no response, what else can I do?
    • "Processing"

      Hi, All emails outgoing are showing "processing", any issues? Thanks
    • Auto forward after moving email from spam to inbox

      Auto forward is generally working fine, however it does not forward mails landed in the spam folder. I can move important mails from spam back to inbox, is it possible to automatically forward them once they are in inbox? Obviously I can manually forward
    • Projects Task List Bars not Showing

      Im in my Projects template and the grey bar for the Task Lists is not showing and the tasks cannot join to it. I have it open in a job and it works. Anyone know why its not showing in the template?
    • Restriction in assigning signer fields for the "Approver" role in APIs and internal integrations

      Hi, Zoho Sign's intended design is offering two actions to the recipient - Needs to sign (if you wish your recipient to add information to the document; signature, for instance) or Approver (someone who has to approve the content of the document and must
    • Searching Notes & Attachments

      Is it possible to have the search in CRM search the Notes and Attachments for key words
    • no me llegan los correos a Zoho mail

      No puedo recibir correos pero sí enviarlos, ya hice la modificación de MX y la verificación de teléfonos, qué es lo que ocurre? gracias
    • 553 Relaying disallowed SMTP Error: data not accepted

      I am configuring my website to use my zoho mail for my contact form. I am using phpmailer but this exits with the following error: SMTP ERROR: DATA END command failed: 553 Relaying disallowed SMTP Error: data not accepted. Mailer Error: SMTP Error: data
    • Rebrand your CRM with the all-new custom domain mapping setup

      UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
    • 'Find duplicates using :'

      I just discovered (and thought I would share) that you can import candidates to Zoho Recruit and define the field you want to use to find duplicates. I have used the email address all this time. But I think a better field to find duplicates is a contact's
    • Territory management and roles hierarchy

      Hi everyone, we are facing a problem with territory management. Our roles hierarchy is quite simple: - Area sales managers - Sales executives (reporting to Area sales managers) - Backoffice "Sales executives" can see only accounts/contacts/etc based on
    • DataPrep Bigquery Connection failed

      Hello everybody, I want to create a connnection beetwen Bigquery and Dataprep but when I try to connect my project I got this error Loading tables has failed. Table list fetched from the data source expired.
    • Can Send Emails But I am not Receiving emails in Zoho Account

      Hello, I have configured a Zoho email account for the domain pentexqatar.com and I can send emails but am not receiving any emails in Zoho account. can I please let me know what could be the issues? Thank You
    • Disable Multiple Submissions by same Employee

      Dear All, I am creating a form to be filled by employees. Is it possible to restrict submission of the form if that employee has already submitted it once?
    • Whatsapp Notification For Cliq

      We have integrated WhatsApp Business into Zoho CRM, and messages are coming through to the CRM. However, I want a notification message to be sent to the data owner in Cliq when a new message arrives. This doesn't seem possible through rules. Is there
    • Prefill Zoho Bookings form fields when using 'Email Booking URL' button in Zoho CRM

      I'm utilizing the 'Email Booking URL' button in Zoho CRM, linked to the 'Contacts' module. After the contact sets the meeting details and receives the email, I want the Zoho Bookings form to automatically pre-fill with their information (name, email,
    • Call Counter

      For context, our Leads Page is configured with three separate phone number fields. This allows us to store multiple contact numbers for each lead. We've also integrated a click-to-dial feature in our CRM system, which enables us to make calls directly
    • Power of Automation :: Incorporate your desired tasklist into a new project automatically

      Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
    • How to delete Inactive users?

      We want to delete inactive users from our system, but went you deactivate still the names are shown at the inactive section. How to get really rid off these names? Thanks for your response! Fabian van den Barselaar
    • Events disappearing in Calendar

      To reproduce the bug: 1.- Add a new event in Calendar 2.- Type any name for the Event 3.- Click "Create" 4.- The event appears 5.- Click on the event to open it 6.- Optional: Edit the event 7.- Click OK 8.- After two seconds, the event disappears Now, click on another day and then come back to the inserted event's day. The event appears.
    • Variable time for consultation.

      We would like to be able to not set a predefine time for the consultation. We wont be using this for the customer it's going to be use internaly to keep track of workers on the road that have appoiment and installation. Something in the line of a FSM
    • Integration Zoho Books in CRM

      Hi, I integrated the CRM with Books. This allows me to display accounting documents assigned to a customer directly in the CRM. This is a very convenient option. Unfortunately, I can't find a solution to properly set permissions for my sales department.
    • Scheduling Actions by Date and Reusing Webhooks in Journey Builder

      Hello, I’m trying to use the Journey Builder feature, but I noticed that it only allows scheduling actions forward in time, not based on a specific date. It would be very helpful if we could schedule actions ahead of time based on predefined date fields.
    • New Customization options in the module builder: Quick Create and Detail view

      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
    • Project Change Orders and Additions

      We are in the process of migrating from QuickBooks Online to Zoho Books. We have Zoho One and like the ability to sync all of our data across everything. And I like that projects work in a way that's less dumb than QuickBooks. I'm trying to figure out
    • Create Invoice With More Than One Item/Product

      I was trying to use Zoho Flow to automatically create an invoice when an opportunity is marked won in Zoho CRM. However, you can only add one item/product using the Create invoice module. Is it possible to add more than one item/product to the same invoice?
    • Formulae field(Sum) not updating when a sub form entry is deleted

      Hi there, I was facing this issue wherein I have a main form called 'Work_order_Form' and in that main form I have a sub form called 'Items' and in that items I have a field called 'Print_Charges'. So in my main form I have a formulae field which calculates
    • Regarding the integration of Apollo.io with Zoho crm.

      I have been seeing for the last 3 months that your Apollo.io beta version is available in Zoho Flow, and this application has not gone live yet. We requested this 2 months ago, but you guys said that 'we are working on it,' and when we search on Google
    • Count of Distinct IDs when they appear multiple times within a selected time period

      I have a transactions table which includes the columns: date, customer_id and order_id. I want to be able to count the distinct customer_ids within a date range when those customer_ids appear across multiple rows (because they have multiple orders within
    • How do I append customer number to invoice number?

      New Zoho Books customer using the free trial and trying to figure out how to append the customer number to the invoice number. For example, my customer number is: ACME My current invoice number is: 24-XXX I would like my invoice number to be: ACME-24-XXXX
    • Double spacing issues in Zoho Mail

      Some of my emails are double spacing and others our single space very anoying, wanted to know how to fix the problem. Also, can't get my signiyure on my emails to be singled space someone please help!!!!!
    • Have an input card for zobot that could collect Name, Email, and Phone or a message all at once

      It would be great to have an input card for the codeless bot in a form style that allows it to ask all relevant questions at once. at any point in the chat flow or conversation, This approach would simplify the interaction, making it easier and more straightforward
    • Webhook Failure Alerts and Retry Mechanism

      Dear Zoho Team, I have a workflow in Zoho CRM that sends a webhook whenever a specific field is updated. Occasionally, the workflow fails, and I can manually check the errors under Settings > Automation > Actions > Webhook > Failures. However, these failures
    • Zoho CRM not saving edited quotes

      When I am editing existing quotes, zoho CRM often gets stuck and I see only the red circle with line through it when I try to save my edits for that quote. This is destroying my workday. Help please!
    • Introducing the Zoho Sign and Bigin integration

      Greetings, We're thrilled to announce that Zoho Sign has integrated with Bigin by Zoho CRM, bringing a seamless signing experience directly into your small business CRM. You can now sign, send, and manage your contracts and agreements directly from your
    • Zoho Survey Partially Completed Send Reminder to Complete the Survey

      I have couple of survey's set up through a link webform. These survey's are not being distributed through email, only a website link. We get more than 50% partially completing the survey. Is there a way to send an email to these people? I looked under
    • Dynamic Variables for Organization Names in Forms and Emails

      I’m currently using your platform to distribute a standardized questionnaire to various organizations, and I would like to make the experience feel more tailored to each recipient. Specifically, I’m wondering if it is possible to use a dynamic variable
    • Migrate from crm plus a zoho

      Hello, it turns out that I migrated my account from CRM Plus to Zoho One on the same administrative license, and when I reviewed what CRM, Desk and Sales are, IQ they are with another organization, I do not migrate, for example I enter CRM and I can see
    • Custom Modules - Zoho Desk - iOS

      Hello, everyone! In the iOS version(v2.8.9) of the Zoho Desk mobile app, we have introduced support for custom modules as a related item to the standard modules like Tickets, Contacts, and Accounts. This new feature allows you to capture unique information
    • Update Candidate Status Through Workflow in Blueprint

      Hi Team,  We have a blueprint built out with custom functions that update particular fields based on candidate actions. When particular fields are updated we need to move the candidate forward in the blueprint. We tried to do this through a workflow,
    • Next Page