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

# Adding a Campaign Code to an AutoBill

Both `AutoBill.update` and `AutoBill.addCampaign` may be used to apply a Campaign discount to an existing AutoBill. With these methods, Subscribe will automatically apply the Campaign discount to all eligible Products and Billing Plans that do not yet have a discount applied.

For more information on discount calculation, see Campaigns in the Subscribe User Guide.

If there are any eligible Products on an existing AutoBill, a Campaign discount may be applied toward it, regardless of the history of the AutoBill, or the length of its duration.

**Note:** For rolling promotion campaigns spanning multiple billing periods, the billing terms must be homogeneous. You cannot offer a rolling campaign if the Billing Plan has varied term lengths. Free cycles are ignored.

* **[Applying a Campaign Code to an existing AutoBill](../topics/Applying_Campaign_Code_Autobill)**

* **[Applying a Campaign Code to a Specific Product on an AutoBill](../topics/Applying_Campaign_Code_Product)**

**Parent topic:**[Working with Campaigns](../topics/ProgGuide_Campaigns)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.