Quick Base Discussions

Generate template records with Pipelines

By Brian Cafferelli posted 02-21-2020 12:49

  

Generate template records with Pipelines

One of the main ways Quick Base helps you perfect your unique business processes is by automating routine work. This saves time, improves your employees’ morale, and reduces risk for your business.

A common automation pattern we see from our customers, is generating a set of template child records when a new parent record is created. If you’ve been building apps in Quick Base for a while, you may know this as the “Copy Master and Details Records” technique. You can generate template records easily using Pipelines.

Pipelines is an exciting new technology which makes it easier than ever for you to automate your workflow, even across your ecosystem of software tools. Read on to learn how you can use Pipelines to generate a set of template child records.

 

Table of Contents

 

Example use case: managing marketing campaigns

Automatically generating a set of template child records isn’t limited to specific industries or use cases. However, for the sake of simplicity we’ll focus on a specific example to walk through the process.

Imagine that our company manages marketing campaigns in Quick Base. There are many types of campaigns, and each campaign uses a different marketing channel. For example, let’s say the company often uses email and social media for their campaigns. Each type of campaign has a standard list of activities. Rather than create the same types of activities over and over, we can use pipelines to automatically create the activities.

 

Creating a user token

To connect a pipeline with one of your Quick Base apps, you will need a user token. So, before you create your pipeline, it’s best to create the user token. Here’s how to create one:

  1. Click your name in the top-right corner of the page.
  2. Select My Preferences.
  3. Scroll down and click the link next to “Manage User Tokens”.

    pipelines_cmd_-_figure_1.png
  4. Click + New User Token.
  5. Enter a name for the user token. In this case, for clarity we’ll call the token “User Token for pipeline – marketing campaign activity automation”.
  6. Under “Assign Token to Apps”, select the app your pipeline will be working with. If your pipeline connects multiple Quick Base apps, you would select all those apps here.
  7. Click Save, close the User Tokens tab, and return to your app.

Creating a template table
pipelines_cmd_-_figure_2.png

Next, you need to decide how to manage your list of standard activities. The most scalable way of doing this is to have one table for your live activity data and a separate table for your template activities. Note that the Activity Templates table doesn’t need to be related to your other tables.

TIP: If you didn’t already have an Activity Templates table in your app, you would open the Activities table and click More > Copy table. You can copy the table without data and name the new table “Activity Templates”.

You may want to hide the templates table from your users, since they won’t need to interact with it directly. (To do this, you can go to the Activity Templates table > click the gear > click Advanced Settings > scroll to the bottom and uncheck “Show in the table bar”).

Finally, the Activity Templates table needs a field to mark which channel each activity is for. I added a Text – Multiple Choice field called Channel to keep track of that.

 

Creating a new pipeline

Since pipelines can work across Quick Base apps, you access pipelines from the app bar.
 pipelines_cmd_-_figure_3.png

 

Before we start building the pipeline, keep in mind that our example company uses email and social media for their marketing campaigns. So, we have a standard list of activities for each of those two types of campaigns.

Here’s how to get started building your pipeline:

  1. On the My Pipelines page, click Create a pipeline.
  2. At the top of the page, name the pipeline. For this example, we’ll call it “Marketing Campaign Manager: Create campaign activities”. All pipelines you create will be in a single list, across all applications you manage. So we recommend you include the name of the Quick Base app in the pipeline name to keep things organized.
  3. On the right, click the Quick Base channel.
  4. Click Connect.
  5. Enter your realm name. If you’re not sure what your realm name is, look at the address bar and enter whatever appears before “.pipelines.quickbase.com”, such as this:

    pipelines_cmd_-_figure_4.png
  6. Return to your other Quick Base tab and copy the user token we created earlier. (To get there, return to your app > click your name at the top of the page > click My Preferences > scroll down and click the link next to “Manage user tokens”).
  7. Click Connect to Quick Base.

Next we need to create the trigger step, to determine when the pipeline will run.

 

Setting up the trigger

The goal of this pipeline is to create the right set of activities when a new marketing campaign is added. Here’s how to set up the trigger:

  1. Click the Record Added step and drag it to the left, into the dotted box.
  2. Click Select a table and choose the Campaigns table.

    pipelines_cmd_-_figure_5.png
  3. Click Add Conditions and select the Channel field from the dropdown.
  4. On the next line, click in the dropdown and select Email to complete the filter.

    pipelines_cmd_-_figure_6.png

Now this pipeline will trigger only when a new record is added for an email campaign.

Next we need to generate the proper list of template activities, based on the channel of the campaign record that was added (email or social media). To do this, we need to search the Activity Templates table, loop through each matching result, and generate the new records.

 

Searching the template records

  1. Click and drag the Search Records step from the list on the right, into the dotted area below the trigger we just made.
  2. Click in the Account box and select the same user token we used in the trigger step. In this example, that would be “User Token for pipeline – marketing campaign activity automation”.
  3. Click in the Table box and select “Activity Templates”.

    pipelines_cmd_-_figure_7.png
  4. If you’ve been following this guide from the beginning, and are searching a templates table, you likely do not need to add a condition here. However, if you are searching a table of live data such as a tasks or activities table, we strongly recommend that you click Add Conditions so you’re only searching records that are needed for this pipeline.

 

Generating the activities for email campaigns

  1. Scroll down and click Insert a condition beneath the “Do” box.

    pipelines_cmd_-_figure_8.png
  2. Under the new If box that appears, click Add Conditions. If and then boxes appear.


pipelines_cmd_-_figure_9.png

  1. Click Add Conditions.
  2. Select the Channel
  3. In the line below, select Email.

    pipelines_cmd_-_figure_10.png
  4. For every activity template that matches the “Channel = Email” condition, we want to generate a new record based on that template. Therefore, we need to drag the Create Record step from the right under the Then box.
  5. In the Create Record step, click in the Account box and select the same user token we used in the trigger step. In this example, that would be “User Token for pipeline – marketing campaign activity automation”.
  6. Select the Activities
  7. Click the Activity Name option in the middle of the page, then drag it into the Activity Name box on the left.

    pipelines_cmd_-_figure_11.png
  8. Under the Assigned To group, click Email and drag it into the Assigned To box on the left. As you would do when importing a spreadsheet into a User-type field, in pipelines you also use email addresses to populate User fields.

    pipelines_cmd_-_figure_12.png

    Relating the generated activities to the campaigns

    We walked through populating two fields as an example above, but of course you could populate more fields in your pipelines. For now, let’s look at one more field to populate: the reference field. We want these newly generated activities to be related as child records of the campaign which triggered this pipeline. So, let’s populate the reference field in our new activities. Here’s how:

  1. In the middle of the page, click the A This will update the list of options, allowing you to pull data from the triggering record.

    pipelines_cmd_-_figure_13.png
  2. Click the Record ID option in the middle of the page, then drag it into the Related Campaign box on the left.

    pipelines_cmd_-_figure_14.png

TIP: To easily navigate around the pipeline builder, use the toggle in the top-right of a step to expand or collapse it.

 pipelines_cmd_-_figure_15.png

 

Generating the activities for social media campaigns

One advantage of pipelines compared to prior solutions such as automations, is that you can include several conditions in a single pipeline. If you were using automations, you would have to build one automation for email campaigns and a second automation for social media campaigns.

Here’s how you can generate the template activities for the social media campaigns:

  1. Scroll down, and under the Else branch, click Insert a condition.

    pipelines_cmd_-_figure_16.png
  2. Click Add Conditions.
  3. Select B Record from the menu, then click Channel.

    pipelines_cmd_-_figure_17.png
  4. In the line below, select Social Media.

    pipelines_cmd_-_figure_18.png

    TIP: There are a few different places you can insert conditions. For this type of pipeline, your condition steps should be one beneath the other, as you see below. The conditions should not be indented as part of a then or else branch.


pipelines_cmd_-_figure_19.png

  1. Drag the Create Record step from the list on the right, into the dotted box below the Then heading.
  2. Finally, you can populate the fields as you did above for the email activities (link the word above to the section for generating the email activities).

Testing the pipeline

After you’ve created or updated a pipeline, you should test it out. You can test a pipeline by clicking the Pipeline off toggle, to turn the pipeline on. After you do, switch to your app and make a change that will trigger your pipeline and make sure the pipeline worked as you expected.

Learn more

Find more Pipelines How-Tos Below:
How to use Pipelines to email a report at a specific time of day
Importing Pipeline YAML
How to Use the Bucket Channel to Schedule an Archive to Box
Build better trend reports with Pipelines
Pipelines and Object Linking

Permalink