Contacts
The Contacts module provides access to contextual information about the current contact when a widget is rendered within supported contact-related pages. Widgets can retrieve contact identifiers, category information, and related attributes for use in validations, conditional logic, and UI extensions.
Methods
Get Contacts 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.
- Fetch record information
- Read field values
- Access contextual module data
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.get('contacts').then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
| Property | Request |
|---|---|
| contact_id | contacts.contact_id |
| contact_name | contacts.contact_name |
| company_name | contacts.company_name |
| first_name | contacts.first_name |
| last_name | contacts.last_name |
| designation | contacts.designation |
| department | contacts.department |
| website | contacts.website |
| branch_id | contacts.branch_id |
| language_code | contacts.language_code |
Show More Supported Input Keys
| Property | Request |
|---|---|
| language_code_formatted | contacts.language_code_formatted |
| contact_salutation | contacts.contact_salutation |
| contacts.email | |
| phone | contacts.phone |
| mobile | contacts.mobile |
| portal_status | contacts.portal_status |
| has_transaction | contacts.has_transaction |
| contact_type | contacts.contact_type |
| customer_sub_type | contacts.customer_sub_type |
| customer_sub_type_formatted | contacts.customer_sub_type_formatted |
| owner_id | contacts.owner_id |
| owner_name | contacts.owner_name |
| source | contacts.source |
| source_formatted | contacts.source_formatted |
| documents | contacts.documents |
| contacts.twitter | |
| contacts.facebook | |
| is_crm_customer | contacts.is_crm_customer |
| is_linked_with_zohocrm | contacts.is_linked_with_zohocrm |
| is_gapps_customer | contacts.is_gapps_customer |
| primary_contact_id | contacts.primary_contact_id |
| zcrm_account_id | contacts.zcrm_account_id |
| zcrm_contact_id | contacts.zcrm_contact_id |
| crm_owner_id | contacts.crm_owner_id |
| payment_terms | contacts.payment_terms |
| payment_terms_label | contacts.payment_terms_label |
| credit_limit_exceeded_amount | contacts.credit_limit_exceeded_amount |
| credit_limit_exceeded_amount_formatted | contacts.credit_limit_exceeded_amount_formatted |
| currency_id | contacts.currency_id |
| currency_code | contacts.currency_code |
| currency_symbol | contacts.currency_symbol |
| price_precision | contacts.price_precision |
| exchange_rate | contacts.exchange_rate |
| opening_balance_amount | contacts.opening_balance_amount |
| opening_balance_amount_formatted | contacts.opening_balance_amount_formatted |
| opening_balance_amount_bcy | contacts.opening_balance_amount_bcy |
| opening_balance_amount_bcy_formatted | contacts.opening_balance_amount_bcy_formatted |
| outstanding_receivable_amount | contacts.outstanding_receivable_amount |
| outstanding_receivable_amount_formatted | contacts.outstanding_receivable_amount_formatted |
| outstanding_receivable_amount_bcy | contacts.outstanding_receivable_amount_bcy |
| outstanding_receivable_amount_bcy_formatted | contacts.outstanding_receivable_amount_bcy_formatted |
| outstanding_payable_amount | contacts.outstanding_payable_amount |
| outstanding_payable_amount_formatted | contacts.outstanding_payable_amount_formatted |
| outstanding_payable_amount_bcy | contacts.outstanding_payable_amount_bcy |
| outstanding_payable_amount_bcy_formatted | contacts.outstanding_payable_amount_bcy_formatted |
| unused_credits_receivable_amount | contacts.unused_credits_receivable_amount |
| unused_credits_receivable_amount_formatted | contacts.unused_credits_receivable_amount_formatted |
| unused_credits_receivable_amount_bcy | contacts.unused_credits_receivable_amount_bcy |
| unused_credits_receivable_amount_bcy_formatted | contacts.unused_credits_receivable_amount_bcy_formatted |
| unused_credits_payable_amount | contacts.unused_credits_payable_amount |
| unused_credits_payable_amount_formatted | contacts.unused_credits_payable_amount_formatted |
| unused_credits_payable_amount_bcy | contacts.unused_credits_payable_amount_bcy |
| unused_credits_payable_amount_bcy_formatted | contacts.unused_credits_payable_amount_bcy_formatted |
| unused_retainer_payments | contacts.unused_retainer_payments |
| unused_retainer_payments_formatted | contacts.unused_retainer_payments_formatted |
| status | contacts.status |
| payment_reminder_enabled | contacts.payment_reminder_enabled |
| is_portal_enabled | contacts.is_portal_enabled |
| is_client_review_settings_enabled | contacts.is_client_review_settings_enabled |
| custom_fields | contacts.custom_fields |
| is_taxable | contacts.is_taxable |
| tax_id | contacts.tax_id |
| tax_name | contacts.tax_name |
| tax_percentage | contacts.tax_percentage |
| country_code | contacts.country_code |
| country_code_formatted | contacts.country_code_formatted |
| contact_category | contacts.contact_category |
| contact_category_formatted | contacts.contact_category_formatted |
| is_linked_with_contact | contacts.is_linked_with_contact |
| sales_channel | contacts.sales_channel |
| ach_supported | contacts.ach_supported |
| portal_receipt_count | contacts.portal_receipt_count |
| opening_balances | contacts.opening_balances |
| billing_address | contacts.billing_address |
| shipping_address | contacts.shipping_address |
| contact_persons | contacts.contact_persons |
| comments | contacts.comments |
| addresses | contacts.addresses |
| pricebook_id | contacts.pricebook_id |
| pricebook_name | contacts.pricebook_name |
| default_templates | contacts.default_templates |
| associated_with_square | contacts.associated_with_square |
| can_add_card | contacts.can_add_card |
| can_add_bank_account | contacts.can_add_bank_account |
| cards | contacts.cards |
| checks | contacts.checks |
| bank_accounts | contacts.bank_accounts |
| vpa_list | contacts.vpa_list |
| notes | contacts.notes |
| created_time | contacts.created_time |
| last_modified_time | contacts.last_modified_time |
| tags | contacts.tags |
| zohopeople_client_id | contacts.zohopeople_client_id |
Set Contacts 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.
- Update field values
- Set widget or module state
- Pass data to the parent application
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('contacts.name', <value>).then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
| Property | Request |
|---|---|
| contact_id | contacts.contact_id |
| contact_name | contacts.contact_name |
| company_name | contacts.company_name |
| first_name | contacts.first_name |
| last_name | contacts.last_name |
| designation | contacts.designation |
| department | contacts.department |
| website | contacts.website |
| branch_id | contacts.branch_id |
| language_code | contacts.language_code |
Show More Supported Input Keys
| Property | Request |
|---|---|
| language_code_formatted | contacts.language_code_formatted |
| contact_salutation | contacts.contact_salutation |
| contacts.email | |
| phone | contacts.phone |
| mobile | contacts.mobile |
| portal_status | contacts.portal_status |
| has_transaction | contacts.has_transaction |
| contact_type | contacts.contact_type |
| customer_sub_type | contacts.customer_sub_type |
| customer_sub_type_formatted | contacts.customer_sub_type_formatted |
| owner_id | contacts.owner_id |
| owner_name | contacts.owner_name |
| source | contacts.source |
| source_formatted | contacts.source_formatted |
| documents | contacts.documents |
| contacts.twitter | |
| contacts.facebook | |
| is_crm_customer | contacts.is_crm_customer |
| is_linked_with_zohocrm | contacts.is_linked_with_zohocrm |
| is_gapps_customer | contacts.is_gapps_customer |
| primary_contact_id | contacts.primary_contact_id |
| zcrm_account_id | contacts.zcrm_account_id |
| zcrm_contact_id | contacts.zcrm_contact_id |
| crm_owner_id | contacts.crm_owner_id |
| payment_terms | contacts.payment_terms |
| payment_terms_label | contacts.payment_terms_label |
| credit_limit_exceeded_amount | contacts.credit_limit_exceeded_amount |
| credit_limit_exceeded_amount_formatted | contacts.credit_limit_exceeded_amount_formatted |
| currency_id | contacts.currency_id |
| currency_code | contacts.currency_code |
| currency_symbol | contacts.currency_symbol |
| price_precision | contacts.price_precision |
| exchange_rate | contacts.exchange_rate |
| opening_balance_amount | contacts.opening_balance_amount |
| opening_balance_amount_formatted | contacts.opening_balance_amount_formatted |
| opening_balance_amount_bcy | contacts.opening_balance_amount_bcy |
| opening_balance_amount_bcy_formatted | contacts.opening_balance_amount_bcy_formatted |
| outstanding_receivable_amount | contacts.outstanding_receivable_amount |
| outstanding_receivable_amount_formatted | contacts.outstanding_receivable_amount_formatted |
| outstanding_receivable_amount_bcy | contacts.outstanding_receivable_amount_bcy |
| outstanding_receivable_amount_bcy_formatted | contacts.outstanding_receivable_amount_bcy_formatted |
| outstanding_payable_amount | contacts.outstanding_payable_amount |
| outstanding_payable_amount_formatted | contacts.outstanding_payable_amount_formatted |
| outstanding_payable_amount_bcy | contacts.outstanding_payable_amount_bcy |
| outstanding_payable_amount_bcy_formatted | contacts.outstanding_payable_amount_bcy_formatted |
| unused_credits_receivable_amount | contacts.unused_credits_receivable_amount |
| unused_credits_receivable_amount_formatted | contacts.unused_credits_receivable_amount_formatted |
| unused_credits_receivable_amount_bcy | contacts.unused_credits_receivable_amount_bcy |
| unused_credits_receivable_amount_bcy_formatted | contacts.unused_credits_receivable_amount_bcy_formatted |
| unused_credits_payable_amount | contacts.unused_credits_payable_amount |
| unused_credits_payable_amount_formatted | contacts.unused_credits_payable_amount_formatted |
| unused_credits_payable_amount_bcy | contacts.unused_credits_payable_amount_bcy |
| unused_credits_payable_amount_bcy_formatted | contacts.unused_credits_payable_amount_bcy_formatted |
| unused_retainer_payments | contacts.unused_retainer_payments |
| unused_retainer_payments_formatted | contacts.unused_retainer_payments_formatted |
| status | contacts.status |
| payment_reminder_enabled | contacts.payment_reminder_enabled |
| is_portal_enabled | contacts.is_portal_enabled |
| is_client_review_settings_enabled | contacts.is_client_review_settings_enabled |
| custom_fields | contacts.custom_fields |
| is_taxable | contacts.is_taxable |
| tax_id | contacts.tax_id |
| tax_name | contacts.tax_name |
| tax_percentage | contacts.tax_percentage |
| country_code | contacts.country_code |
| country_code_formatted | contacts.country_code_formatted |
| contact_category | contacts.contact_category |
| contact_category_formatted | contacts.contact_category_formatted |
| is_linked_with_contact | contacts.is_linked_with_contact |
| sales_channel | contacts.sales_channel |
| ach_supported | contacts.ach_supported |
| portal_receipt_count | contacts.portal_receipt_count |
| opening_balances | contacts.opening_balances |
| billing_address | contacts.billing_address |
| shipping_address | contacts.shipping_address |
| contact_persons | contacts.contact_persons |
| comments | contacts.comments |
| addresses | contacts.addresses |
| pricebook_id | contacts.pricebook_id |
| pricebook_name | contacts.pricebook_name |
| default_templates | contacts.default_templates |
| associated_with_square | contacts.associated_with_square |
| can_add_card | contacts.can_add_card |
| can_add_bank_account | contacts.can_add_bank_account |
| cards | contacts.cards |
| checks | contacts.checks |
| bank_accounts | contacts.bank_accounts |
| vpa_list | contacts.vpa_list |
| notes | contacts.notes |
| created_time | contacts.created_time |
| last_modified_time | contacts.last_modified_time |
| tags | contacts.tags |
| zohopeople_client_id | contacts.zohopeople_client_id |
Get Contacts 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.
- Fetch related records
- Retrieve collections of data
- Access lists or tables of information
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.get('contacts').then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
| Property | Request |
|---|---|
| contact_id | contacts.contact_id |
| contact_name | contacts.contact_name |
| customer_name | contacts.customer_name |
| company_name | contacts.company_name |
| website | contacts.website |
| language_code | contacts.language_code |
| language_code_formatted | contacts.language_code_formatted |
| contact_type | contacts.contact_type |
| contact_type_formatted | contacts.contact_type_formatted |
| status | contacts.status |
Show More Supported Input Keys
| Property | Request |
|---|---|
| status_formatted | contacts.status_formatted |
| customer_sub_type | contacts.customer_sub_type |
| customer_sub_type_formatted | contacts.customer_sub_type_formatted |
| source | contacts.source |
| source_formatted | contacts.source_formatted |
| is_linked_with_zohocrm | contacts.is_linked_with_zohocrm |
| payment_terms | contacts.payment_terms |
| payment_terms_label | contacts.payment_terms_label |
| currency_id | contacts.currency_id |
| contacts.twitter | |
| contacts.facebook | |
| currency_code | contacts.currency_code |
| outstanding_receivable_amount | contacts.outstanding_receivable_amount |
| outstanding_receivable_amount_formatted | contacts.outstanding_receivable_amount_formatted |
| outstanding_receivable_amount_bcy | contacts.outstanding_receivable_amount_bcy |
| outstanding_receivable_amount_bcy_formatted | contacts.outstanding_receivable_amount_bcy_formatted |
| unused_credits_receivable_amount | contacts.unused_credits_receivable_amount |
| unused_credits_receivable_amount_formatted | contacts.unused_credits_receivable_amount_formatted |
| first_name | contacts.first_name |
| last_name | contacts.last_name |
| contacts.email | |
| phone | contacts.phone |
| mobile | contacts.mobile |
| is_portal_enabled | contacts.is_portal_enabled |
| created_time | contacts.created_time |
| created_time_formatted | contacts.created_time_formatted |
| last_modified_time | contacts.last_modified_time |
| last_modified_time_formatted | contacts.last_modified_time_formatted |
| custom_fields | contacts.custom_fields |
| ach_supported | contacts.ach_supported |
| tax_treatment | contacts.tax_treatment |
| tax_treatment_formatted | contacts.tax_treatment_formatted |
| selected | contacts.selected |
Set Contacts 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.
- Update custom field values
- Manage user-defined data points
- Ensure targeted updates to specific fields
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('contacts.<custom_field_api_name>',<value>).then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}