Zoho Writeback from Saving Quote (send_to_zoho)What is Zoho writeback?
When a user saves a quote, IMG pushes the quote details back to the matching opportunity (Potential) in Zoho CRM. This is the send_to_zoho call. It takes the applicant and product data you send, maps each value to its Zoho field, and updates the record.
For a saved quote you send the request with is_quote: true. This tells IMG to:
- Set the opportunity Stage to
Quote. - Skip the fund-specific payment method conversion (quotes don't submit to a fund).
- Record the quote against the opportunity so it can be retrieved later.
Only the fields you include in the payload are written. A field left out (or sent as null) is skipped, except for a small set of fields that are always written so they can be explicitly cleared in Zoho (see the note at the end).
Saving a quote
Let's say a user has compared options for a customer and wants to save the Family Combined quote they're interested in, then send it to the customer by SMS and email.
The request body would look like this:
{
"type": "send_to_zoho",
"is_quote": true,
"direct_debit_discount": true,
"applicant": {
"zoho_id": "1234567890",
"cmn_id": "CMN-0001",
"zoho": {
"send_email": true,
"send_sms": true,
"expected_yearly_savings": 420
},
"personal": {
"first_name": "Jane",
"last_name": "Doe",
"dob": "1992-09-30",
"gender": "female"
},
"policy": {
"membership_type": 3,
"cover_type": 2,
"federal_rebate": true,
"rebate_tier": "base",
"held_continuous_hospital_cover": true,
"lhc_age": 31
},
"payment": {
"frequency": 2
}
},
"product": {
"id": 987654,
"name": "Gold Family Combined",
"excess": 500,
"fund": { "name": "Example Health" },
"type": 0,
"membership_type": 3,
"state": "VIC"
}
}
IMG looks up the opportunity by applicant.zoho_id, maps each value to its Zoho field, sets the stage to Quote, and returns the updated applicant record.
Field mapping
The Source Path is where the value lives in the request body. applicant.* sits under the applicant object, product.* under the product object. Update if null marks the fields that are written even when the value is missing.
Applicant and policy
Zoho Field Source Path Conversion First Name applicant.personal.first_namefirst 15 chars Last Name applicant.personal.last_namefirst 15 chars Date of Birth applicant.personal.dobdate YYYY-MM-DD Gender applicant.personal.genderenum Email applicant.contact.email_address— Phone applicant.contact.phone_mobile (falls back to home, then work)— State applicant.primary_address.state— Type applicant.policy.membership_typeenum Rebate applicant.policy.federal_rebateYes / No Rebate tier applicant.policy.rebate_tier— (update if null) Held Continuous Hospital Cover applicant.policy.held_continuous_hospital_coverYes / No (update if null) LHC age applicant.policy.lhc_ageinteger, minimum 30 (update if null) LHC age Partner applicant.policy.lhc_age_partnerinteger, minimum 30 (update if null) Youth Discount age applicant.policy.primary_youth_discount_age— (update if null) Partner Youth Discount age applicant.policy.partner_youth_discount_age— (update if null) Number of Dependants applicant.number_of_dependants—
Payment
Zoho Field Source Path Conversion Payment Frequency applicant.payment.frequencyenum Payment Type applicant.payment.typeenum (not converted for quotes) Payment Date applicant.payment.debit_datedate YYYY-MM-DD Start Date applicant.payment.join_datedate YYYY-MM-DD Actual amount derived from frequency and premium rounded to 2 dp
Product and pricing
Zoho Field Source Path Conversion Fund product.fund.name— Cover Name product.name— Excess product.excess— Rate code product.id— Product Code looked up from product.id — Hospital Level looked up from product.id — Amount calculated monthly premium rounded to 2 dp Amount (Annual) calculated annual premium rounded to 2 dp Fortnightly Amount calculated fortnightly premium rounded to 2 dp Rate calculated rebate percentage rounded to 4 dp LHC amount calculated LHC loading rounded to 1 dp Online sale derived Y for public joins, else NJoin type derived Operator / Funnel / Public
Fund, Cover Name and Excess are read straight from the product object you send. If your product only contains id, type, membership_type and state, these three fields come through empty and won't update. Include product.name, product.excess and product.fund.name in the payload.
Partner
Zoho Field Source Path Conversion Partner's Date of Birth applicant.partner.dobdate YYYY-MM-DD Partner's Gender applicant.partner.genderenum Partner's Title applicant.partner.titleenum Partner's Given Name applicant.partner.first_name— Partner's Surname applicant.partner.last_name—
Previous fund
Zoho Field Source Path Conversion New to Phi applicant.personal.previous_fund.has_previous_fundY / N (inverted) Current Fund applicant.personal.previous_fund.fund_id— Health Fund Member No applicant.personal.previous_fund.member_number— Health Fund Name derived from previous_fund.fund_id fund name Current Monthly Payment applicant.personal.previous_fund.fund_monthly_payment— Current state applicant.personal.previous_fund.state— Current membership type applicant.personal.previous_fund.membershipenum
Quote details
Zoho Field Source Path Conversion SMS Quote link applicant.zoho.send_smsY / N Email quote link applicant.zoho.send_emailY / N Approximate Saving (per year) applicant.zoho.expected_yearly_savings— Improved Benefit 1 applicant.zoho.improved_benefit_1— Improved Benefit 2 applicant.zoho.improved_benefit_2— Improved Benefit 3 applicant.zoho.improved_benefit_3— Stage set automatically Quote when is_quote is true
A note on empty values
Most fields are skipped when the value is missing or null, so leaving a field out of the payload leaves the existing Zoho value untouched. A small set of fields is the exception. These are always written, which means sending null clears them in Zoho:
lhc_age, lhc_age_partner, held_continuous_hospital_cover, youth_discount_age, partner_youth_discount_age, rebate_tier, discount_code, promo_code, fund_offer_code, aia_promotion_code, dva_card_type, employer_name.
One more thing to keep in mind: a field is only written if its label maps to an actual field on that fund's Zoho setup. If a label isn't configured, the value is dropped without an error.
What is Zoho writeback?
When a user saves a quote, IMG pushes the quote details back to the matching opportunity (Potential) in Zoho CRM. This is the send_to_zoho call. It takes the applicant and product data you send, maps each value to its Zoho field, and updates the record.
For a saved quote you send the request with is_quote: true. This tells IMG to:
- Set the opportunity Stage to
Quote. - Skip the fund-specific payment method conversion (quotes don't submit to a fund).
- Record the quote against the opportunity so it can be retrieved later.
Only the fields you include in the payload are written. A field left out (or sent as null) is skipped, except for a small set of fields that are always written so they can be explicitly cleared in Zoho (see the note at the end).
Saving a quote
Let's say a user has compared options for a customer and wants to save the Family Combined quote they're interested in, then send it to the customer by SMS and email.
The request body would look like this:
{
"type": "send_to_zoho",
"is_quote": true,
"direct_debit_discount": true,
"applicant": {
"zoho_id": "1234567890",
"cmn_id": "CMN-0001",
"zoho": {
"send_email": true,
"send_sms": true,
"expected_yearly_savings": 420
},
"personal": {
"first_name": "Jane",
"last_name": "Doe",
"dob": "1992-09-30",
"gender": "female"
},
"policy": {
"membership_type": 3,
"cover_type": 2,
"federal_rebate": true,
"rebate_tier": "base",
"held_continuous_hospital_cover": true,
"lhc_age": 31
},
"payment": {
"frequency": 2
}
},
"product": {
"id": 987654,
"name": "Gold Family Combined",
"excess": 500,
"fund": { "name": "Example Health" },
"type": 0,
"membership_type": 3,
"state": "VIC"
}
}
IMG looks up the opportunity by applicant.zoho_id, maps each value to its Zoho field, sets the stage to Quote, and returns the updated applicant record.
Field mapping
The Source Path is where the value lives in the request body. applicant.* sits under the applicant object, product.* under the product object. Update if null marks the fields that are written even when the value is missing.
Applicant and policy
| Zoho Field | Source Path | Conversion |
|---|---|---|
| First Name | applicant.personal.first_name | first 15 chars |
| Last Name | applicant.personal.last_name | first 15 chars |
| Date of Birth | applicant.personal.dob | date YYYY-MM-DD |
| Gender | applicant.personal.gender | enum |
applicant.contact.email_address | — | |
| Phone | applicant.contact.phone_mobile (falls back to home, then work) | — |
| State | applicant.primary_address.state | — |
| Type | applicant.policy.membership_type | enum |
| Rebate | applicant.policy.federal_rebate | Yes / No |
| Rebate tier | applicant.policy.rebate_tier | — (update if null) |
| Held Continuous Hospital Cover | applicant.policy.held_continuous_hospital_cover | Yes / No (update if null) |
| LHC age | applicant.policy.lhc_age | integer, minimum 30 (update if null) |
| LHC age Partner | applicant.policy.lhc_age_partner | integer, minimum 30 (update if null) |
| Youth Discount age | applicant.policy.primary_youth_discount_age | — (update if null) |
| Partner Youth Discount age | applicant.policy.partner_youth_discount_age | — (update if null) |
| Number of Dependants | applicant.number_of_dependants | — |
Payment
| Zoho Field | Source Path | Conversion |
|---|---|---|
| Payment Frequency | applicant.payment.frequency | enum |
| Payment Type | applicant.payment.type | enum (not converted for quotes) |
| Payment Date | applicant.payment.debit_date | date YYYY-MM-DD |
| Start Date | applicant.payment.join_date | date YYYY-MM-DD |
| Actual amount | derived from frequency and premium | rounded to 2 dp |
Product and pricing
| Zoho Field | Source Path | Conversion |
|---|---|---|
| Fund | product.fund.name | — |
| Cover Name | product.name | — |
| Excess | product.excess | — |
| Rate code | product.id | — |
| Product Code | looked up from product.id | — |
| Hospital Level | looked up from product.id | — |
| Amount | calculated monthly premium | rounded to 2 dp |
| Amount (Annual) | calculated annual premium | rounded to 2 dp |
| Fortnightly Amount | calculated fortnightly premium | rounded to 2 dp |
| Rate | calculated rebate percentage | rounded to 4 dp |
| LHC amount | calculated LHC loading | rounded to 1 dp |
| Online sale | derived | Y for public joins, else N |
| Join type | derived | Operator / Funnel / Public |
Fund, Cover Name and Excess are read straight from the
productobject you send. If yourproductonly containsid,type,membership_typeandstate, these three fields come through empty and won't update. Includeproduct.name,product.excessandproduct.fund.namein the payload.
Partner
| Zoho Field | Source Path | Conversion |
|---|---|---|
| Partner's Date of Birth | applicant.partner.dob | date YYYY-MM-DD |
| Partner's Gender | applicant.partner.gender | enum |
| Partner's Title | applicant.partner.title | enum |
| Partner's Given Name | applicant.partner.first_name | — |
| Partner's Surname | applicant.partner.last_name | — |
Previous fund
| Zoho Field | Source Path | Conversion |
|---|---|---|
| New to Phi | applicant.personal.previous_fund.has_previous_fund | Y / N (inverted) |
| Current Fund | applicant.personal.previous_fund.fund_id | — |
| Health Fund Member No | applicant.personal.previous_fund.member_number | — |
| Health Fund Name | derived from previous_fund.fund_id | fund name |
| Current Monthly Payment | applicant.personal.previous_fund.fund_monthly_payment | — |
| Current state | applicant.personal.previous_fund.state | — |
| Current membership type | applicant.personal.previous_fund.membership | enum |
Quote details
| Zoho Field | Source Path | Conversion |
|---|---|---|
| SMS Quote link | applicant.zoho.send_sms | Y / N |
| Email quote link | applicant.zoho.send_email | Y / N |
| Approximate Saving (per year) | applicant.zoho.expected_yearly_savings | — |
| Improved Benefit 1 | applicant.zoho.improved_benefit_1 | — |
| Improved Benefit 2 | applicant.zoho.improved_benefit_2 | — |
| Improved Benefit 3 | applicant.zoho.improved_benefit_3 | — |
| Stage | set automatically | Quote when is_quote is true |
A note on empty values
Most fields are skipped when the value is missing or null, so leaving a field out of the payload leaves the existing Zoho value untouched. A small set of fields is the exception. These are always written, which means sending null clears them in Zoho:
lhc_age, lhc_age_partner, held_continuous_hospital_cover, youth_discount_age, partner_youth_discount_age, rebate_tier, discount_code, promo_code, fund_offer_code, aia_promotion_code, dva_card_type, employer_name.
One more thing to keep in mind: a field is only written if its label maps to an actual field on that fund's Zoho setup. If a label isn't configured, the value is dropped without an error.