Guides

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:

  1. Set the opportunity Stage to Quote.
  2. Skip the fund-specific payment method conversion (quotes don't submit to a fund).
  3. 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 FieldSource PathConversion
First Nameapplicant.personal.first_namefirst 15 chars
Last Nameapplicant.personal.last_namefirst 15 chars
Date of Birthapplicant.personal.dobdate YYYY-MM-DD
Genderapplicant.personal.genderenum
Emailapplicant.contact.email_address
Phoneapplicant.contact.phone_mobile (falls back to home, then work)
Stateapplicant.primary_address.state
Typeapplicant.policy.membership_typeenum
Rebateapplicant.policy.federal_rebateYes / No
Rebate tierapplicant.policy.rebate_tier(update if null)
Held Continuous Hospital Coverapplicant.policy.held_continuous_hospital_coverYes / No (update if null)
LHC ageapplicant.policy.lhc_ageinteger, minimum 30 (update if null)
LHC age Partnerapplicant.policy.lhc_age_partnerinteger, minimum 30 (update if null)
Youth Discount ageapplicant.policy.primary_youth_discount_age(update if null)
Partner Youth Discount ageapplicant.policy.partner_youth_discount_age(update if null)
Number of Dependantsapplicant.number_of_dependants

Payment

Zoho FieldSource PathConversion
Payment Frequencyapplicant.payment.frequencyenum
Payment Typeapplicant.payment.typeenum (not converted for quotes)
Payment Dateapplicant.payment.debit_datedate YYYY-MM-DD
Start Dateapplicant.payment.join_datedate YYYY-MM-DD
Actual amountderived from frequency and premiumrounded to 2 dp

Product and pricing

Zoho FieldSource PathConversion
Fundproduct.fund.name
Cover Nameproduct.name
Excessproduct.excess
Rate codeproduct.id
Product Codelooked up from product.id
Hospital Levellooked up from product.id
Amountcalculated monthly premiumrounded to 2 dp
Amount (Annual)calculated annual premiumrounded to 2 dp
Fortnightly Amountcalculated fortnightly premiumrounded to 2 dp
Ratecalculated rebate percentagerounded to 4 dp
LHC amountcalculated LHC loadingrounded to 1 dp
Online salederivedY for public joins, else N
Join typederivedOperator / 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 FieldSource PathConversion
Partner's Date of Birthapplicant.partner.dobdate YYYY-MM-DD
Partner's Genderapplicant.partner.genderenum
Partner's Titleapplicant.partner.titleenum
Partner's Given Nameapplicant.partner.first_name
Partner's Surnameapplicant.partner.last_name

Previous fund

Zoho FieldSource PathConversion
New to Phiapplicant.personal.previous_fund.has_previous_fundY / N (inverted)
Current Fundapplicant.personal.previous_fund.fund_id
Health Fund Member Noapplicant.personal.previous_fund.member_number
Health Fund Namederived from previous_fund.fund_idfund name
Current Monthly Paymentapplicant.personal.previous_fund.fund_monthly_payment
Current stateapplicant.personal.previous_fund.state
Current membership typeapplicant.personal.previous_fund.membershipenum

Quote details

Zoho FieldSource PathConversion
SMS Quote linkapplicant.zoho.send_smsY / N
Email quote linkapplicant.zoho.send_emailY / N
Approximate Saving (per year)applicant.zoho.expected_yearly_savings
Improved Benefit 1applicant.zoho.improved_benefit_1
Improved Benefit 2applicant.zoho.improved_benefit_2
Improved Benefit 3applicant.zoho.improved_benefit_3
Stageset automaticallyQuote 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.