Skip to main content

Quotes

The Quotes module provides access to contextual information about the current quote when a widget is rendered within supported quote-related pages. Widgets can retrieve quote identifiers, associated customer references, and conversion-related metadata for use in validations, conditional logic, and UI extensions.

Methods

Get Estimate 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 :
estimate.details.buttonestimate.details.sidebarestimate.creation.sidebarestimate.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('estimate').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
estimate_idestimate.estimate_id
estimate_numberestimate.estimate_number
crm_owner_idestimate.crm_owner_id
crm_custom_reference_idestimate.crm_custom_reference_id
zcrm_potential_idestimate.zcrm_potential_id
zcrm_potential_nameestimate.zcrm_potential_name
dateestimate.date
date_formattedestimate.date_formatted
created_dateestimate.created_date
created_date_formattedestimate.created_date_formatted
Show More Supported Input Keys
PropertyRequest
reference_numberestimate.reference_number
statusestimate.status
status_formattedestimate.status_formatted
customer_idestimate.customer_id
branch_idestimate.branch_id
documentsestimate.documents
customer_nameestimate.customer_name
place_of_supplyestimate.place_of_supply
place_of_supply_formattedestimate.place_of_supply_formatted
contact_categoryestimate.contact_category
tax_treatmentestimate.tax_treatment
tax_treatment_formattedestimate.tax_treatment_formatted
contact_personsestimate.contact_persons
currency_idestimate.currency_id
currency_codeestimate.currency_code
currency_symbolestimate.currency_symbol
exchange_rateestimate.exchange_rate
expiry_dateestimate.expiry_date
expiry_date_formattedestimate.expiry_date_formatted
discountestimate.discount
discount_applied_on_amountestimate.discount_applied_on_amount
is_discount_before_taxestimate.is_discount_before_tax
discount_typeestimate.discount_type
is_viewed_by_clientestimate.is_viewed_by_client
client_viewed_timeestimate.client_viewed_time
client_viewed_time_formattedestimate.client_viewed_time_formatted
is_inclusive_taxestimate.is_inclusive_tax
tax_roundingestimate.tax_rounding
estimate_urlestimate.estimate_url
line_itemsestimate.line_items
submitter_idestimate.submitter_id
submitted_dateestimate.submitted_date
submitted_date_formattedestimate.submitted_date_formatted
submitted_byestimate.submitted_by
approver_idestimate.approver_id
shipping_chargeestimate.shipping_charge
shipping_charge_formattedestimate.shipping_charge_formatted
bcy_shipping_chargeestimate.bcy_shipping_charge
adjustmentestimate.adjustment
adjustment_formattedestimate.adjustment_formatted
bcy_adjustmentestimate.bcy_adjustment
adjustment_descriptionestimate.adjustment_description
roundoff_valueestimate.roundoff_value
roundoff_value_formattedestimate.roundoff_value_formatted
transaction_rounding_typeestimate.transaction_rounding_type
sub_totalestimate.sub_total
sub_total_formattedestimate.sub_total_formatted
bcy_sub_totalestimate.bcy_sub_total
sub_total_inclusive_of_taxestimate.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedestimate.sub_total_inclusive_of_tax_formatted
sub_total_exclusive_of_discountestimate.sub_total_exclusive_of_discount
sub_total_exclusive_of_discount_formattedestimate.sub_total_exclusive_of_discount_formatted
discount_totalestimate.discount_total
discount_total_formattedestimate.discount_total_formatted
bcy_discount_totalestimate.bcy_discount_total
discount_percentestimate.discount_percent
totalestimate.total
total_formattedestimate.total_formatted
bcy_totalestimate.bcy_total
tax_totalestimate.tax_total
tax_total_formattedestimate.tax_total_formatted
bcy_tax_totalestimate.bcy_tax_total
price_precisionestimate.price_precision
taxesestimate.taxes
commentsestimate.comments
invoice_idsestimate.invoice_ids
billing_addressestimate.billing_address
shipping_addressestimate.shipping_address
customer_default_billing_addressestimate.customer_default_billing_address
notesestimate.notes
termsestimate.terms
custom_fieldsestimate.custom_fields
template_idestimate.template_id
template_nameestimate.template_name
template_typeestimate.template_type
template_type_formattedestimate.template_type_formatted
created_timeestimate.created_time
last_modified_timeestimate.last_modified_time
created_by_idestimate.created_by_id
last_modified_by_idestimate.last_modified_by_id
contact_persons_associatedestimate.contact_persons_associated
contact_persons_detailsestimate.contact_persons_details
salesperson_idestimate.salesperson_id
salesperson_nameestimate.salesperson_name
attachment_nameestimate.attachment_name
allow_partial_paymentsestimate.allow_partial_payments
payment_optionsestimate.payment_options
paymentsestimate.payments
subject_contentestimate.subject_content
approvers_listestimate.approvers_list

Set Estimate 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 :
estimate.creation.sidebarestimate.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('estimate.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
estimate_idestimate.estimate_id
estimate_numberestimate.estimate_number
crm_owner_idestimate.crm_owner_id
crm_custom_reference_idestimate.crm_custom_reference_id
zcrm_potential_idestimate.zcrm_potential_id
zcrm_potential_nameestimate.zcrm_potential_name
dateestimate.date
date_formattedestimate.date_formatted
created_dateestimate.created_date
created_date_formattedestimate.created_date_formatted
Show More Supported Input Keys
PropertyRequest
reference_numberestimate.reference_number
statusestimate.status
status_formattedestimate.status_formatted
customer_idestimate.customer_id
branch_idestimate.branch_id
documentsestimate.documents
customer_nameestimate.customer_name
place_of_supplyestimate.place_of_supply
place_of_supply_formattedestimate.place_of_supply_formatted
contact_categoryestimate.contact_category
tax_treatmentestimate.tax_treatment
tax_treatment_formattedestimate.tax_treatment_formatted
contact_personsestimate.contact_persons
currency_idestimate.currency_id
currency_codeestimate.currency_code
currency_symbolestimate.currency_symbol
exchange_rateestimate.exchange_rate
expiry_dateestimate.expiry_date
expiry_date_formattedestimate.expiry_date_formatted
discountestimate.discount
discount_applied_on_amountestimate.discount_applied_on_amount
is_discount_before_taxestimate.is_discount_before_tax
discount_typeestimate.discount_type
is_viewed_by_clientestimate.is_viewed_by_client
client_viewed_timeestimate.client_viewed_time
client_viewed_time_formattedestimate.client_viewed_time_formatted
is_inclusive_taxestimate.is_inclusive_tax
tax_roundingestimate.tax_rounding
estimate_urlestimate.estimate_url
line_itemsestimate.line_items
submitter_idestimate.submitter_id
submitted_dateestimate.submitted_date
submitted_date_formattedestimate.submitted_date_formatted
submitted_byestimate.submitted_by
approver_idestimate.approver_id
shipping_chargeestimate.shipping_charge
shipping_charge_formattedestimate.shipping_charge_formatted
bcy_shipping_chargeestimate.bcy_shipping_charge
adjustmentestimate.adjustment
adjustment_formattedestimate.adjustment_formatted
bcy_adjustmentestimate.bcy_adjustment
adjustment_descriptionestimate.adjustment_description
roundoff_valueestimate.roundoff_value
roundoff_value_formattedestimate.roundoff_value_formatted
transaction_rounding_typeestimate.transaction_rounding_type
sub_totalestimate.sub_total
sub_total_formattedestimate.sub_total_formatted
bcy_sub_totalestimate.bcy_sub_total
sub_total_inclusive_of_taxestimate.sub_total_inclusive_of_tax
sub_total_inclusive_of_tax_formattedestimate.sub_total_inclusive_of_tax_formatted
sub_total_exclusive_of_discountestimate.sub_total_exclusive_of_discount
sub_total_exclusive_of_discount_formattedestimate.sub_total_exclusive_of_discount_formatted
discount_totalestimate.discount_total
discount_total_formattedestimate.discount_total_formatted
bcy_discount_totalestimate.bcy_discount_total
discount_percentestimate.discount_percent
totalestimate.total
total_formattedestimate.total_formatted
bcy_totalestimate.bcy_total
tax_totalestimate.tax_total
tax_total_formattedestimate.tax_total_formatted
bcy_tax_totalestimate.bcy_tax_total
price_precisionestimate.price_precision
taxesestimate.taxes
commentsestimate.comments
invoice_idsestimate.invoice_ids
billing_addressestimate.billing_address
shipping_addressestimate.shipping_address
customer_default_billing_addressestimate.customer_default_billing_address
notesestimate.notes
termsestimate.terms
custom_fieldsestimate.custom_fields
template_idestimate.template_id
template_nameestimate.template_name
template_typeestimate.template_type
template_type_formattedestimate.template_type_formatted
created_timeestimate.created_time
last_modified_timeestimate.last_modified_time
created_by_idestimate.created_by_id
last_modified_by_idestimate.last_modified_by_id
contact_persons_associatedestimate.contact_persons_associated
contact_persons_detailsestimate.contact_persons_details
salesperson_idestimate.salesperson_id
salesperson_nameestimate.salesperson_name
attachment_nameestimate.attachment_name
allow_partial_paymentsestimate.allow_partial_payments
payment_optionsestimate.payment_options
paymentsestimate.payments
subject_contentestimate.subject_content
approvers_listestimate.approvers_list

Get Estimates 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 :
estimate.list.sidebarestimate.list.button
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('estimates').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
estimate_idestimate.estimate_id
zcrm_potential_idestimate.zcrm_potential_id
zcrm_potential_nameestimate.zcrm_potential_name
customer_nameestimate.customer_name
customer_idestimate.customer_id
company_nameestimate.company_name
statusestimate.status
status_formattedestimate.status_formatted
estimate_numberestimate.estimate_number
reference_numberestimate.reference_number
Show More Supported Input Keys
PropertyRequest
dateestimate.date
date_formattedestimate.date_formatted
currency_idestimate.currency_id
currency_codeestimate.currency_code
totalestimate.total
total_formattedestimate.total_formatted
created_timeestimate.created_time
last_modified_timeestimate.last_modified_time
accepted_dateestimate.accepted_date
accepted_date_formattedestimate.accepted_date_formatted
declined_dateestimate.declined_date
declined_date_formattedestimate.declined_date_formatted
expiry_dateestimate.expiry_date
expiry_date_formattedestimate.expiry_date_formatted
has_attachmentestimate.has_attachment
is_viewed_by_clientestimate.is_viewed_by_client
client_viewed_timeestimate.client_viewed_time
client_viewed_time_formattedestimate.client_viewed_time_formatted
is_emailedestimate.is_emailed
template_typeestimate.template_type
template_idestimate.template_id
salesperson_idestimate.salesperson_id
salesperson_nameestimate.salesperson_name
selectedestimate.selected

Set Estimate 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 :
estimate.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('estimate.<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 estimate. 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 sales order's line item details within your widget or extension.

Supported Locations :
estimate.creation.sidebarestimate.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('estimate.line_items').then(function (res) {
      console.log('estimate line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching estimate line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
product_typeproduct_type
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
header_nameheader_name
header_idheader_id
pricebook_idpricebook_id
is_discountedis_discounted
tds_tax_idtds_tax_id
unitunit
unit_conversion_idunit_conversion_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
typetype
non_taxable_amountnon_taxable_amount
tax_categorytax_category
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
cost_sourcecost_source
purchase_pricepurchase_price

Set Line Items

This methods is to allowed for set a list of line items in the current estimate. 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 estimate.

Supported Locations :
estimate.creation.sidebarestimate.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('estimate.line_items',lineItemMetaData).then(function (res) {
      console.log('estimate line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching estimate line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
product_typeproduct_type
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
header_nameheader_name
header_idheader_id
pricebook_idpricebook_id
is_discountedis_discounted
tds_tax_idtds_tax_id
unitunit
unit_conversion_idunit_conversion_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
typetype
non_taxable_amountnon_taxable_amount
tax_categorytax_category
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
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 estimate. 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 :
estimate.creation.sidebarestimate.lineitem.add
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('estimate.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('estimate line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching estimate line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
product_typeproduct_type
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
header_nameheader_name
header_idheader_id
pricebook_idpricebook_id
is_discountedis_discounted
tds_tax_idtds_tax_id
unitunit
unit_conversion_idunit_conversion_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
typetype
non_taxable_amountnon_taxable_amount
tax_categorytax_category
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
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 estimate. 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 :
estimate.creation.sidebarestimate.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('estimate.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('estimate line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching estimate line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
item_orderitem_order
item_iditem_id
raterate
namename
descriptiondescription
quantityquantity
discountdiscount
discountsdiscounts
tax_idtax_id
Show More Supported Input Keys
PropertyRequest
tagstags
product_typeproduct_type
tax_exemption_codetax_exemption_code
tax_exemption_idtax_exemption_id
avatax_tax_codeavatax_tax_code
item_custom_fieldsitem_custom_fields
hsn_or_sachsn_or_sac
gst_treatment_codegst_treatment_code
tax_treatment_codetax_treatment_code
header_nameheader_name
header_idheader_id
pricebook_idpricebook_id
is_discountedis_discounted
tds_tax_idtds_tax_id
unitunit
unit_conversion_idunit_conversion_id
item_meta_fieldsitem_meta_fields
sat_item_key_codesat_item_key_code
unitkey_codeunitkey_code
typetype
non_taxable_amountnon_taxable_amount
tax_categorytax_category
product_tax_categoryproduct_tax_category
mapped_itemsmapped_items
tax_selection_modetax_selection_mode
line_item_taxesline_item_taxes
line_item_tdsline_item_tds
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 estimate. 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 :
estimate.creation.sidebarestimate.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('estimate.line_items',lineItemMetaData).then(function (res) {
      console.log('estimate line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching estimate line items : ', err);
    });
  });
}