Customer
A person or a business the retailer sells to, with their group, contact details and loyalty.
Area: Customers and groups · Why it is here: openapi.yaml; contract fields; recipe customer_code_check; recipe customer_history_page; recipe loyalty_provider; recipe optical_prescriptions; recipe print_pack; sample S22; sample S25; sample S39; sample S42; sample S43; sample S49; sample S52; the MCP server; the request collection; retail core · Fields: 60
iVendNext's own description: Buyer of Goods and Services.
Read and write it
Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.
Read a list (only name unless you ask for fields):
curl -s "https://⟨site⟩/api/resource/Customer?fields=%5B%22*%22%5D&limit_page_length=20" \
-H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Read one, with its tables:
curl -s "https://⟨site⟩/api/resource/Customer/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Create one (the required fields first), if your app's role may:
curl -s -X POST "https://⟨site⟩/api/resource/Customer" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
-H "Content-Type: application/json" -d '{"customer_name": …, "customer_type": …}'
Change one with PUT /api/resource/Customer/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.
Samples that use it
s5_config_pack · s16_pick_route · s18_rule_guard · s22_customer_loyalty · s24_price_checker · s25_gift_on_spend · s28_merge_and_history · s29_print_pack · s32_coupon_rules · s33_click_and_collect · s39_pharmacy_counter · s40_expiry_recall · s41_regulated_register · s42_optical_prescriptions · s43_third_party_payer · s44_lucky_draw · s46_payment_method_rules · s47_customers_by_store · s48_customer_code_check · s49_post_sale_feedback · s50_required_sale_details · s52_phone_plans
Fields
Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Series | naming_series |
Select | one of: CUST-.YYYY.- | |||
| Salutation | salutation |
Link | Salutation | |||
| Customer Name | customer_name |
Data | yes | |||
| Customer Type | customer_type |
Select | yes | one of: Company, Individual, Partnership | ||
| Customer Group | customer_group |
Link | Customer Group | |||
| Date Of Birth (added by iVendNext) | custom_date_of_birth |
Date | ||||
| Loyalty Member (added by iVendNext) | custom_loyalty_member |
Check | ||||
| Loyalty Program (added by iVendNext) | custom_loyaltyprogram |
Link | Loyalty Setup | |||
| Referee Loyalty Id (added by iVendNext) | custom_referee_loyalty_id |
Link | Customer | |||
| Award Bonus Points On First Transaction To Referee (added by iVendNext) | custom_award_bonus_points_on_first_transaction_to_referee |
Check | yes | |||
| Is Staff (POS Employee Discount) (added by iVendNext) | custom_mpos_is_employee |
Check | ||||
| Staff ID (added by iVendNext) | custom_mpos_staff_id |
Data | ||||
| Territory | territory |
Link | Territory | |||
| Gender | gender |
Link | Gender | |||
| From Lead | lead_name |
Link | Lead | |||
| From Opportunity | opportunity_name |
Link | Opportunity | |||
| From Prospect | prospect_name |
Link | Prospect | |||
| Account Manager | account_manager |
Link | User | |||
| Date Of Anniversary (added by iVendNext) | custom_date_of_anniversary |
Date | ||||
| Email (added by iVendNext) | custom_email |
Data | ||||
| Phone Number (added by iVendNext) | custom_phone_no |
Data | ||||
| Image | image |
Attach Image | yes | |||
| Billing Currency | default_currency |
Link | Currency | |||
| Default Company Bank Account | default_bank_account |
Link | Bank Account | |||
| Default Price List | default_price_list |
Link | Price List | |||
| Is Internal Customer | is_internal_customer |
Check | ||||
| Represents Company | represents_company |
Link | Company | |||
| Allowed To Transact With | companies |
Table | Allowed To Transact With | |||
| Market Segment | market_segment |
Link | Market Segment | |||
| Industry | industry |
Link | Industry Type | |||
| Customer POS id | customer_pos_id |
Data | yes | |||
| Website | website |
Data | ||||
| Print Language | language |
Link | Language | |||
| Customer Details | customer_details |
Text | ||||
| Customer Primary Address | customer_primary_address |
Link | Address | |||
| Primary Address | primary_address |
Text | yes | |||
| Customer Primary Contact | customer_primary_contact |
Link | Contact | |||
| Mobile No | mobile_no |
Read Only | yes | |||
| Email Id | email_id |
Read Only | yes | |||
| Tax ID | tax_id |
Data | ||||
| Tax Category | tax_category |
Link | Tax Category | |||
| Tax Withholding Category | tax_withholding_category |
Link | Tax Withholding Category | |||
| Default Payment Terms Template | payment_terms |
Link | Payment Terms Template | |||
| Credit Limit | credit_limits |
Table | Customer Credit Limit | |||
| Accounts | accounts |
Table | Party Account | |||
| Loyalty Program | loyalty_program |
Link | Loyalty Program | |||
| Loyalty Program Tier | loyalty_program_tier |
Data | yes | |||
| Sales Team | sales_team |
Table | Sales Team | |||
| Sales Partner | default_sales_partner |
Link | Sales Partner | |||
| Commission Rate | default_commission_rate |
Float | ||||
| Allow Sales Invoice Creation Without Sales Order | so_required |
Check | ||||
| Allow Sales Invoice Creation Without Delivery Note | dn_required |
Check | ||||
| Is Frozen | is_frozen |
Check | ||||
| Disabled | disabled |
Check | ||||
| Customer Portal Users | portal_users |
Table | Portal User | |||
| Total Points Awarded (added by iVendNext) | custom_total_points_awarded |
Data | ||||
| Total Points Redeemed (added by iVendNext) | custom_total_points_redeemed |
Data | ||||
| Available Points (added by iVendNext) | custom_available_points |
Data | yes | |||
| Total Expired Points (added by iVendNext) | custom_total_expired_points |
Data | ||||
| Current Level (added by iVendNext) | custom_current_level |
Data | yes |
Table: Allowed To Transact With
The rows of companies. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Company | company |
Link | yes | Company |
Table: Customer Credit Limit
The rows of credit_limits. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Company | company |
Link | Company | |||
| Credit Limit | credit_limit |
Currency | ||||
| Bypass Credit Limit Check at Sales Order | bypass_credit_limit_check |
Check |
Table: Party Account
The rows of accounts. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Company | company |
Link | yes | Company | ||
| Default Account | account |
Link | Account | |||
| Advance Account | advance_account |
Link | Account |
Table: Portal User
The rows of portal_users. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| User | user |
Link | yes | User |
Table: Sales Team
The rows of sales_team. Each row also has idx (its place), parent, parentfield and parenttype.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Sales Person | sales_person |
Link | yes | Sales Person | ||
| Contact No. | contact_no |
Data | yes | |||
| Contribution (%) | allocated_percentage |
Float | ||||
| Contribution to Net Total | allocated_amount |
Currency | yes | |||
| Commission Rate | commission_rate |
Data | yes | |||
| Incentives | incentives |
Currency |