Skip to main content

Invoices

The Invoices module provides access to contextual information about the current invoice when a widget is rendered within invoice creation or invoice detail pages. Widgets can retrieve invoice identifiers, associated customer details, and conversion-related metadata for use in validations, conditional logic, and UI extensions.

Methods

Get Invoice Details

Retrieves data related to the current context. This method allows your widget to fetch record details, field values, or metadata required for rendering or processing logic.

Commonly used for :
  • Fetch record information
  • Read field values
  • Access contextual module data
Supported Locations :
invoice.details.sidebarinvoice.creation.sidebarinvoice.lineitem.addinvoice.details.buttoninvoice.bulkaction.button
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('invoice').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
invoice_idinvoice.invoice_id
invoice_numberinvoice.invoice_number
salesorder_idinvoice.salesorder_id
salesorder_numberinvoice.salesorder_number
crm_owner_idinvoice.crm_owner_id
zcrm_potential_idinvoice.zcrm_potential_id
zcrm_potential_nameinvoice.zcrm_potential_name
dateinvoice.date
date_formattedinvoice.date_formatted
statusinvoice.status
Show More Supported Input Keys
PropertyRequest
status_formattedinvoice.status_formatted
autobill_statusinvoice.autobill_status
autobill_status_formattedinvoice.autobill_status_formatted
payment_termsinvoice.payment_terms
payment_terms_labelinvoice.payment_terms_label
due_dateinvoice.due_date
due_date_formattedinvoice.due_date_formatted
payment_expected_dateinvoice.payment_expected_date
payment_expected_date_formattedinvoice.payment_expected_date_formatted
payment_discountinvoice.payment_discount
payment_discount_formattedinvoice.payment_discount_formatted
last_payment_dateinvoice.last_payment_date
last_payment_date_formattedinvoice.last_payment_date_formatted
reference_numberinvoice.reference_number
customer_idinvoice.customer_id
branch_idinvoice.branch_id
estimate_idinvoice.estimate_id
contact_categoryinvoice.contact_category
customer_nameinvoice.customer_name
unused_credits_receivable_amountinvoice.unused_credits_receivable_amount
unused_credits_receivable_amount_formattedinvoice.unused_credits_receivable_amount_formatted
unused_retainer_paymentsinvoice.unused_retainer_payments
unused_retainer_payments_formattedinvoice.unused_retainer_payments_formatted
contact_personsinvoice.contact_persons
currency_idinvoice.currency_id
currency_codeinvoice.currency_code
currency_symbolinvoice.currency_symbol
exchange_rateinvoice.exchange_rate
discountinvoice.discount
discount_applied_on_amountinvoice.discount_applied_on_amount
discount_typeinvoice.discount_type
recurring_invoice_idinvoice.recurring_invoice_id
documentsinvoice.documents
line_itemsinvoice.line_items
submitter_idinvoice.submitter_id
approver_idinvoice.approver_id
submitted_dateinvoice.submitted_date
submitted_date_formattedinvoice.submitted_date_formatted
submitted_byinvoice.submitted_by
contact_persons_detailsinvoice.contact_persons_details
salesordersinvoice.salesorders
deliverychallansinvoice.deliverychallans
shipping_chargeinvoice.shipping_charge
shipping_charge_formattedinvoice.shipping_charge_formatted
adjustmentinvoice.adjustment
adjustment_formattedinvoice.adjustment_formatted
roundoff_valueinvoice.roundoff_value
roundoff_value_formattedinvoice.roundoff_value_formatted
adjustment_descriptioninvoice.adjustment_description
transaction_rounding_typeinvoice.transaction_rounding_type
sub_totalinvoice.sub_total
sub_total_formattedinvoice.sub_total_formatted
tax_totalinvoice.tax_total
tax_total_formattedinvoice.tax_total_formatted
discount_totalinvoice.discount_total
discount_total_formattedinvoice.discount_total_formatted
totalinvoice.total
total_formattedinvoice.total_formatted
discount_percentinvoice.discount_percent
bcy_shipping_chargeinvoice.bcy_shipping_charge
bcy_adjustmentinvoice.bcy_adjustment
bcy_sub_totalinvoice.bcy_sub_total
bcy_discount_totalinvoice.bcy_discount_total
bcy_tax_totalinvoice.bcy_tax_total
bcy_totalinvoice.bcy_total
taxesinvoice.taxes
payment_madeinvoice.payment_made
payment_made_formattedinvoice.payment_made_formatted
credits_appliedinvoice.credits_applied
credits_applied_formattedinvoice.credits_applied_formatted
balanceinvoice.balance
balance_formattedinvoice.balance_formatted
write_off_amountinvoice.write_off_amount
write_off_amount_formattedinvoice.write_off_amount_formatted
payment_optionsinvoice.payment_options
contact_persons_associatedinvoice.contact_persons_associated
paymentsinvoice.payments
shipping_billsinvoice.shipping_bills
creditsinvoice.credits
commentsinvoice.comments
billing_addressinvoice.billing_address
shipping_addressinvoice.shipping_address
customer_default_billing_addressinvoice.customer_default_billing_address
notesinvoice.notes
termsinvoice.terms
custom_fieldsinvoice.custom_fields
template_idinvoice.template_id
template_nameinvoice.template_name
template_typeinvoice.template_type
template_type_formattedinvoice.template_type_formatted
created_timeinvoice.created_time
last_modified_timeinvoice.last_modified_time
created_dateinvoice.created_date
created_date_formattedinvoice.created_date_formatted
created_by_idinvoice.created_by_id
last_modified_by_idinvoice.last_modified_by_id
salesperson_idinvoice.salesperson_id
salesperson_nameinvoice.salesperson_name
merchant_idinvoice.merchant_id
merchant_nameinvoice.merchant_name
ecomm_operator_idinvoice.ecomm_operator_id
ecomm_operator_nameinvoice.ecomm_operator_name
invoice_urlinvoice.invoice_url
billsinvoice.bills
sub_total_inclusive_of_taxinvoice.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedinvoice.sub_total_inclusive_of_tax_formatted
subject_contentinvoice.subject_content
approvers_listinvoice.approvers_list
zoho_recruit_jobopening_idinvoice.zoho_recruit_jobopening_id
tcs_totalinvoice.tcs_total
tds_totalinvoice.tds_total
tcs_amountinvoice.tcs_amount
tds_amountinvoice.tds_amount
lineitem_location_idinvoice.lineitem_location_id
default_warehouse_idinvoice.default_warehouse_id

Set Invoice Details

Updates or sets data within the current context. This method allows your widget to modify field values, update state, or pass data back to the host application.

Commonly used for :
  • Update field values
  • Set widget or module state
  • Pass data to the parent application
Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('invoice.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
invoice_idinvoice.invoice_id
invoice_numberinvoice.invoice_number
salesorder_idinvoice.salesorder_id
salesorder_numberinvoice.salesorder_number
crm_owner_idinvoice.crm_owner_id
zcrm_potential_idinvoice.zcrm_potential_id
zcrm_potential_nameinvoice.zcrm_potential_name
dateinvoice.date
date_formattedinvoice.date_formatted
statusinvoice.status
Show More Supported Input Keys
PropertyRequest
status_formattedinvoice.status_formatted
autobill_statusinvoice.autobill_status
autobill_status_formattedinvoice.autobill_status_formatted
payment_termsinvoice.payment_terms
payment_terms_labelinvoice.payment_terms_label
due_dateinvoice.due_date
due_date_formattedinvoice.due_date_formatted
payment_expected_dateinvoice.payment_expected_date
payment_expected_date_formattedinvoice.payment_expected_date_formatted
payment_discountinvoice.payment_discount
payment_discount_formattedinvoice.payment_discount_formatted
last_payment_dateinvoice.last_payment_date
last_payment_date_formattedinvoice.last_payment_date_formatted
reference_numberinvoice.reference_number
customer_idinvoice.customer_id
branch_idinvoice.branch_id
estimate_idinvoice.estimate_id
contact_categoryinvoice.contact_category
customer_nameinvoice.customer_name
unused_credits_receivable_amountinvoice.unused_credits_receivable_amount
unused_credits_receivable_amount_formattedinvoice.unused_credits_receivable_amount_formatted
unused_retainer_paymentsinvoice.unused_retainer_payments
unused_retainer_payments_formattedinvoice.unused_retainer_payments_formatted
contact_personsinvoice.contact_persons
currency_idinvoice.currency_id
currency_codeinvoice.currency_code
currency_symbolinvoice.currency_symbol
exchange_rateinvoice.exchange_rate
discountinvoice.discount
discount_applied_on_amountinvoice.discount_applied_on_amount
discount_typeinvoice.discount_type
recurring_invoice_idinvoice.recurring_invoice_id
documentsinvoice.documents
line_itemsinvoice.line_items
submitter_idinvoice.submitter_id
approver_idinvoice.approver_id
submitted_dateinvoice.submitted_date
submitted_date_formattedinvoice.submitted_date_formatted
submitted_byinvoice.submitted_by
contact_persons_detailsinvoice.contact_persons_details
salesordersinvoice.salesorders
deliverychallansinvoice.deliverychallans
shipping_chargeinvoice.shipping_charge
shipping_charge_formattedinvoice.shipping_charge_formatted
adjustmentinvoice.adjustment
adjustment_formattedinvoice.adjustment_formatted
roundoff_valueinvoice.roundoff_value
roundoff_value_formattedinvoice.roundoff_value_formatted
adjustment_descriptioninvoice.adjustment_description
transaction_rounding_typeinvoice.transaction_rounding_type
sub_totalinvoice.sub_total
sub_total_formattedinvoice.sub_total_formatted
tax_totalinvoice.tax_total
tax_total_formattedinvoice.tax_total_formatted
discount_totalinvoice.discount_total
discount_total_formattedinvoice.discount_total_formatted
totalinvoice.total
total_formattedinvoice.total_formatted
discount_percentinvoice.discount_percent
bcy_shipping_chargeinvoice.bcy_shipping_charge
bcy_adjustmentinvoice.bcy_adjustment
bcy_sub_totalinvoice.bcy_sub_total
bcy_discount_totalinvoice.bcy_discount_total
bcy_tax_totalinvoice.bcy_tax_total
bcy_totalinvoice.bcy_total
taxesinvoice.taxes
payment_madeinvoice.payment_made
payment_made_formattedinvoice.payment_made_formatted
credits_appliedinvoice.credits_applied
credits_applied_formattedinvoice.credits_applied_formatted
balanceinvoice.balance
balance_formattedinvoice.balance_formatted
write_off_amountinvoice.write_off_amount
write_off_amount_formattedinvoice.write_off_amount_formatted
payment_optionsinvoice.payment_options
contact_persons_associatedinvoice.contact_persons_associated
paymentsinvoice.payments
shipping_billsinvoice.shipping_bills
creditsinvoice.credits
commentsinvoice.comments
billing_addressinvoice.billing_address
shipping_addressinvoice.shipping_address
customer_default_billing_addressinvoice.customer_default_billing_address
notesinvoice.notes
termsinvoice.terms
custom_fieldsinvoice.custom_fields
template_idinvoice.template_id
template_nameinvoice.template_name
template_typeinvoice.template_type
template_type_formattedinvoice.template_type_formatted
created_timeinvoice.created_time
last_modified_timeinvoice.last_modified_time
created_dateinvoice.created_date
created_date_formattedinvoice.created_date_formatted
created_by_idinvoice.created_by_id
last_modified_by_idinvoice.last_modified_by_id
salesperson_idinvoice.salesperson_id
salesperson_nameinvoice.salesperson_name
merchant_idinvoice.merchant_id
merchant_nameinvoice.merchant_name
ecomm_operator_idinvoice.ecomm_operator_id
ecomm_operator_nameinvoice.ecomm_operator_name
invoice_urlinvoice.invoice_url
billsinvoice.bills
sub_total_inclusive_of_taxinvoice.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedinvoice.sub_total_inclusive_of_tax_formatted
subject_contentinvoice.subject_content
approvers_listinvoice.approvers_list
zoho_recruit_jobopening_idinvoice.zoho_recruit_jobopening_id
tcs_totalinvoice.tcs_total
tds_totalinvoice.tds_total
tcs_amountinvoice.tcs_amount
tds_amountinvoice.tds_amount
lineitem_location_idinvoice.lineitem_location_id
default_warehouse_idinvoice.default_warehouse_id

Get Invoices List

Retrieves multiple data points or a collection of records related to the current context. This method is useful for fetching lists, related records, or bulk data required for your widget's functionality.

Commonly used for :
  • Fetch related records
  • Retrieve collections of data
  • Access lists or tables of information
Supported Locations :
invoice.list.sidebarinvoice.list.buttoninvoice.bulkaction.button
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('invoices').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
invoice_idinvoice.invoice_id
zcrm_potential_idinvoice.zcrm_potential_id
zcrm_potential_nameinvoice.zcrm_potential_name
customer_nameinvoice.customer_name
customer_idinvoice.customer_id
company_nameinvoice.company_name
statusinvoice.status
status_formattedinvoice.status_formatted
invoice_numberinvoice.invoice_number
reference_numberinvoice.reference_number
Show More Supported Input Keys
PropertyRequest
dateinvoice.date
date_formattedinvoice.date_formatted
due_dateinvoice.due_date
due_date_formattedinvoice.due_date_formatted
due_daysinvoice.due_days
currency_idinvoice.currency_id
currency_codeinvoice.currency_code
template_typeinvoice.template_type
project_nameinvoice.project_name
totalinvoice.total
total_formattedinvoice.total_formatted
balanceinvoice.balance
balance_formattedinvoice.balance_formatted
created_timeinvoice.created_time
last_modified_timeinvoice.last_modified_time
payment_expected_dateinvoice.payment_expected_date
payment_expected_date_formattedinvoice.payment_expected_date_formatted
last_payment_dateinvoice.last_payment_date
last_payment_date_formattedinvoice.last_payment_date_formatted
custom_fieldsinvoice.custom_fields
template_idinvoice.template_id
documentsinvoice.documents
salesperson_idinvoice.salesperson_id
salesperson_nameinvoice.salesperson_name
shipping_chargeinvoice.shipping_charge
shipping_charge_formattedinvoice.shipping_charge_formatted
adjustmentinvoice.adjustment
adjustment_formattedinvoice.adjustment_formatted
write_off_amountinvoice.write_off_amount
write_off_amount_formattedinvoice.write_off_amount_formatted
exchange_rateinvoice.exchange_rate
selectedinvoice.selected

Set Invoice customfields

Specifically designed to update custom field values within the current context. This method allows your widget to target and modify custom fields without affecting standard fields, ensuring precise data management.

Commonly used for :
  • Update custom field values
  • Manage user-defined data points
  • Ensure targeted updates to specific fields
Supported Locations :
invoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('invoice.<custom_field_api_name>',<value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}

Get Line Items

This method allows you to retrieve the line items associated with the current invoice. It can be used to fetch details such as product information, quantity, rate, and total for each line item. This is particularly useful when you want to display or utilize the invoice's line item details within your widget or extension.

Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('invoice.line_items').then(function (res) {
      console.log('invoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching invoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
location_idlocation_id
autonumbergenerationgroup_idautonumbergenerationgroup_id
customercustomer
invoice_numberinvoice_number
reference_numberreference_number
payment_termspayment_terms
payment_terms_labelpayment_terms_label
payment_optionspayment_options
late_feelate_fee
customer_idcustomer_id
Show More Supported Input Keys
PropertyRequest
contact_personscontact_persons
contact_persons_associatedcontact_persons_associated
datedate
due_datedue_date
notesnotes
notes_defaultnotes_default
termsterms
terms_defaultterms_default
is_inclusive_taxis_inclusive_tax
line_itemsline_items
allow_partial_paymentsallow_partial_payments
custom_fieldscustom_fields
contactscontacts
exchange_rateexchange_rate
recurring_invoice_idrecurring_invoice_id
invoiced_estimate_idinvoiced_estimate_id
account_idaccount_id
adjustment_account_idadjustment_account_id
shipping_charge_account_idshipping_charge_account_id
is_discount_before_taxis_discount_before_tax
discountdiscount
discount_typediscount_type
shipping_chargeshipping_charge
adjustmentadjustment
adjustment_descriptionadjustment_description
salesperson_idsalesperson_id
merchant_idmerchant_id
reasonreason
tax_exemption_codetax_exemption_code
tax_authority_nametax_authority_name
tax_idtax_id
is_update_customeris_update_customer
zcrm_potential_idzcrm_potential_id
zcrm_potential_namezcrm_potential_name
pricebook_idpricebook_id
template_idtemplate_id
avatax_use_codeavatax_use_code
avatax_exempt_noavatax_exempt_no
project_idproject_id
apply_available_retainer_paymentsapply_available_retainer_payments
retainers_to_applyretainers_to_apply
documentsdocuments
mail_attachmentsmail_attachments
mail_idmail_id
email_account_typeemail_account_type
email_account_idemail_account_id
email_folder_idemail_folder_id
billing_address_idbilling_address_id
shipping_address_idshipping_address_id
dispatch_from_address_iddispatch_from_address_id
gst_treatmentgst_treatment
gst_nogst_no
place_of_supplyplace_of_supply
typetype
reference_invoice_idreference_invoice_id
reason_for_debit_notereason_for_debit_note
is_reverse_charge_appliedis_reverse_charge_applied
is_export_with_paymentis_export_with_payment
reference_invoice_typereference_invoice_type
next_actionnext_action
tax_treatmenttax_treatment
quick_create_paymentquick_create_payment
batch_paymentsbatch_payments
shipping_charge_tax_idshipping_charge_tax_id
shipping_charge_tax_treatment_codeshipping_charge_tax_treatment_code
shipping_charge_tax_exemption_codeshipping_charge_tax_exemption_code
shipping_charge_taxesshipping_charge_taxes
shipping_charge_sac_codeshipping_charge_sac_code
is_customer_liable_for_taxis_customer_liable_for_tax
subject_contentsubject_content
tcs_tax_idtcs_tax_id
tcs_amounttcs_amount
is_tcs_amount_in_percentis_tcs_amount_in_percent
tax_reg_notax_reg_no
taxestaxes
tax_overridetax_override
tax_override_preferencetax_override_preference
tds_override_preferencetds_override_preference
tax_rounding_incrementtax_rounding_increment
rounding_incrementrounding_increment
transaction_rounding_typetransaction_rounding_type
rounding_moderounding_mode
tds_tax_idtds_tax_id
is_tds_amount_in_percentis_tds_amount_in_percent
tds_amounttds_amount
reason_for_credit_debit_notereason_for_credit_debit_note
supply_datesupply_date
special_transaction_typespecial_transaction_type
currency_idcurrency_id
cfdi_usagecfdi_usage
cfdi_reference_typecfdi_reference_type
reference_invoice_idreference_invoice_id
classesclasses
tds_taxestds_taxes
preceding_invoice_idpreceding_invoice_id
salesroute_idsalesroute_id
foreign_tax_reg_noforeign_tax_reg_no
early_payment_discount_percentageearly_payment_discount_percentage
early_payment_discount_due_daysearly_payment_discount_due_days
early_payment_discount_amountearly_payment_discount_amount
retention_itemsretention_items
retention_override_preferenceretention_override_preference
vat_treatmentvat_treatment
totaltotal
total_overridetotal_override
computation_typecomputation_type
payment_formpayment_form
txn_posting_datetxn_posting_date
discount_account_iddiscount_account_id
tagstags
bank_account_idbank_account_id
payment_modepayment_mode
shipping_charge_tax_category_codeshipping_charge_tax_category_code
tax_selection_modetax_selection_mode
tax_authority_idtax_authority_id
service_start_dateservice_start_date
service_end_dateservice_end_date
payment_installmentspayment_installments
payment_terms_idpayment_terms_id
coupon_codecoupon_code
cost_sourcecost_source
purchase_pricepurchase_price

Set Line Items

This methods is to allowed for set a list of line items in the current invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.This methods is append the line items to the existing line items in the invoice.

Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('invoice.line_items',lineItemMetaData).then(function (res) {
      console.log('invoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching invoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
location_idlocation_id
autonumbergenerationgroup_idautonumbergenerationgroup_id
customercustomer
invoice_numberinvoice_number
reference_numberreference_number
payment_termspayment_terms
payment_terms_labelpayment_terms_label
payment_optionspayment_options
late_feelate_fee
customer_idcustomer_id
Show More Supported Input Keys
PropertyRequest
contact_personscontact_persons
contact_persons_associatedcontact_persons_associated
datedate
due_datedue_date
notesnotes
notes_defaultnotes_default
termsterms
terms_defaultterms_default
is_inclusive_taxis_inclusive_tax
line_itemsline_items
allow_partial_paymentsallow_partial_payments
custom_fieldscustom_fields
contactscontacts
exchange_rateexchange_rate
recurring_invoice_idrecurring_invoice_id
invoiced_estimate_idinvoiced_estimate_id
account_idaccount_id
adjustment_account_idadjustment_account_id
shipping_charge_account_idshipping_charge_account_id
is_discount_before_taxis_discount_before_tax
discountdiscount
discount_typediscount_type
shipping_chargeshipping_charge
adjustmentadjustment
adjustment_descriptionadjustment_description
salesperson_idsalesperson_id
merchant_idmerchant_id
reasonreason
tax_exemption_codetax_exemption_code
tax_authority_nametax_authority_name
tax_idtax_id
is_update_customeris_update_customer
zcrm_potential_idzcrm_potential_id
zcrm_potential_namezcrm_potential_name
pricebook_idpricebook_id
template_idtemplate_id
avatax_use_codeavatax_use_code
avatax_exempt_noavatax_exempt_no
project_idproject_id
apply_available_retainer_paymentsapply_available_retainer_payments
retainers_to_applyretainers_to_apply
documentsdocuments
mail_attachmentsmail_attachments
mail_idmail_id
email_account_typeemail_account_type
email_account_idemail_account_id
email_folder_idemail_folder_id
billing_address_idbilling_address_id
shipping_address_idshipping_address_id
dispatch_from_address_iddispatch_from_address_id
gst_treatmentgst_treatment
gst_nogst_no
place_of_supplyplace_of_supply
typetype
reference_invoice_idreference_invoice_id
reason_for_debit_notereason_for_debit_note
is_reverse_charge_appliedis_reverse_charge_applied
is_export_with_paymentis_export_with_payment
reference_invoice_typereference_invoice_type
next_actionnext_action
tax_treatmenttax_treatment
quick_create_paymentquick_create_payment
batch_paymentsbatch_payments
shipping_charge_tax_idshipping_charge_tax_id
shipping_charge_tax_treatment_codeshipping_charge_tax_treatment_code
shipping_charge_tax_exemption_codeshipping_charge_tax_exemption_code
shipping_charge_taxesshipping_charge_taxes
shipping_charge_sac_codeshipping_charge_sac_code
is_customer_liable_for_taxis_customer_liable_for_tax
subject_contentsubject_content
tcs_tax_idtcs_tax_id
tcs_amounttcs_amount
is_tcs_amount_in_percentis_tcs_amount_in_percent
tax_reg_notax_reg_no
taxestaxes
tax_overridetax_override
tax_override_preferencetax_override_preference
tds_override_preferencetds_override_preference
tax_rounding_incrementtax_rounding_increment
rounding_incrementrounding_increment
transaction_rounding_typetransaction_rounding_type
rounding_moderounding_mode
tds_tax_idtds_tax_id
is_tds_amount_in_percentis_tds_amount_in_percent
tds_amounttds_amount
reason_for_credit_debit_notereason_for_credit_debit_note
supply_datesupply_date
special_transaction_typespecial_transaction_type
currency_idcurrency_id
cfdi_usagecfdi_usage
cfdi_reference_typecfdi_reference_type
reference_invoice_idreference_invoice_id
classesclasses
tds_taxestds_taxes
preceding_invoice_idpreceding_invoice_id
salesroute_idsalesroute_id
foreign_tax_reg_noforeign_tax_reg_no
early_payment_discount_percentageearly_payment_discount_percentage
early_payment_discount_due_daysearly_payment_discount_due_days
early_payment_discount_amountearly_payment_discount_amount
retention_itemsretention_items
retention_override_preferenceretention_override_preference
vat_treatmentvat_treatment
totaltotal
total_overridetotal_override
computation_typecomputation_type
payment_formpayment_form
txn_posting_datetxn_posting_date
discount_account_iddiscount_account_id
tagstags
bank_account_idbank_account_id
payment_modepayment_mode
shipping_charge_tax_category_codeshipping_charge_tax_category_code
tax_selection_modetax_selection_mode
tax_authority_idtax_authority_id
service_start_dateservice_start_date
service_end_dateservice_end_date
payment_installmentspayment_installments
payment_terms_idpayment_terms_id
coupon_codecoupon_code
cost_sourcecost_source
purchase_pricepurchase_price

Set Single Line Items

This methods is to allowed for setting/updating a single line item in the current invoice. It can be used to set details such as product information, quantity, rate, and total for a single line item. This is particularly useful when you want to update or set a single line item details within your widget or extension.

Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('invoice.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('invoice line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching invoice line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
location_idlocation_id
autonumbergenerationgroup_idautonumbergenerationgroup_id
customercustomer
invoice_numberinvoice_number
reference_numberreference_number
payment_termspayment_terms
payment_terms_labelpayment_terms_label
payment_optionspayment_options
late_feelate_fee
customer_idcustomer_id
Show More Supported Input Keys
PropertyRequest
contact_personscontact_persons
contact_persons_associatedcontact_persons_associated
datedate
due_datedue_date
notesnotes
notes_defaultnotes_default
termsterms
terms_defaultterms_default
is_inclusive_taxis_inclusive_tax
line_itemsline_items
allow_partial_paymentsallow_partial_payments
custom_fieldscustom_fields
contactscontacts
exchange_rateexchange_rate
recurring_invoice_idrecurring_invoice_id
invoiced_estimate_idinvoiced_estimate_id
account_idaccount_id
adjustment_account_idadjustment_account_id
shipping_charge_account_idshipping_charge_account_id
is_discount_before_taxis_discount_before_tax
discountdiscount
discount_typediscount_type
shipping_chargeshipping_charge
adjustmentadjustment
adjustment_descriptionadjustment_description
salesperson_idsalesperson_id
merchant_idmerchant_id
reasonreason
tax_exemption_codetax_exemption_code
tax_authority_nametax_authority_name
tax_idtax_id
is_update_customeris_update_customer
zcrm_potential_idzcrm_potential_id
zcrm_potential_namezcrm_potential_name
pricebook_idpricebook_id
template_idtemplate_id
avatax_use_codeavatax_use_code
avatax_exempt_noavatax_exempt_no
project_idproject_id
apply_available_retainer_paymentsapply_available_retainer_payments
retainers_to_applyretainers_to_apply
documentsdocuments
mail_attachmentsmail_attachments
mail_idmail_id
email_account_typeemail_account_type
email_account_idemail_account_id
email_folder_idemail_folder_id
billing_address_idbilling_address_id
shipping_address_idshipping_address_id
dispatch_from_address_iddispatch_from_address_id
gst_treatmentgst_treatment
gst_nogst_no
place_of_supplyplace_of_supply
typetype
reference_invoice_idreference_invoice_id
reason_for_debit_notereason_for_debit_note
is_reverse_charge_appliedis_reverse_charge_applied
is_export_with_paymentis_export_with_payment
reference_invoice_typereference_invoice_type
next_actionnext_action
tax_treatmenttax_treatment
quick_create_paymentquick_create_payment
batch_paymentsbatch_payments
shipping_charge_tax_idshipping_charge_tax_id
shipping_charge_tax_treatment_codeshipping_charge_tax_treatment_code
shipping_charge_tax_exemption_codeshipping_charge_tax_exemption_code
shipping_charge_taxesshipping_charge_taxes
shipping_charge_sac_codeshipping_charge_sac_code
is_customer_liable_for_taxis_customer_liable_for_tax
subject_contentsubject_content
tcs_tax_idtcs_tax_id
tcs_amounttcs_amount
is_tcs_amount_in_percentis_tcs_amount_in_percent
tax_reg_notax_reg_no
taxestaxes
tax_overridetax_override
tax_override_preferencetax_override_preference
tds_override_preferencetds_override_preference
tax_rounding_incrementtax_rounding_increment
rounding_incrementrounding_increment
transaction_rounding_typetransaction_rounding_type
rounding_moderounding_mode
tds_tax_idtds_tax_id
is_tds_amount_in_percentis_tds_amount_in_percent
tds_amounttds_amount
reason_for_credit_debit_notereason_for_credit_debit_note
supply_datesupply_date
special_transaction_typespecial_transaction_type
currency_idcurrency_id
cfdi_usagecfdi_usage
cfdi_reference_typecfdi_reference_type
reference_invoice_idreference_invoice_id
classesclasses
tds_taxestds_taxes
preceding_invoice_idpreceding_invoice_id
salesroute_idsalesroute_id
foreign_tax_reg_noforeign_tax_reg_no
early_payment_discount_percentageearly_payment_discount_percentage
early_payment_discount_due_daysearly_payment_discount_due_days
early_payment_discount_amountearly_payment_discount_amount
retention_itemsretention_items
retention_override_preferenceretention_override_preference
vat_treatmentvat_treatment
totaltotal
total_overridetotal_override
computation_typecomputation_type
payment_formpayment_form
txn_posting_datetxn_posting_date
discount_account_iddiscount_account_id
tagstags
bank_account_idbank_account_id
payment_modepayment_mode
shipping_charge_tax_category_codeshipping_charge_tax_category_code
tax_selection_modetax_selection_mode
tax_authority_idtax_authority_id
service_start_dateservice_start_date
service_end_dateservice_end_date
payment_installmentspayment_installments
payment_terms_idpayment_terms_id
coupon_codecoupon_code
cost_sourcecost_source
purchase_pricepurchase_price

Set Bulk Line Items

This methods is to allowed for replacing/updating all the existing line items in the current invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.

Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('invoice.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('invoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching invoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
location_idlocation_id
autonumbergenerationgroup_idautonumbergenerationgroup_id
customercustomer
invoice_numberinvoice_number
reference_numberreference_number
payment_termspayment_terms
payment_terms_labelpayment_terms_label
payment_optionspayment_options
late_feelate_fee
customer_idcustomer_id
Show More Supported Input Keys
PropertyRequest
contact_personscontact_persons
contact_persons_associatedcontact_persons_associated
datedate
due_datedue_date
notesnotes
notes_defaultnotes_default
termsterms
terms_defaultterms_default
is_inclusive_taxis_inclusive_tax
line_itemsline_items
allow_partial_paymentsallow_partial_payments
custom_fieldscustom_fields
contactscontacts
exchange_rateexchange_rate
recurring_invoice_idrecurring_invoice_id
invoiced_estimate_idinvoiced_estimate_id
account_idaccount_id
adjustment_account_idadjustment_account_id
shipping_charge_account_idshipping_charge_account_id
is_discount_before_taxis_discount_before_tax
discountdiscount
discount_typediscount_type
shipping_chargeshipping_charge
adjustmentadjustment
adjustment_descriptionadjustment_description
salesperson_idsalesperson_id
merchant_idmerchant_id
reasonreason
tax_exemption_codetax_exemption_code
tax_authority_nametax_authority_name
tax_idtax_id
is_update_customeris_update_customer
zcrm_potential_idzcrm_potential_id
zcrm_potential_namezcrm_potential_name
pricebook_idpricebook_id
template_idtemplate_id
avatax_use_codeavatax_use_code
avatax_exempt_noavatax_exempt_no
project_idproject_id
apply_available_retainer_paymentsapply_available_retainer_payments
retainers_to_applyretainers_to_apply
documentsdocuments
mail_attachmentsmail_attachments
mail_idmail_id
email_account_typeemail_account_type
email_account_idemail_account_id
email_folder_idemail_folder_id
billing_address_idbilling_address_id
shipping_address_idshipping_address_id
dispatch_from_address_iddispatch_from_address_id
gst_treatmentgst_treatment
gst_nogst_no
place_of_supplyplace_of_supply
typetype
reference_invoice_idreference_invoice_id
reason_for_debit_notereason_for_debit_note
is_reverse_charge_appliedis_reverse_charge_applied
is_export_with_paymentis_export_with_payment
reference_invoice_typereference_invoice_type
next_actionnext_action
tax_treatmenttax_treatment
quick_create_paymentquick_create_payment
batch_paymentsbatch_payments
shipping_charge_tax_idshipping_charge_tax_id
shipping_charge_tax_treatment_codeshipping_charge_tax_treatment_code
shipping_charge_tax_exemption_codeshipping_charge_tax_exemption_code
shipping_charge_taxesshipping_charge_taxes
shipping_charge_sac_codeshipping_charge_sac_code
is_customer_liable_for_taxis_customer_liable_for_tax
subject_contentsubject_content
tcs_tax_idtcs_tax_id
tcs_amounttcs_amount
is_tcs_amount_in_percentis_tcs_amount_in_percent
tax_reg_notax_reg_no
taxestaxes
tax_overridetax_override
tax_override_preferencetax_override_preference
tds_override_preferencetds_override_preference
tax_rounding_incrementtax_rounding_increment
rounding_incrementrounding_increment
transaction_rounding_typetransaction_rounding_type
rounding_moderounding_mode
tds_tax_idtds_tax_id
is_tds_amount_in_percentis_tds_amount_in_percent
tds_amounttds_amount
reason_for_credit_debit_notereason_for_credit_debit_note
supply_datesupply_date
special_transaction_typespecial_transaction_type
currency_idcurrency_id
cfdi_usagecfdi_usage
cfdi_reference_typecfdi_reference_type
reference_invoice_idreference_invoice_id
classesclasses
tds_taxestds_taxes
preceding_invoice_idpreceding_invoice_id
salesroute_idsalesroute_id
foreign_tax_reg_noforeign_tax_reg_no
early_payment_discount_percentageearly_payment_discount_percentage
early_payment_discount_due_daysearly_payment_discount_due_days
early_payment_discount_amountearly_payment_discount_amount
retention_itemsretention_items
retention_override_preferenceretention_override_preference
vat_treatmentvat_treatment
totaltotal
total_overridetotal_override
computation_typecomputation_type
payment_formpayment_form
txn_posting_datetxn_posting_date
discount_account_iddiscount_account_id
tagstags
bank_account_idbank_account_id
payment_modepayment_mode
shipping_charge_tax_category_codeshipping_charge_tax_category_code
tax_selection_modetax_selection_mode
tax_authority_idtax_authority_id
service_start_dateservice_start_date
service_end_dateservice_end_date
payment_installmentspayment_installments
payment_terms_idpayment_terms_id
coupon_codecoupon_code
cost_sourcecost_source
purchase_pricepurchase_price

Set Line Items Customfields

This method is allowed for setting/updating custom fields for line items in the current invoice. It can be used to set details such as product information, quantity, rate, total, and custom field values for multiple line items. This is particularly useful when you want to update or set multiple line items details along with their custom field values within your widget or extension.

Supported Locations :
invoice.creation.sidebarinvoice.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table','item_custom_fields':[{'api_name':'<line_item_custom_field_name>', 'value':'<value>'}]}]
    ZFAPPS.set('invoice.line_items',lineItemMetaData).then(function (res) {
      console.log('invoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching invoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
location_idlocation_id
autonumbergenerationgroup_idautonumbergenerationgroup_id
customercustomer
invoice_numberinvoice_number
reference_numberreference_number
payment_termspayment_terms
payment_terms_labelpayment_terms_label
payment_optionspayment_options
late_feelate_fee
customer_idcustomer_id
Show More Supported Input Keys
PropertyRequest
contact_personscontact_persons
contact_persons_associatedcontact_persons_associated
datedate
due_datedue_date
notesnotes
notes_defaultnotes_default
termsterms
terms_defaultterms_default
is_inclusive_taxis_inclusive_tax
line_itemsline_items
allow_partial_paymentsallow_partial_payments
custom_fieldscustom_fields
contactscontacts
exchange_rateexchange_rate
recurring_invoice_idrecurring_invoice_id
invoiced_estimate_idinvoiced_estimate_id
account_idaccount_id
adjustment_account_idadjustment_account_id
shipping_charge_account_idshipping_charge_account_id
is_discount_before_taxis_discount_before_tax
discountdiscount
discount_typediscount_type
shipping_chargeshipping_charge
adjustmentadjustment
adjustment_descriptionadjustment_description
salesperson_idsalesperson_id
merchant_idmerchant_id
reasonreason
tax_exemption_codetax_exemption_code
tax_authority_nametax_authority_name
tax_idtax_id
is_update_customeris_update_customer
zcrm_potential_idzcrm_potential_id
zcrm_potential_namezcrm_potential_name
pricebook_idpricebook_id
template_idtemplate_id
avatax_use_codeavatax_use_code
avatax_exempt_noavatax_exempt_no
project_idproject_id
apply_available_retainer_paymentsapply_available_retainer_payments
retainers_to_applyretainers_to_apply
documentsdocuments
mail_attachmentsmail_attachments
mail_idmail_id
email_account_typeemail_account_type
email_account_idemail_account_id
email_folder_idemail_folder_id
billing_address_idbilling_address_id
shipping_address_idshipping_address_id
dispatch_from_address_iddispatch_from_address_id
gst_treatmentgst_treatment
gst_nogst_no
place_of_supplyplace_of_supply
typetype
reference_invoice_idreference_invoice_id
reason_for_debit_notereason_for_debit_note
is_reverse_charge_appliedis_reverse_charge_applied
is_export_with_paymentis_export_with_payment
reference_invoice_typereference_invoice_type
next_actionnext_action
tax_treatmenttax_treatment
quick_create_paymentquick_create_payment
batch_paymentsbatch_payments
shipping_charge_tax_idshipping_charge_tax_id
shipping_charge_tax_treatment_codeshipping_charge_tax_treatment_code
shipping_charge_tax_exemption_codeshipping_charge_tax_exemption_code
shipping_charge_taxesshipping_charge_taxes
shipping_charge_sac_codeshipping_charge_sac_code
is_customer_liable_for_taxis_customer_liable_for_tax
subject_contentsubject_content
tcs_tax_idtcs_tax_id
tcs_amounttcs_amount
is_tcs_amount_in_percentis_tcs_amount_in_percent
tax_reg_notax_reg_no
taxestaxes
tax_overridetax_override
tax_override_preferencetax_override_preference
tds_override_preferencetds_override_preference
tax_rounding_incrementtax_rounding_increment
rounding_incrementrounding_increment
transaction_rounding_typetransaction_rounding_type
rounding_moderounding_mode
tds_tax_idtds_tax_id
is_tds_amount_in_percentis_tds_amount_in_percent
tds_amounttds_amount
reason_for_credit_debit_notereason_for_credit_debit_note
supply_datesupply_date
special_transaction_typespecial_transaction_type
currency_idcurrency_id
cfdi_usagecfdi_usage
cfdi_reference_typecfdi_reference_type
reference_invoice_idreference_invoice_id
classesclasses
tds_taxestds_taxes
preceding_invoice_idpreceding_invoice_id
salesroute_idsalesroute_id
foreign_tax_reg_noforeign_tax_reg_no
early_payment_discount_percentageearly_payment_discount_percentage
early_payment_discount_due_daysearly_payment_discount_due_days
early_payment_discount_amountearly_payment_discount_amount
retention_itemsretention_items
retention_override_preferenceretention_override_preference
vat_treatmentvat_treatment
totaltotal
total_overridetotal_override
computation_typecomputation_type
payment_formpayment_form
txn_posting_datetxn_posting_date
discount_account_iddiscount_account_id
tagstags
bank_account_idbank_account_id
payment_modepayment_mode
shipping_charge_tax_category_codeshipping_charge_tax_category_code
tax_selection_modetax_selection_mode
tax_authority_idtax_authority_id
service_start_dateservice_start_date
service_end_dateservice_end_date
payment_installmentspayment_installments
payment_terms_idpayment_terms_id
coupon_codecoupon_code
cost_sourcecost_source
purchase_pricepurchase_price