Skip to main content
Participating Frequently
Oct 2, 2025 1:57 PM UTC

Webhook Not Pulling Data from Multiple Tables (REQUEST & CUSTOMERCALL)

Issue:

I have a webhook that fires when a service request is deleted, and I'm trying to capture all related fields. The webhook correctly pulls data from the azteca.REQUEST table, but it does not populate fields from the azteca.CUSTOMERCALL table.

 

Setup Details:

  • The webhook triggers on service request deletion.
  • It successfully retrieves data from azteca.REQUEST.
  • Fields related to customer call details (azteca.CUSTOMERCALL) output with the tag, not the value i was expecting, example: "{{CallerType}}" instead of "Busines".

Questions:

  1. Does the webhook support pulling data from multiple related tables?
  2. If so, how do I need to join the tables in a specific way or configure something in Cityworks to ensure both sets of data are available?
  3. Are there limitations when using dynamic tags from multiple tables in a webhook?

Any guidance on resolving this would be greatly appreciated!

    6 replies

    Participating Frequently
    Oct 2, 2025 4:06 PM UTC

    Hi Jeremy,

     

    To get related data like customer details, you would need to append the keyword Related. So the tag should be {{RelatedCallerType}}. You should find the answer to your three questions in the Admin guide for your version in the 'Access Complete List of Webhook Properties' where it explains how to get related table data and the limitations. (not all related data are supported in webhooks)

    Translate
    Participating Frequently
    Oct 2, 2025 4:06 PM UTC

    Hi Jeremy,

     

    To get related data like customer details, you would need to append the keyword Related. So the tag should be {{RelatedCallerType}}. You should find the answer to your three questions in the Admin guide for your version in the 'Access Complete List of Webhook Properties' where it explains how to get related table data and the limitations. (not all related data are supported in webhooks)

    Thank you so much. I'll review this.

    Translate
    Participating Frequently
    Oct 2, 2025 4:06 PM UTC

    Actually, as I am thinking about the webhook event you are using, it may not be possible to get the caller details with the SR delete event since the related keywords only work on events for related records. I think it is because there can be multiple callers so the webhook will not know which caller to retrieve data from. That being said, perhaps you could consider using the Request Caller Delete event to capture the deleted caller details? Assuming the caller is also deleted at the same time.

    Translate
    Known Participant
    Oct 2, 2025 4:06 PM UTC

    @jeremy jessup? The Action Event used determines the webhook parameters immediately available to use.

     

    If you trigger off of the core SR record, then you have access to the parameters in the RequestBase Data Type that correspond to the main SR record, whereas if you trigger off of Caller information, you have access to the parameters in the CustomerCallBase Data Type.

     

    In addition to the main Data Types, you also have the Related options Agatha mentioned, and all of the ones in the WebHookCustomPacketTemplateFlag, such as Comments, QuestionsAnswer, CategoryCustomFieldName, and CategoryCustomFieldValue that do allow you to access some of the information in the SR related tables.

     

    However, if there are other related SR items the webhook can't immediately access, then you would need to use an integration and automation tool, such as FME, PowerAutomate, Make, NodeRED, etc., to go back and grab the additional information the webhook couldn't provide with Cityworks APIs calls.

     

    Please understand webhooks were never intended to do all the things a full integration and automation application can and you often need one of those for more intermediate and complex workflows or accessing the related activity data not immediately accessible based on your Action Event and the available WebHookCustomPacketTemplateFlag items.

     

    That said, we do continue to expand that list and there are more options available in newer versions, such as Trimble Unity Maintain and Permit.

     

    I hope that helps.

     

    Steven

    Translate
    Known Participant
    Oct 2, 2025 4:08 PM UTC

    @jeremy jessup? The Action Event used determines the webhook parameters immediately available to use.

     

    If you trigger off of the core SR record, then you have access to the parameters in the RequestBase Data Type that correspond to the main SR record, whereas if you trigger off of Caller information, you have access to the parameters in the CustomerCallBase Data Type.

     

    In addition to the main Data Types, you also have the Related options Agatha mentioned, and all of the ones in the WebHookCustomPacketTemplateFlag, such as Comments, QuestionsAnswer, CategoryCustomFieldName, and CategoryCustomFieldValue that do allow you to access some of the information in the SR related tables.

     

    However, if there are other related SR items the webhook can't immediately access, then you would need to use an integration and automation tool, such as FME, PowerAutomate, Make, NodeRED, etc., to go back and grab the additional information the webhook couldn't provide with Cityworks APIs calls.

     

    Please understand webhooks were never intended to do all the things a full integration and automation application can and you often need one of those for more intermediate and complex workflows or accessing the related activity data not immediately accessible based on your Action Event and the available WebHookCustomPacketTemplateFlag items.

     

    That said, we do continue to expand that list and there are more options available in newer versions, such as Trimble Unity Maintain and Permit.

     

    I hope that helps.

     

    Steven

    @steven sushka? I realize this may be off-thread but this discussion was tangential to my question:

    I have an Activity Event and a Webhook both triggering off of Inspection Status Change. The Activity Event always works, but the Webhook will only work if the Activity Event is disabled. Is this a known issue, where Activity Events and Webhooks can't trigger off the same Event as the same time?

    Translate
    Known Participant
    Oct 2, 2025 4:08 PM UTC

    @steven sushka? I realize this may be off-thread but this discussion was tangential to my question:

    I have an Activity Event and a Webhook both triggering off of Inspection Status Change. The Activity Event always works, but the Webhook will only work if the Activity Event is disabled. Is this a known issue, where Activity Events and Webhooks can't trigger off the same Event as the same time?

    @calvin harmin? I don't know. You should be able to work around it by creating a separate event for the Activity Update and Webhook. Otherwise, you would need to log a Support case to have them investigate it further.

    Translate