Skip to main content

Possible actions in THEN clause

This document serves as a comprehensive guide to understanding how rules interact with your quote and how to effectively use them to perform various actions. For a visual walkthrough, check out video below:

Below is a list of all actions your rules can perform

Add

You are able to add products in 2 ways:

Existing Product by SKU (from Catalog)

  • What it does: Finds a product in your catalog by its SKU and adds it to your quote with all original catalog attributes (price, name, description, images, etc.). You can still override these attributes using rules.
  • Objects Added: Line items/products to the quote.
  • Where to Add: A specific section (identified by name or alias).
  • Required Attribute: SKU (must exist in your product catalog).

Example Add product with SKU equal to "business" to the section with name "Products". NOTE! product with such SKU should exist in your product catalog


tip

If a product with the specified SKU already exists in this section, you can enable the "create duplicate product" checkbox when specifying the SKU. This ensures that a product with the same SKU will be added to the section each time the rule is executed.

New Product (Not from Catalog)

  • What it does: Creates a completely new product on the quote, not tied to any existing catalog item. It will not be added to your catalog.
  • Objects Added: Line items/products to the quote.
  • Where to Add: A specific section (identified by name or alias).
  • Required Attributes: Name and Price (SKU is automatically generated)

Example Add new product with name "My new product" to the section with name "Products"


Update

Using this command you are able to update various components of the Quote.

Line Items

  • Modify attributes like price, quantity, or custom fields for filtered line items.

    Example Set discount equal to 10% for all line items with price greater than 1000 from section Products

Sections

  • Modify section settings (e.g., recipient options).

  • Update section totals (e.g., adding custom totals).

    Example Set value = "applied" for the custom field in section total if Section discount greater then 0

Grand Totals

  • Modify grand total fields like discounts and fees.

    note

    Auto-calculated fields cannot be changed

    Example: Fill out custom field in Grand total as a SUM of the fields "Custom Text field" across all Sections. You may use references and supported MATH functions for your calculations.

Quote Settings

  • Change settings such as currency or recipient options.

    Example: You need to change currency of a quote based on the value in data field (need to use references)

Quote Variables or Data Fields

  • Update pre-existing data fields with new values.

    Example: Update quote variable with name "products" with the products names from the quote separated by comma (need to use references)

Delete

  • Remove sections or line items based on specific criteria.

    Example:

    • Delete a section by name or alias.
    • Delete line items where price > 100.

Key Considerations

  • Filters must be applied before performing actions.
  • Actions are executed only on the filtered elements (aliases) unless specified otherwise.
  • Auto-calculated fields (e.g., total taxes) cannot be manually updated.
  • References helped to refer data filtered in WHEN clause

Conclusion

By understanding how rules interact with your quote, you can create tailored workflows, streamline processes, and ensure precise modifications. Experiment with the commands to fully leverage the capabilities of PandaDoc rules. For further assistance, revisit the video guide.