---
title: CONDITIONAL SECTIONS
description: "Sections in MS Word documents help to switch between Landscape and Portrait, change headers, footers, ... . With PDF Butler you can decide to show or hide these complete sections. [Summer 19 - Conditional Sections](https://www.youtube.com/embed/ohlWgvXU6mc?si=I-tpVBxK44GFdB_9) ###### Example: [Here](https://pdfbutler.com/wp-content/uploads/2023/08/CONDITIONAL-SECTIONS.docx) is the…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-configtype/conditional-sections/"
updated: "2025-08-13"
category: PDF BUTLER BY CONFIGTYPE
---

# CONDITIONAL SECTIONS

Sections in MS Word documents help to switch between Landscape and Portrait, change headers, footers, ... . With PDF Butler you can decide to show or hide these complete sections.

[Summer 19 - Conditional Sections](https://www.youtube.com/embed/ohlWgvXU6mc?si=I-tpVBxK44GFdB_9)

###### Example:

[Here](https://pdfbutler.com/wp-content/uploads/2023/08/CONDITIONAL-SECTIONS.docx) is the template which we will upload in the doc config. In this example, section 1 in the template is always shown, and section 2 is shown only when customer is a new customer.

![Conditional sections pic3](https://pdfbutler.com/wp-content/uploads/2023/08/Conditional-sections-pic3.png)

1. Create a SOQL Data Source to fetch all the the required fields needed for the document.
    ![Conditional sections pic2](https://pdfbutler.com/wp-content/uploads/2023/08/Conditional-sections-pic2.png)
2. Create Doc Config and upload the template. Add the Data Source. Create Config type as shown below. For section 2, create CONDITIONAL_SECTION config type and add criteria as Type="New Customer". Merge field action is "Containing Paragraph".
    ![Conditional sections pic1](https://pdfbutler.com/wp-content/uploads/2023/08/Conditional-sections-pic1.png)![Conditional sections pic4](https://pdfbutler.com/wp-content/uploads/2023/08/Conditional-sections-pic4.png)
3. Open any opportunity and edit the page to add convert component. Make sure to add doc config id in the convert component. Generate the document with Type field as "New Customer" in opportunity record. Then Section 2 is visible. If not, it is hidden. That is how you can add conditional sections in the document. For detailed understanding, go through the above video.
