onCompanyUpdate playload not include custom_fields in JSON record

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"
        ]
    }
}
1 Like

Hi Steve,

Just checked the documentation and there is no mention of custom fields in company payload object. Perhaps this is something not supported yet and could be raised as a request to the product team.
Meanwhile you can get the custom fields value through API using company object ID.

@Saif Can you please check this with product team?

2 Likes

Just to make sure its clear, custom_fields are sent with contact but not with company.

1 Like

Thanks for the mention, @yusrakhatri.

@stevemc - Apologies for the delay.

Currently, the product event payloads don’t contain the information which is from custom fields.

But instead, you may have to make an additional API call to Freshdesk Contacts API and get that information for your app.

I request you upvote a similar request. so that we get an opportunity to get this prioritized with the platform team.

2 Likes