I’m developing an app that uses onContactUpdate and onCompanyUpdate. I’ve noticed that onCompanyUpdate payload does not include custom_fields fields while onContactUpdate does include all fields.
This is unfortunate because it is forcing me to make an additional request to get full company record before proceeding.
Is there a way to force full record to be sent in onCompanyUpdate ?
Here is what I get when receiving onCompanyUpdate
{
"id": 69000203947,
"name": "SAFR Cable Pullers",
"description": null,
"domains": [],
"note": null,
"created_at": "2021-03-05T12:35:41Z",
"updated_at": "2021-03-09T01:20:41Z",
"health_score": null,
"account_tier": null,
"renewal_date": null,
"industry": "Automotive",
"changes": {
"string_cc3": [
null,
"Automotive"
]
}
}
This is missing several these fields:
custom_fields.partner_code (Not req’d field. Does have value)
custom_fields.business_type (Not req’d field. Does NOT have value)
custom_fields.country (req’d field. Does have value)
custom_fields.region (req’d field. Does have value)
custom_fields.territory (req’d field. Does have value)
custom_fields.sales_owner (Not req’d field. Does NOT have value)
In short, it seems like the custom_fields are omitted.
In contrast, following is what i get when receiving onContactUpdate. You can see it includes even fields which have null values. This is quite useful if I need data from the contact record during processing.
{
"active": true,
"address": "Brazil",
"company_id": 69000160356,
"description": null,
"email": "SherlockHolmes@mac.com",
"id": 69002394110,
"job_title": "Dir. of Engineering",
"language": "en",
"mobile": "",
"name": "Sherlock Holmes",
"phone": "20672410",
"time_zone": "Pacific Time (US & Canada)",
"twitter_id": "",
"other_emails": [],
"tags": [
"tag1"
],
"created_at": "2021-02-25T02:40:34Z",
"updated_at": "2021-05-02T02:56:15Z",
"custom_fields": {
"country": "Brazil",
"region": "LATAM",
"territory": "South America",
"sales_owner": "Sherlock Holmes",
"crm_id": null
},
"changes": {
"phone": [
"",
"2074210"
]
}
}