Identifying customer in company_contacts/delete

I’m trying to make a change to a customer when they are removed as a company contact. I’m listening for the company_contacts/delete webhook. Per the docs (which this form will not let me link) this includes the customer ID although I suspect this is an error in the docs since the actual data I receive has only the CompanyContact ID and generally delete webhooks have minimal info.

How can I tell which customer, or even which company this was part of? By the time I get the webhook the CompanyContact has already been deleted so I can’t get the data that way.

Example of the webhook payload I’m receiving:

{
  "customer_admin_graphql_api_id": null,
  "title": null,
  "locale": null,
  "created_at": null,
  "updated_at": null,
  "admin_graphql_api_id": "gid://shopify/CompanyContact/1111",
  "company": null
}
1 Like

Hey @Andrew_Barclay,

This is expected for deletion webhooks as you mentioned they generally have minimal data.

I was testing some other webhooks (customer updates and company update) and these don’t trigger when removing a company contact, only with additions.

I’d like to dig in more to your specific use case to see what else can be done. Would you be able to share a little bit about the context on how you’re using this webhook or needing to know the specific customer/company that removed a contact? This will help me test other options and better communicate feature requests to our product teams if an option doesn’t exist.