If you’re a long-term fan of FME or follow Safe Software on social media, there are probably three things you already know:

  1. We really like eating our own dog food.
  2. We like donating to charity/giving back to the local community.
  3. We’re moving to a brand new office in December 2018.

As anyone who’s moved house before knows, you end up accumulating a lot of stuff, and that’s no different for us at Safe Software! As we don’t want to take anything with us, we’re leaving behind a lot of items.

In order to reduce waste and to raise money for the Surrey Homelessness & Housing Society, it was decided to auction off anything we wouldn’t be taking to the new office.

The one thing we didn’t have was a system to manage the auction – until Dale approached me wondering if FME Server (in this case FME Cloud) would be able to automate the auction for us.

As with most questions beginning with “Can FME do …?”, my first answer was “Yes” followed with furious thinking about how to actually implement it.

Automating an Online Auction: Requirements

The only things I had to start with was:

The requirements (at least at the beginning of the project) were:

Because we needed instant feedback, none of the existing FME Server Publications met that criteria. My first thought was to have a workspace with a Google Sheets Reader that would ‘poll’ the bid responses, but that would be slow and take longer and longer as the number of bids increased.

Luckily, after a bit of internet detective work, I found Google Apps Scripts. This allowed me to set up Triggers on Google Sheets that could make a HTTP POST to FME Server. This meant every time someone filled in the form to place a bid, the trigger would send a JSON message to FME Server containing the info that was filled out in the form.

Over the 3 weeks that the auction consumed my life, we ended up with a plethora of issues and revisions:

Automating an Online Auction: What was achieved with FME

Slack notifications

After getting distracted watching the incoming notifications in real time on FME Server, I thought it might be fun for other people to see the current auction activity. By adding SlackConnector transformers to the workspaces I was able to stream messages for new high bids, unsuccessful bids and any new items that were added to the inventory.

Bid history notifications

Using the Google Forms/Sheets triggers, it was easy to set up a form that would allow Safers to request their winning bids, bid history or both. FME would then collect all of that information and email it back to the requestor.

$5 bid increments

Towards the end of the auction, it was requested to raise the bids to be in multiples of $5 to reduce the number of $1 bids that we had (the money is going to charity after all). Originally I started trying to divide bid values by 5, check if they were integers… Until I realised this would be much easier with a Tester and a regular expression to check if the bid value started or ended with a 5 or 0 (5$|0$)

Duplicate lot number validation

As there ended up being around 800 items in the auction, spread across 4 different tabs in Google Sheets, it was hard to keep track of lot numbers when adding new items. The Google Apps Scripts was adapted to post the lot number to FME whenever a new one was added. FME would then check to see if the lot number already existed. If so, an email notification would go out to correct it. If it was unique, it would get posted to Slack and added to the sqlite database.

12 noon cut-off

As the auction had to stop at exactly 12 noon on Friday 16th, I needed a way of stopping bids being processed as people would still be able to use the Google Form. There was also concern that if lots of people were bidding that the FME Server job queue would get backed up, stopping people’s bids being processed on time. Google Forms adds a Timestamp column to the data, so this was converted to Epoch time and tested against to check that it was less than 1542369601 (12:00:01 on Friday 16th November).

Final PDF reports

Once the auction was over, we needed to let people know which items they’d won, the total amount they owed and some instructions on how to claim the items. This was done as a PDF and emailed out to successful bidders so they would be able to print it out and bring it with the money.

Emails…lots of emails

There were email notifications for:

Automating an Online Auction: What I Learnt

Now I get my life back – and a new TV!

Watch the Coders on Couches Drinking Coffee episode below and stay tuned for an FME Knowledge Centre tutorial.

About FME Automation FME Server

Jennifer Luther Thomas

Jen is the FME Server Technology Expert Team Lead at Safe Software. She enjoys lifting heavy things and being active outdoors. She enjoys these things so much that she’s hoping to qualify for powerlifting nationals 2020!

Related Posts