Scenario
You want to add a pipeline into your app. This pipeline will have a defined progression from a common start point to a common endpoint. This way, each record starts at the beginning and goes through a series of actions to progress through the pipeline.
A common example is a sales or customer pipeline. The potential customer may begin as a “lead” and follow a specific path on the way to becoming a "customer."
Requirements
If this is your first time creating an app, you'll need to know some basics about adding objects, fields, pages, and views. You can start by watching our "Introducing Knack" video tour and then working through the articles in our Get Started section.
Steps
In this example, you will be creating a sales pipeline where a contact can go through three stages:
- Lead
- Proposal
- Customer/Won
Create a Contacts Object
In the Data section of the builder, create an object to store your Contacts.
For this tutorial, you'll need at least one field for the contact's name, but you can feel free to include any other fields you'd like:
Add a Status Field
In the Contacts object, add a multiple choice field called "Status." This field will track which stage a Contact is in.
Include the following options:
- Lead
- Proposal
- Customer/Won
Create a Leads Page and Table
In the Pages section of the builder, add a new page using the Contacts object. You'll choose a table view and call the page "Leads."
Once the page and table are created, click on the table view to open the editor. Then go to the Data Source section and add a filter rule to Data that says to display only the contacts whose status is "Lead":
Add a Link to Move the Contact to the Next Stage
First, click on the table to open the editor and, in the Columns section, go to the Links tab. Click on the "Link to edit record" option to add it as a new column to the table. This creates a new page with a form for editing the selected contact.
Now hover over the new column and click on the pencil edit icon. Update the Column Header to say "Next" and change the Link Text to say "Update to Proposal."
Create the Button that Moves the Contact to the Next Stage
1. Go to the new child page created from the table.
2. Click on the form to open the editor:
This form will become a button that automatically updates the Contact from a Lead to the next status: Proposal.
Remove All Fields & Add Instructions
1. Add instructions to the title of the form, so users know what clicking the submit button will do.
2. Remove all fields from the form by clicking the garbage can icon for the group. You don't need them since users won't be updating any of these fields:
Add a Record Rule
To automatically update the Status field from "Lead" to "Proposal," you'll use a record rule.
1. Go to the Form Rules section.
2. Click on the Record Rules tab.
3. Click the Add Rule button:
Set up the record rule as follows:
- Action Update this record (the default option)
- When Every form submission. (the default option)
- Values Set "Status" to a custom value "Proposal"
Change Submit Button Text
Finally, you can change the submit button text to provide more instruction by updating it to say "Update to Proposal."
Repeat the Steps for the Next Stage
Now that the Leads page is done, you can create a page for the next stage, Proposal, that moves contacts to the Customer/Won stage.
Follow all items in steps 3.3 through 3.5 using the Proposal status as your starting point, instead of Lead.
Create a Page for the Last Stage
Finally, you'll want to create a page that displays all the contacts with a status for the last stage, Customer/Won.
Since you won't be moving contacts past this stage, repeat only the items in step 3.3.
Your Results
Here's how your app will look now:
Extend This Workflow
- Send email notifications to user when a record moves to a new part of the pipeline