Work Order Import

Turn a due date written as words into a real date with field mapping

3 min read Work Order Import

Field mapping turns the words a work order uses for a due date into a date. A work order that says "Urgent" or "Next business day" where Simpro needs a date gets one, counted from the date issued. The only field that can be mapped is Due date, and only a PDF parser applies the mapping.

Before you start

The PDF parser needs a rule for Due Date, saved on the parser page. Until it has one, this page says "No mappable fields have been selected in the parser." See PDF parser rules.

A parser that has no Due Date field will always see that message. That covers every Fergus parser, since Fergus has no due date to put it in, and every email parser, since an email parser's text rules aren't mapped. See Destination fields.

Step by step

  1. Open your parser from Parse, then Field mapping in the left menu.
  2. Under Due date, click Add condition.
  3. Type the text in String to match, such as Urgent.
  4. In Days to Due Date (0 = same day), type a whole number of days.
  5. Add a condition for each wording the sender uses.
  6. Click Save. The page says "Parser field mapping saved."

Remove on a condition asks "Are you sure you want to remove this condition?". The removal is on screen until you click Save.

How a condition works

When the PDF parser has read a due date, each condition is checked in the order listed. If the due date it read contains the String to match, ignoring capitals, the due date is replaced with a date. The date is the date issued plus the number of days, written as YYYY-MM-DD.

  • The date issued is the Date Issued the PDF parser read, as YYYY-MM-DD or D/MM/YYYY. When the parser has no Date Issued rule, the count starts from the day the import runs.
  • 0 is the same day as the date issued.
  • A condition with an empty String to match is skipped.
  • "Contains" means the text can be part of a longer value. A condition for "urgent" matches "Urgent - attend today".

The conditions run one after another. Once one has matched, the due date is a date, and the conditions after it are checked against that.

When it goes wrong

The due date wasn't changed

The mapping only runs when a due date was read from the PDF. If the Due Date position found no text, there is nothing to match. Run a PDF through Test on the parser page to see what it read.

The due date comes out as the wrong day

The count starts at the date issued the parser read, and that comes from the PDF. A PDF with no Date Issued rule counts from the day the import runs.

I left Days to Due Date blank

Fergus

A Fergus job has no due date, so there is nothing to map.