Deprecated: class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead. in /nas/content/live/moraware/wp-includes/functions.php on line 5401

Using the API to validate your own rules

by | Dec 16, 2014 | JobTracker Tips

Do you ever wish you could reach into the internals of JobTracker and ask questions of your data? If you happen to have programming skills – or if you’re willing to pay someone who does – you can do just that.

For example, recently I spoke with a customer who wanted to improve the quality of the numbers they report on. They noticed they had a persistent problem with employees creating Job Phases but then not assigning all the appropriate activities and forms to those phases. They asked me if it was possible simply to find all the jobs where this might be a problem.

There’s not a way to answer that question using views, reports, or the calendar, but this sort of question is actually pretty easy to solve with our APIprovided you have access to programming skills. An API (short for Application Programming Interface) is what lets programmers manipulate another piece of software. It’s kind of like a remote control, but you have to know how to use it.

The hardest part of writing a tool like this is understanding the problem. In this case, it boils down to the following:

  • Loop through all accounts in the system
  • For each account, loop through all its jobs
  • IF the job has phases, then loop through all of its forms and activities
  • IF any of those forms or activities don’t have a phase assigned, then spit out a warning message

The other hardest part of solving a problem like this is making a friendly user interface for it. I punted on that. I wrote a sample for this customer showing how to get the data out of Moraware, but I didn’t write a fancy user interface for it. Instead I wrote this as a command line program, which is intended for a fairly technical user.

Below is a picture of the sample code I wrote for this problem (email me if you want the actual code). If you don’t know how to program, it will look like jibberish, but it’s worth knowing that this type of thing is possible, and that it’s not an enormous amount of work (until you try to make it user friendly, self-recovering, etc.).

If you want some custom programming done but don’t know how to code, you can reach out to a local software development shop or better yet, one of our partners. We don’t do custom programming, but our partners do.

codepic

Related posts

Handling Before and After Photos

More and more fabricators are taking before and after photos of their jobs. There are many reasons for this, but the reason we hear most often is to reduce the risk of a homeowner making a claim for something that happened before or after installation. You can upload...

Reduce “go backs” & set customer expectations

Stone Industry Education, Tulsa, OK Fabricators from across Oklahoma, Kansas, Missouri and Arkansas gathered in Tulsa last week for another Stone Industry Education event organized by the MIA+BSI. The morning featured a presentation by GK Naquin from Stone Interiors...

JobTracker Training Echoes: Here to Learn

"I know one thing, that I know nothing." – Socrates. For many of us, that phrase pretty much explains how we feel about our grasp of modern technology: We know there are systems out there to help us do our jobs better, we just don’t know what they are. For instance,...

Share This