Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Workflow and Service Hooks Trigger Best Practices

Workflows and service hooks are powerful tools for automating business processes in Conga. They act on your data dynamically, responding to record changes and events in real time. But this power comes with a responsibility: if triggers are not designed carefully, they can cause the system to enter an infinite feedback loop.

This topic explains how feedback loops occur, shows you what they look like in practice, and gives you clear, actionable guidance to prevent them.

Why Feedback Loops Happen

A feedback loop occurs when a workflow or service hook trigger is broad enough to fire not just on user-initiated actions, but also on the changes made by the workflow itself. The result is a self-sustaining cycle of executions that never stops on its own.

Here is what that cycle looks like step by step:
StepWhat happens
1A user updates a record, for example, changing the Status field.
2The platform detects the update and matches it to a workflow trigger condition.
3The workflow runs and writes back to the same record, for example, updating a related field.
4The platform sees this write-back as a new update and fires the workflow again.
5The cycle repeats indefinitely until the platform intervenes.
The platform cannot distinguish between a change made by a user and a change made by a workflow. If your trigger condition does not account for this, every workflow execution generates another one.
Important: Left unchecked, feedback loops can exhaust API rate limits, flood records with thousands of spurious updates, trigger hundreds of duplicate notifications, and degrade platform performance for your entire organization.

Common Loop Scenarios

Feedback loops can form in several ways. Understanding the most common patterns helps you spot potential problems before they occur.

Scenario 1: A Workflow That Triggers Itself

This is the most straightforward pattern. A workflow fires whenever an Agreement record is updated, and as part of its logic, it writes back to the same Agreement record. That write-back looks like a user update to the platform, so the workflow fires again, and again, indefinitely.

Tip: Always ask: could the action my workflow takes match its own trigger condition? If yes, tighten the condition before deploying.

Scenario 2: Two Workflows That Trigger Each Other

This pattern is harder to spot because each workflow looks safe in isolation. The problem only appears when you look at how the two interact:

  • Workflow A fires on an update to Agreement and writes to a related AgreementLineItem record.
  • Workflow B fires on an update to AgreementLineItem and writes back to Agreement.

Workflow A triggers Workflow B, which triggers Workflow A, creating an endless loop between two objects. When designing workflows that span related objects, always map out what each workflow writes and check whether those writes could trigger another workflow in your system.

Scenario 3: Service Hooks and Workflows Triggering Each Other

A service hook execution can trigger a workflow, and that workflow execution can in turn fire the same service hook again. This cross-component loop is particularly difficult to detect because the two components may have been configured independently, by different teams, at different times.
Tip: When service hooks and workflows operate on the same objects, review them together rather than separately. A combined review catches cross-component loop risks that individual reviews miss.

How to Prevent Loops

The most effective way to prevent feedback loops is to design precise trigger conditions. A well-scoped trigger fires only when a specific business event occurs, not when an unrelated update or a workflow write-back happens on the same record.

There are four dimensions you can tune to make a trigger precise:
DimensionWhat it controlsExampleRisk if ignored
Action typeWhether the trigger fires on Create, Update, or DeleteOn Created rather than On Any ChangeThe trigger fires on every update, including write-backs from other workflows
Field specificityWhich field or fields must change for the trigger to fireStatus CHANGEDThe trigger fires when any field changes, including internal system fields
Value transitionWhat value the field must change toStatus changed TO ApprovedThe trigger fires on any status change, not just the one you care about
Prior state guardWhat the field value must have been before the changeOld Status was Pending AND Status changed to ApprovedThe trigger fires repeatedly, including on re-approvals and re-runs

Putting It Into Practice: Compare these two versions of the same trigger:

  • Without precise conditions (unsafe):
    Trigger:    On Order Update
    Condition:  None
    
    Result:     Fires on every update to every Order record, including write-backs
                from other workflows. One execution causes another, indefinitely.
    
  • With precise conditions (safe):
    Trigger:    On Order Update
    Condition:  ApprovalStatus CHANGED FROM Pending TO Approved
    
    Result:     Fires only on this specific transition. A workflow writing to an
                unrelated field, or writing the same value again, will never
                match this condition.
    
    Note: Applying all four dimensions to a single trigger gives you a condition that maps to exactly one business event. This is the goal.

Platform Safety Mechanisms

Even with well-designed triggers, the Conga Advantage Platform includes built-in throttling to detect and stop runaway executions before they cause serious damage. This acts as a safeguard, not a replacement for proper trigger design.

The Conga Advantage Platform tracks how many times a workflow or service hook runs for a specific record within a set time window. Once that count reaches the configured limit, further executions are paused until the cooldown period expires.
SettingDefault valueWhat it controls
Workflow execution limit per record20Maximum number of times a workflow can run for the same record within the throttle window
Workflow throttle window30 secondsThe time window within which the execution limit is tracked
Workflow cooldown period30 secondsHow long the platform waits before allowing the workflow to run again after hitting the limit
Service hooks execution limit per record20Maximum number of times service hooks custom code can run for the same record within the throttle window
Service hooks throttle window30 secondsThe time window within which the service hooks execution limit is tracked
Service hooks cooldown period30 secondsHow long the platform waits before allowing service hooks to run again after hitting the limit
Important: If your workflows are consistently hitting throttle limits, that is a signal to review and tighten your trigger conditions, not to raise the throttle limit. Throttling stops the immediate damage, but it does not fix the underlying problem.