> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contract renewal

In Zenskar, **contract renewal** can be automated to streamline agreement management and reduce manual overhead. When a contract reaches its end date, the system evaluates it against defined policies to determine if it should be extended and under what commercial terms.

***

## Renewal policies

Zenskar offers three distinct policies to govern how an expired contract is handled:

| Policy                                     | Effect                                                                                                                    | Use case                                                                  |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| **Don't renew automatically**              | The contract reaches its end date and terminates without further action.                                                  | One-time projects or fixed-term agreements.                               |
| **Renew with same contract terms**         | The contract is renewed while preserving all customizations (discounts, custom pricing) applied to the original template. | Long-term partnerships with negotiated, non-standard rates.               |
| **Renew without customer-specific prices** | The contract is reset to the default values of its parent template before renewal.                                        | Standardized price increases or moving a customer back to "market" rates. |

***

## The decision hierarchy

Zenskar processes expired contracts every 25 hours by applying a specific hierarchy of renewal logic:

1. **Contract-level policy:** The system first checks if a specific policy was assigned during the creation of the contract.
2. **Organization-level policy:** If no contract-level policy exists, the system applies the global organization-level policy.
3. **Termination:** If neither a contract-specific nor an organization-level policy is found, the contract is **not** renewed.

```mermaid theme={null}
graph LR
    %% Node Definitions
    Start[Contract expired]
    PolicyExist{Does contract-level<br/>renewal policy exist?}
    OrgPolicyExist{Does organization-level<br/>renewal policy exist?}
    ApplyPolicy{Apply renewal policy}
    
    RenewPreserved[Contract gets renewed while<br/>template customization is preserved]
    RenewDefault[Contract gets reset to default<br/>template values, and is renewed]
    NotRenewed[Contract is not renewed]

    %% Flow Connections
    Start --> PolicyExist
    PolicyExist -- YES --> ApplyPolicy
    PolicyExist -- NO --> OrgPolicyExist
    
    OrgPolicyExist -- YES --> ApplyPolicy
    OrgPolicyExist -- NO --> NotRenewed
    
    ApplyPolicy -- "Renew with same<br/>contract terms" --> RenewPreserved
    ApplyPolicy -- "Renew without customer-specific prices" --> RenewDefault
    ApplyPolicy -- "Don't renew automatically" --> NotRenewed

    %% Styling
    classDef redNode fill:#FF6B6B,stroke:#333,stroke-width:1px,color:#fff;
    classDef greenNode fill:#51CF66,stroke:#333,stroke-width:1px,color:#fff;
    classDef diamond fill:#FFF9DB,stroke:#333,stroke-width:1px;

    class Start,NotRenewed redNode;
    class RenewPreserved,RenewDefault greenNode;
    class PolicyExist,OrgPolicyExist,ApplyPolicy diamond;

```

***

## How-to: Configure organization-level renewal

To set a global fallback policy for all contracts in your organization:

1. Click on the bottom-left menu containing your profile name.
2. Navigate to **Settings** > **Contract & Invoices**.
3. Enable the renewal setting toggle.
4. Select your preferred **Contract Renewal Policy** from the dropdown menu.

***

## Reference

| Detail                   | Specification                                            |
| ------------------------ | -------------------------------------------------------- |
| **Processing frequency** | Every 25 hours.                                          |
| **Scope**                | All contracts expired within the last 24–25 hour window. |
| **Default behavior**     | No renewal (if no policy is defined).                    |

**Next steps:**

* To learn how to apply these policies to a specific agreement, see the **\[How-to: Create a contract]** guide.
* Would you like me to draft a guide on **\[Handle ingestion failures]** to ensure your renewed contracts have accurate usage data?
