---
title: "Pushback Actions"
canonical: "https://help.agiloft.com/space/HELP/43718030/Pushback+Actions"
format: markdown
---
Pushback actions are designed to sync data in your KB with data in your contract documents if one is updated. For example, if you generate a contract and receive a negotiated version, you can use pushback actions to update the records in Agiloft to reflect the changes in the document.

- [(D2K) Sync Contract Document Data to KB](#d2k_action): Uses the data in the contract document as the source of truth, allowing you to update the KB with values from the contract document.
- [(K2D) Sync Key Terms from KB to Document](#k2d_action): Uses the data in the KB as the source of truth, allowing you to update the contract document with values from the KB.

This page details the configuration steps for these action types. Note that these action types are available only in the Attachment table.

# Prerequisites

Before you use these actions, follow these steps:

1. Navigate to the table in your KB that holds document templates.
2. Click **More > Print Records > Manage**.
3. Edit a template.
4. Scroll down to the Advanced Tagging Options section and select both options.
5. It's also recommended to select the last two options on the page:
  - Convert the Altchunks to normal paragraphs
  - Remove legacy markers from contract clauses
6. Repeat these steps for each template that is active in your system.
7. Click Finish.

# > Macro (anchor)

Sync Contract Document Data to KB

Follow the steps below to create a D2K action that syncs data from a contract document to its Contract record and other linked records. You can configure the action to sync both key terms to Contract records and clauses to Contract Clause records or just one or the other. 

> ℹ️ **Key Term Sync Limitation**
> ℹ️ 
> ℹ️ When syncing key terms from contracts generated from document templates, changes to field variable values are synced but results from formulas aren’t. For example:
> ℹ️ 
> ℹ️ A document template includes the variable `$contract_amount`. A contract is generated from that template, and it has a Contract Amount of $100,000. Later, the amount in the document is changed to $120,000. Running the D2K action updates the Contract Amount in the Contract record to $120,000. However, if the document template uses a formula, like `$formula($contract_amount*$discount_percentage)`, to calculate the amount and that amount is changed in the document, the action can’t update the values for the associated fields in the Contract record.
> ℹ️ 
> ℹ️ There’s an exception for formulas that format dates. You can configure a D2K action to sync those results. For example:
> ℹ️ 
> ℹ️ A document template includes the formula `$formula(dateformat ("MMMMM d, yyyy",$contract_start_date))`. A contract generated from the template has a Contract Start Date of 12/15/2026, so the value in the document is December 15, 2026. Later, the date in the document is changed to January 15, 2027. If the D2K action is configured to sync date format results, running the action updates the Contract Start Date in the record to 01/15/2027.

1. Navigate to Setup [Attachments].
2. Go to the Actions tab.
3. Click Sync Contract Document Data to KB. The abbreviation is D2K, which stands for Document to KB.
4. Enter a Name and optionally a Description.
5. Click Next.
6. On the Data Source tab, configure the settings that define where to store markup files and logs that the action generates:
  - **Markup Against Baseline Contract File**: Select the field that stores the marked-up version of a contract when it’s compared against the baseline version of the file. In a standard implementation, typically the Markup Against Baseline Contract File field is selected.
  - **Store Key Term Sync logs**: Select the field to log key term sync information to. Typically set to Data Pushback Log.
  - **Store Contract Clause Sync logs**: Select the field to log clause sync information to. Typically set to Clause Pushback Log.
7. Click Next.
8. On the Key Term Sync Options tab, configure how to handle Contract and linked record updates when syncing key terms from the document. If you don’t want to sync key terms at all, select the Ignore radio button near the top of the screen and click Next. Then go to Step 9. If you want to sync terms, follow these steps:
  1. At the top of the screen, select the “Sync key terms that are marked as changed” option if you want to sync only changed terms or “Sync all key terms whether changed or not” if you want to sync all terms whether they changed or not.  
:note: The “Sync all key terms whether changed or not” option is more resource intensive than the first option but is useful if you want to ensure the KB is in sync with the document. For example, if a key term isn’t changed in the document but someone inadvertently changed it in the KB, the KB and document are brought back in sync.
  2. If you want the system to try to sync date or datetime format formula results, select the “Sync Date / Date time formula results” checkbox.
  3. Next, set the “Sync behavior for multiple matching linked records.” This setting controls the sync behavior for linked fields when a term in the document matches multiple linked records. You can choose from the following options:
    - **Set To Empty**: Clears the linked field in the Contract record. The default value.
    - **Use Oldest Value**: Uses the linked record value that was created first.
    - **Use Newest Value**: Uses the linked record value that was created most recently.
    - **Ignore**: Leaves the value in the Contract record unchanged.
  4. Now, set the “Sync behavior if none of the linked records match.” This setting controls the sync behavior for linked fields when a term in the document doesn’t match any linked records. You can choose from the following options:
    - **Set To Empty**: Clears the linked field in the Contract record. The default value.
    - **Ignore**: Leaves the value in the Contract record unchanged.
  5. Next, the action is configured to “Update values of chained variables in source record” by default. For example, if a document includes the chain $company_id.main_location_id.location_name and the location name is changed, Location Name in the Location record is updated. If you don’t want to update chained variables, select the Ignore radio button.
  6. Next, by default, the action is configured to ignore updates to related table records. If you want the action to update fields in related source records if a term in a related table is changed, select the “Update related table records in KB” radio button.
  7. The action is also configured to ignore deleted rows in related tables by default. This means if content is deleted from a document and would result in removal of the linked record from a related table in the Contract record, that record will still be shown in the table. If you want to unlink related records from the table, select the “Unlink the deleted row(s) from Contract record” radio button.  
:note: The action doesn’t create new rows in related tables. If content is added to a document that would result in a link to a new record, that record won’t be listed in the table in the Contract record.
  8. Lastly, the action is configured by default to ignore changes to records linked in embedded search results. If you want the action to update those records, select the “Update embedded table records in KB” radio button.  
:note: The action can’t add or delete rows in embedded tables.
  9. Click Next.
9. On the Contract Clause Sync Options tab, configure how to handle Contract Clause updates when syncing clauses from the document:
  1. First, configure how to handle existing clauses:
    - If you want to sync only modified clauses, select “Sync contract clauses that are marked as changed.”
    - If you want to sync all clauses whether they changed or not, select “Sync all contract clauses (whether changed or not).”  
:note: The “Sync all contract clauses (whether changed or not)” option is more resource intensive than the first option but is useful if you want to ensure the KB is in sync with the document. For example, if a clause isn’t changed in the document but someone inadvertently changed it in the KB, the KB and document are brought back in sync
    - If you don’t want to sync existing clauses at all, select the Ignore radio button and go to Step d.
  2. Next, choose which fields in the Contract Clause table store the current clause text and current markup. The out-of-the-box fields are selected by default in the “Contract Clause field holding current text” and “Contract Clause field holding markup text” settings. If necessary, you can select different fields from the drop-down lists.
  3. Now, choose which Status values you want to set in Contract Clause records for modified, deleted, and reverted clauses that are synced to the KB.
  4. By default, D2K actions are configured to ignore new clauses in documents. If you don’t want to sync new clauses, go to Step 10. If you want to sync new clauses, select “Sync new contract clauses” under Handling new untagged content. Then follow these steps:
    1. When new clauses are found, the system generates a new version of the entire contract document. The new document includes tags for the new clauses. In the Destination file field, select the field in your Attachments table to store new contract files in.  
:note: Choose a File with versioning field so the new file supersedes the existing version. Don’t choose a field that allows multiple files. In a standard implementation, select the Attached File field.
    2. Next, in the Default Clause Type for new Contract Clauses field, you have the option to set a default Clause Type for all new clauses. If you want to assign a type, click the drop-down list and choose a value.
    3. By default, D2K actions are configured to retain list item numbering in new clauses. If you want to retain numbering, go to the next step. If you don’t want to include numbering in the Contract Clause record, select No under Retain document numbering.
    4. By default, D2K actions are configured to tag and sync all content found between previously tagged clauses as a single clause, even if the content contains headings. If you want the action to ignore headings and create separate clauses for content before and after them, select the “Ignore headings up to (and including) level” checkbox. Then choose the heading levels to ignore. For example, if set to 3, the action ignores headings 1, 2, and 3, but heading levels 4 and above are included in new clauses.
10. Finally, since the Contract Clause Text and Contract Clause Markup fields in Contract Clause records are HTML-based fields that support standard HTML formatting tags, D2K actions are configured by default to render Microsoft Word style headings as HTML headings that match the style in the document. If you don’t want to format headings with the same styles as the document, click No under “Add MS Word generated Style Headers to Contract Clause HTML fields.”
11. Click Finish to save the configuration.

For guidance on using the new action in your existing workflows, see [Configuring Pushback Actions in your KB](#using_pushback_actions).

# > Macro (anchor)

Sync Key Terms from KB to Document

To create a Sync Key Terms from KB to Document action:

1. Navigate to Setup [Attachments].
2. Go to the Actions tab.
3. Click Sync Key Terms from KB to Document. The abbreviation is K2D, which stands for KB to Document.
4. Enter a Name and optionally a Description.
5. Click Next.
6. <span style="color: #2f3c44">Under Source field, select the field that holds the document you want to sync.</span>
7. <span style="color: #2f3c44">Under Destination field, select the field that will hold the new, synced version of the document. You can choose to append the updated version to the same field if you want to hold multiple versions, like the example below. Or, you can remove the prior version and replace it with the new file using the overwrite option.</span>  
> Macro (inline-media-image)
8. Click Finish to save the configuration.

For guidance on using the new action in your existing workflows, see [Configuring Pushback Actions in your KB](#using_pushback_actions).

# > Macro (anchor)

Configuring Pushback Actions in your KB

<span style="color: #2f3c44">After you've created the actions, use these steps as a guide for adding them to your existing workflows.</span>

#### <span style="color: #2f3c44">Updating Rules</span>

<span style="color: #2f3c44">First, you may need to replace some settings in your KB with the new Pushback Action:</span>

1. Navigate to Setup [Attachments].
2. Go to the Rules tab.
3. Edit the rule containing `PUSHBACK_CLAUSE_UPDATES.jar`<span style="color: #222c31">, which you can easily find with Ctrl+F.</span>
4. <span style="color: #222c31">Remove the </span>`S: PUSHBACK_CLAUSE_UPDATES.jar` action from the rule.
5. Add whichever Pushback Action is appropriate for your workflow.
6. Click Finish.
7. Go to the Actions tab.
8. Edit the action called Create Clause Modifications if First Revision.
9. Go to the Details tab.
10. Select `PUSHBACK_CLAUSE_UPDATES.jar` and click Delete.
11. Add whichever Pushback Action is appropriate for your workflow to the space vacated by `PUSHBACK_CLAUSE_UPDATES.jar`.
12. Click Finish in the If-Then-Else Action window.
13. Click Finish in the Actions tab.

#### Creating Action Buttons

To add a Pushback Action to an action button, follow these steps:

1. Navigate to Setup [Attachments].
2. Go to the Fields tab.
3. Hover over New and select Action Button.
4. Give the field a label.
5. Input the text that will be displayed on the action button in the Button with text field.
6. Select Execute Actions.
7. Click Add Action.
8. Select your Pushback Action and click Finish.
9. Click Finish in the Create/edit Field window.
10. Click Finish in the Fields tab.

With the action button created, you can add the button to the record form, table view, or embedded tables as needed to suit your workflows.

#### Related articles

> Macro (contentbylabel)