Skip to main content
All CollectionsCPQPandaDoc CPQ
Building Your First Workflow
Building Your First Workflow

Build your first automated workflow with PandaDoc CPQ for HubSpot to streamline proposals, pricing, and discounts based on customer input.

Updated this week

Availability: Enterprise*

*This feature is available as a part of the paid PandaDoc CPQ add-on. If this is something you're interested in, reach out to your Customer Success Manager or sign up for a demo.

PandaDoc CPQ offers a powerful way to streamline how your team creates proposals, manages pricing, and applies discounts—all tailored to your specific business needs. In this guide, we’ll walk you through building an automated workflow for a coffee business using sample products in your catalog. This workflow will pull customer information directly from your HubSpot CRM, create personalized quotes, apply discounts based on customer selections, and seamlessly attach the final proposal to the deal.

By the end of this guide, you’ll have a fully automated workflow that not only reduces manual tasks but also ensures pricing accuracy, applies discounts for bulk orders, and helps your sales team focus on building customer relationships rather than managing documents. We’ll cover each step, from setting up a template and integrating with HubSpot to creating dynamic quotes and applying business rules for discounts.

What you’ll achieve:

  • Automate proposal creation by pulling customer data from HubSpot

  • Dynamically add products to quotes based on customer choices

  • Apply business rules for discounts when customers order in bulk

  • Generate accurate quotes and attach them to deals in HubSpot

Set up a template

Begin by setting up a simple template. This will be transformed into a proposal as part of the workflow. Include:

  1. A template role (Client), role variables like [Client.FirstName], [Client.LastName], and custom variables [Selected.Product], and [Delivery.Date].

  2. Add a quote builder placeholder to this template, (don’t edit this yet, setup will happen inside the workflow).

  3. A client signature field if you want the client to edit the quote when they receive your proposal.

Create a workflow

Go to the Workflows tab in the main navigation to create your first workflow. Select +Workflow, and name your new workflow at the top left corner:

Next, add the steps.

Integration step

Since this workflow pulls data from HubSpot, the first step is connecting the integration. You’ll need to select your HubSpot hub in the pop-up window.

To make sure it’s connected, go to the Data tab and review the data model for HubSpot.

Form step

  1. Add a form step and select Create new on the right.

  2. The first question is going to be the coffee maker model selection:
    a. In the future, you can change the type of question to fit your needs. In our case, you need the result to be a single selected item, so you can use the default multiple-choice field or make this question a dropdown.

    b. Change the question wording on the right panel under Title.

    c. Add two options: 'Siphon Vacuum Coffee Maker' and 'Jittermaster Coffee Brewer' with their associated SKUs in the ID field. This ensures the SKUs are passed directly when creating quotes.


    Select the vertical ellipses next to the item’s name and select Make default selection to pre-select an item in the form (optional.)


    d. To recognize your field later and re-route its information to the fields in other steps, give your field a meaningful name. Let's call it selected-model.

    e. Leave the field Settings ‘Required’.

  3. In the second question, ask for the number of coffee bags:
    a. Add a number field.
    b. Change the question title.
    c. Call the question field beans-quantity.
    d. Uncheck the field Settings to make it optional.

  4. Create a question to capture the delivery date:
    a. Add a date type question.
    b. Edit the question title.
    c. Adjust the question settings so that the date selector only shows the future dates.
    d. Make the field required.
    e. Rename the question field delivery-date.

  5. Save the form. You can switch to the Data tab to check that the questions you set up are represented as fields there.

Quote step

Next, add the quote step and select Create new. You’ll create a quote from scratch as you didn't set it up in your template.


Here’s the logic behind the quote:

  1. Automatically add the selected coffee maker from the form to the quote.

  2. Apply a 20% discount if two or more coffee bags are ordered.

To set up your quote, define the quote’s structure:

  1. Set its currency and formatting preferences by selecting the gear icon at the top right.

  2. Add the necessary columns, such as a discount column.

  3. Rename the section "Products" to reference it in the rules later.

Your quote will use inputs from the form you created. Select the Data icon next to the gear icon to create two data fields to map data between the steps.

  • selected-model: A text field, initially empty.

  • beans-quantity: A number field, also empty.

Quote rules

Add a product based on form input

To add the coffee maker model based on user selection, create a new rule:

  1. Checking if the quote data field called selected-model is not empty:

    quote variable not empty.gif
  2. You also MUST check that the quote doesn't already contain the selected coffee brewer so that you don't end up with several.

    check if line item has this SKU.gif
  3. In the THEN part add the selected coffee brewer to the Products sections

    add selected brewer to section.gif
  4. Give your rule a meaningful name and save it. Here's the resulting rule:

Reference quote data field value in the THEN part of the rule

Next, you are going to be adding coffee beans from your catalog to the quote and simultaneously setting their quantity from the quantity selected in a form. So let's create another rule:

  1. Reference a quote data field: when quote data field beans-quantity is not equal zero, add a product with an SKU dark_coffee to the section called Products.

  2. Check that the quote doesn't have the product with an SKU dark_coffee already.

  3. Set the product quantity:
    a. Add a Quantity field to the right side of the rule.
    b. In this field, start by typing = to enable formula mode.
    c. Open a square bracket and select Data field > select beans-quantity > and select Done.

  4. Rename the rule and save it.

Set column value for the selected items

Let's create another rule to apply a discount when the selected nymber of coffee bags is 2 or more.

In the rule, filter by SKU and apply the discount to the appropriate line items.

  1. In the left part, check that the quantity of the item with the SKU dark_coffee is 2 or more.

  2. When you filter out the items with one SKU only, you see that it creates an alias - a name that allows you to refer to the same filtered items in the right part.

  3. In the right side of your rule, refer to the alias Line items 1 and update a discount for all members of the alias, setting it to 20%.

  4. Give your rule a name, and then save the rule.

Select Save.

Mapping values from a form to a quote

You need to explicitly provide the source of the quote data fields. In this case, it's user input from a form, so let's map form fields into quote fields.

  1. Go to the Data tab of your quote.

  2. Select Map data on the right

  3. Select step where from you'd like to populate quote fields

  4. Check that fields from your CRM or form are matched correctly and select Map

Alternatively, you can manually map the fields if the names of the fields you’d like to map do not match:

  1. In the empty field next to the selected-model, you need to select the corresponding field from Step 2. You can start typing "selected" to narrow down the list of items.

  2. Click on the corresponding field once you've found it.

  3. Map data to the beans-quantity data field in the same way.

Notice that the quote data tab contains an object called Quote. In your workflow instance, this is going to be the resulting quote that we need to insert into a document, so let's do this.

Document step

  1. Add a Document step and select the template you created earlier, "Coffee Order."

  2. Go to the data tab. Since the document template contains roles, fields, and values, you need to pre-fill them with information from your previous steps:
    a. To fill in the data of the Client role with the contact of the associated HubSpot deal, select deal contacts from the integration, which is step 1.
    b. Map the resulting quote from the quote step into a document quote placeholder.
    c. Map the delivery date from the form into a document variable called delivery-date.
    d. Map the selected product from either form or a quote into a document value called selected-product.

With this, you have finished setting up your workflow, and it's time to test it.

Test your workflow

Run a workflow from PandaDoc and select Next to proceed to the next step:

  1. On the first step, because you are running from PandaDoc, you have to set select a deal from your hub to test it on the deal data.

  2. In the form, select a coffee maker model, enter the number of bags, and select a delivery date.

  3. View the resulting quote. As you see, the discount has only applied to the coffee beans, but not the whole order. This means you need to go back to editing mode and tweak your quote rule.

Adjusting the rules

  1. Go inside the quote step and into the rules tab.

  2. Open the rule that sets the discount.

  3. Examine the condition part of the rule. Turns out, the alias that the discount is applied to contains only the beans.

  4. In the left part of the rule, add a blanket condition that grabs all line items of the quote: all elements that have a price not equal to zero. This creates the second alias Line items 2.

  5. Change the right part of the rule so that the discount affects Line items 2 instead of Line items 1.

  6. Save your rule and save the quote step.

Test running from PandaDoc

Let's do another test run in the same way:

  1. Go through the integration and form steps.

  2. Check that the resulting quote is correct.

  3. As the HubSpot deal contains several contacts, you are prompted to select one of them before creating the resulting document.

  4. Preview the document. In this step, you can edit it with our lightweight editor.

  5. On clicking Next, the workflow is completed and you can open the resulting document in a separate tab.

Once you're happy with the result, publish your workflow.

Publish your workflow

Before you publish a workflow, give it a name that helps your sales rep identify it.

Select Publish to make your workflow visible in HubSpot.

When you publish a workflow, it is protected from editing because you are making it available for others to run. That means that your sales reps in HubSpot can see the playbook and run it, creating their own workflow instance. They are also able to see all their workflow runs and the resulting documents.

To test a workflow from a sales rep perspective:

  1. Go to a HubSpot deal.

  2. On the PandaDoc Workflows tab, select your workspace.

  3. Start a workflow, selecting the name of the playbook you've published - in this case, it's Coffee Proposal.

  4. Give your workflow instance a name that will help you identify it later.

  5. When running in HubSpot, you will find that your deal is already pre-selected, so click next if you want to extract info from the very same deal.

  6. Select the desired model, quantity, and date in the form.

  7. Review the resulting quote, adjusting it if needed.

  8. If you have several contacts connected to the deal, you are prompted to select one of them to fill in the client details.

  9. Review the resulting proposal and edit it in the lightweight editor if needed.

  10. After finishing the run, you can either go to the document in PandaDoc or close the window.

After you close the workflow window, you can see the list of all workflows started from a deal, with their statistics.

You can also see the list of the related documents. On the document statistics panel, you can see how many times the document was viewed and by whom, as well as its audit trail, including information about approvals, sending, signing, payment, and more.

Now, your turn!

Did this answer your question?