Visual Rule Builder: business rules without the JavaScript

I9-02.png

Federal I-9 in Designer

In recent articles, we’ve discussed how frevvo and other low-code platforms are making it easier for citizen developers who aren’t coders-by-trade to create effective, high-quality apps.

Here at frevvo, we’re constantly working on improving our product to reduce the need to write code. Our customers are organizations (companies, Universities etc.) that use frevvo for real-world business forms like Purchase Orders and Employee On-Boarding. These forms usually have dynamic behavior – in frevvo, that means business rules. One of the most common business rules is where you want to show or hide certain parts of the form (a Section or Tab or any control) depending on data that’s been entered into the form elsewhere.

Show/Hide Alien Authorization Numbers in Federal I-9

Let’s take a look at an example – an employee on-boarding workflow where the user has to fill in a Federal I-9. The Federal form asks for Eligibility Status and for one of those statuses – an alien authorized to work until a certain date – the employee has to provide additional information. In earlier versions of frevvo, you’d have to write a business rule in JavaScript. Something like:

if (CitizenStatus === ‘WorkAlien’) {
AlienNumbers.visible = true;
} else {
AlienNumbers.visible = false;
}

Seems simple enough but these JavaScript rules and their interactions with each other can quickly get very complex and difficult to understand. Dynamic behavior then becomes much harder for citizen developers to implement effectively.

Enter the Visual Rule Builder

When you create the above rule, you can use visual wizards as shown below:

rb-01

What’s the condition that causes this rule to fire?

rb-02

What action(s) should be taken when the condition is true?

rb-02b

[Optionally] What action(s) should be taken when the condition is false?

You can specify multiple conditions and a logic expression to evaluate them e.g. “A and (B or C)”. You can also specify multiple actions e.g. Show Alien Numbers AND Hide Citizen Information when the condition is true and vice versa when false. The Visual Rule Builder will generate a rule as shown below:

rb-03

If you need to edit the generated code, you can click Rule Code and make changes manually to the generated JavaScript. And, of course, the existing JavaScript-based rules continue to

um-01

Show/Hide Section

be available – some things are impossible to do using wizards e.g. connecting to an HTTP URL and parsing the result in specific ways.

When you run the form, it works as expected. Choose the appropriate option (alien authorized to work …) and the required Section shows up. For any other option, the Section in question is not visible exactly as desired. As with all frevvo forms and workflows, it’ll just work automatically on mobile devices.

Simple and easy. Now, of course, this is the first iteration of the Visual Rule Builder (it’ll be released shortly with V7.2) and it can currently generate a subset of rules. For the others, you’ll have to use the existing Rule Editor. However, like everything in frevvo, we’ll keep improving it with every version so your citizen developers will be able to do more and more with it.

[eBook & Video] frevvo +SQL: dynamic forms & workflows

db-video

Dynamic database forms and workflows with frevvo + SQL (3m video)

Day-to-day business activities are simply more useful if they can access information from SQL databases on-demand. If Customer Service has visibility into order history from the database, they can better help the customer. HR applications can access employee data and so on.

Download frevvo + SQL eBook or Watch 3m video

frevvo provides a Database Connector that allows you to perform sophisticated integration with your database. From dynamic dependent pick lists to master-detail views to creating and updating records in SQL and running stored procedures, you do it all with frevvo.

Learn more by downloading our new eBook or by watching the video at the links above and visit our website to view customer success stories and signup for a free trial.

frevvo + Google Apps: Part 5. Saving documents to Google Drive

google_drive_logo_3963Does your organization uses Google Apps? You can combine frevvo + Google Apps to create some really cool and useful solutions. In previous articles in this series, we saw how you can save (write) submissions to a Google Sheet, use the Google Distance Matrix API to automatically calculate mileage and reimbursement amounts, create dynamic pick lists from a Google Sheet (read) and update a Google Sheet.

Today, we’ll look at how you can save documents to Google Drive and, essentially, use Google Drive as an affordable system for managing documents. Again, it’s a common scenario. When a Permission Form is signed, or a Leave Approval workflow completes, or a Purchase Order is received, you want to save the documents somewhere. Many companies still save them in email folders as attachments or manually drop them into a shared network drive. With frevvo, you can automatically upload them to Google Drive.

google-apps-permission

Upload to Google Drive

As before, you have to first get an access token. This is a one-time step. Login to your Google account and then visit: https://app.frevvo.com/google/consent. Follow the prompts and copy the access token and save it. Detailed documentation is here.

We’ve created a sample form and a shared Google Drive folder for demo purposes. Ironically, it’s a paper permission form that a parent must sign so students can use less paper and do things electronically 🙂

Click on the link above or on the image, fill in a student name, sign the form and enter an email address (don’t worry, it’s only used for this demo to email you the signed PDF. We won’t save it, it won’t appear on the PDF and it won’t be saved to Google Drive). When you submit, the form gets uploaded to Google Drive and saved in a folder with the student’s name so you can easily find it later. You’ll also get an email.

google-drive

Save to Google Drive wizard

How can you connect your own form or workflow to Google Drive. It’s easy:

  1. In Google Drive, create a parent folder that will hold all the submissions for this form.
  2. In the Form Designer, simply click on the Doc Actions (what happens to my data) wizard and select the “Save to Google Documents” option.
  3. In the wizard that appears, enter your credentials (see above for how to get an access token).
  4. Select the parent folder you created earlier in Step 1.
  5. For Submission folder, you may enter a fixed value (not recommended) or use a template. In this case, we have chosen the StudentsName control. For example, if you enter John Adams in the Student Name control, the submission documents will be stored in a subfolder called JohnAdams.

That’s it. Try it out for yourself using our sample form and see how the form PDF is saved to Google Drive. If your form had attachments (e.g. receipts for an Expense Report) they would also be saved into the subfolder.

Interested in learning more? Visit our website to view examples, watch videos, sign up for a free 30-day trial or contact us for more information.

Like what you see? Check out Part 6 where we put it all together to create a leave approval workflow that connects with a Google Sheet, routes between multiple users for signatures, updates the Google Sheet and saves PDF documents to Google Drive.

 

 

frevvo + Google Apps: Part 4. Updating a Google Sheet

Does your organization uses Google Apps? You can combine frevvo + Google Apps to create some really cool and useful solutions. In Part 1 of this series, we saw how you can save (write) submissions to a Google Sheet. In Part 2, we saw how you can use the Google Distance Matrix API to automatically calculate mileage and reimbursement amounts. Part 3 showed you how to create dynamic pick lists from a Google Sheet (read).

google-ss-loc-ext

Google Sheet: Employee Location and Extension

Today, we’ll take a look at how you can update existing values in a sheet. It’s another common scenario that can be used for a variety of tasks (e.g. limiting the number of submissions for a particular form or creating a sequentially increasing counter). We’ll use this sample Google Sheet to discuss. It has a row for each employee: Employee Id, Location and Extension.

First, it’s important to note that Google Sheets is not a transactional system like a database and results can be unpredictable if multiple users update the same Sheet at the same time.

As before, you have to first get an access token. This is a one-time step. Login to your Google account and then visit: https://app.frevvo.com/google/consent. Follow the prompts and copy the access token and save it. Detailed documentation is here.

We’ve created a simple example form. Select the employee, a location and a new extension number. Click the Update Google Sheet button, wait a few seconds and see that the sheet was successfully updated. We did this using this rule:

if (UpdateGoogleSheet.clicked) {
var eid = EId.value; // Unique key in the Google Sheet row
var headers = ‘{“user”:”<google id>”,”password”:”<access token>”}’;
var updatequery = ‘/google/spreadsheets/update/key/<spreadsheetkey>?wsname=Locations&query=employeeid=”‘ + eid + ‘”‘;
var updateparams = ‘&updates=location=’ + Location.value + ‘,extension=’ + Extension.value;

eval(‘x=’ + http.put(updatequery + updateparams, null, headers, false));
}

  1. It’s triggered by clicking on the Update Google Sheet button.
  2. We setup headers and an update query using your access token and spreadsheet key (the long ID in the URL of the Google Sheet).
  3. Add updateparams: we’re updating location and extension with new values.
  4. Run the update – perform an http.put() and eval the results.

Try it yourself using the sample form.

Interested in learning more? Visit our website to view examples, watch videos, sign up for a free 30-day trial or contact us for more information.

Like what you see? Check out Part 5 which shows you how you can save documents generated by your frevvo form to Google Drive.

 

frevvo + Google Apps: Part 3. Dynamic Pick lists.

Does your organization uses Google Apps? You can combine frevvo + Google Apps to create some really cool and useful solutions. In Part 1 of this series, we saw how you can save submissions to a Google Sheet and in Part 2, we saw how you can use the Google Distance Matrix API to automatically calculate mileage and reimbursement amounts.

employees-sheetToday, we’ll take a look at dynamic pick lists (drop downs). It’s a very common scenario and, with frevvo, you can use business rules to dynamically initialize the options (choices) in a pick list from a Google Sheet. We’ll use this sample Google Sheet to discuss. It has a row for each employee: First Name, Last Name, Employee Id.

First, you have to get an access token. This is a one-time step. Login to your Google account and then visit: https://app.frevvo.com/google/consent. Follow the prompts and copy the access token and save it. Detailed documentation is here.

We use a rule to read information from the Sheet and populate the employee pick list. Here’s the relevant business rule:

var x;

if (Connect.clicked) {
var headers = ‘{“user”:”sales@frevvo.com”,”password”:”<access token>”}’;
var readquery = ‘/google/spreadsheets/query/key/<spreadsheetkey>/w/Employees’;
eval(‘x=’ +http.get(readquery,headers));

var opts = [”];
for (var i = 0; i < x.results.length; i++) {
opts[i + 1] = x.results[i].employeeid + ‘=’ + x.results[i].firstname + ‘ ‘ + x.results[i].lastname;
}
EId.options = opts;
}

  1. It’s triggered by clicking on the Connect button.
  2. We setup headers and a query using your access token and spreadsheet key (the long ID in the URL of the Google Sheet).
  3. Run the query – perform an http.get() and eval the results.
  4. Parse the results into an array. The array elements are “hagen=Walter Hagen” etc.
  5. Set the options to the array.
googleapps-picklist

Dynamic pick list from a Google Sheet. Click the image to try it.

The pick list will display the actual names (Walter Hagen, Alexa Stirling etc.) whereas the values returned upon selection will be the ids (hagen, stirling etc.) so it’s easy to perform further lookups.

You can try it yourself by clicking this link or on the image.

Interested in learning more? Visit our website to view examples, watch videos, sign up for a free 30-day trial or contact us for more information.

Like what you see? Check out Part 4 which shows you how you can update a Google Sheet with values from a form.

[Infographic] Business Agility through automated approvals

Business Agility through Automated ApprovalsBusiness Agility!

It’s the leading driver for Cloud Computing according to any number of surveys and articles such as this one from Harvard Business Review Analytic Services.

It’s a fuzzy concept. An agile business is one that responds rapidly to changing market conditions. That means giving your employees the ability to do the right thing at the right time as they respond to changing customer expectations and being able to adapt and react quickly to take advantage of new business opportunities.

Automating Approvals is critical to Business Agility

Cloud and Mobile are key enablers and one of the most important things your company can do to attain this business agility is to automate your everyday, routine approval workflows to take advantage of cloud + mobile.

Check out this new infographic, where we show you 6 ways digitized approval workflows promote business agility. From reduced business complexity to anytime/anywhere access to enhanced collaboration to taking advantage of new opportunities in global markets to continuous process improvement, automated approval workflows are a must in today’s fast-paced business environment.

frevvo’s cloud-based, affordable solutions can help you digitize these routine approvals like sales orders, travel claims, purchase requisitions and vacation requests so employees have more time to focus on customers and are empowered to do that critical right thing at the right time.

Business agility made easy. Check out the new infographic at left on how frevvo’s cloud & mobile solutions can help you, register for a brief, informative webinar and sign up now for a free 30-day trial.

It’s Your Right To Reject, With Reason.

We have many features and benefits in our product. We always like to use customer examples to show you how it works. This time we are using ourselves as the example. We use this feature in our Client Services order workflow to continuously develop business agility.

Here’s how it works:

anonymousapprovalprocess

Sales Employee –> Customer (Approval/Reject) –> Sales Employee

In a Client Services workflow, designed with frevvo,  the first step is filled in by a company employee who then clicks send when the Service Order is completed. Conveniently, the customer receives a customized email with a link to the service order. This link will direct the customer to the step in the flow needed to be completed by them. This step is completed when the customer approves and signs it, but what if they don’t approve!? No worries, frevvo has your back. “Remember, we are all about the user friendly experience?”

The reject option.

The customer now has the option to click the Reject button (which can be customized to say anything you want) and provides a reason for the rejection. Rather than trying to solve the mystery of “Why was I rejected,” you will find out why in an email sent in response to the rejection of the step. Rejection never felt so good. Ultimately, this flow will be routed back to the frevvo employee for revision.

In summary;

Easy Reject is a feature that allows steps in a flow to be sent back to a previous step by clicking the Reject button. The Reject feature is easily configured through the Live Forms Quick Approve wizard. The designer simply selects “reject to” or “reject from” for each step in the workflow, including steps performed by anonymous users, and all the configured steps will display a Reject button. It’s that easy.

The ability for an anonymous user to reject a workflow task is an important feature of frevvo workflows. Contact us today and see if it will fit your business needs. You can view full step by step instructions to implement this feature in a Purchase Order Workflow here!