fmAccounting Link (Xero Edition) and Public Application Integrations

When we released fmAccounting Link (Xero Edition) back in 2014 we developed it to be used with a Xero API Private Application – this made the most sense at the time and still does for most customers who are only concerned with connecting their custom FileMaker business app with their own Xero organisation. Private Applications are just one of the three different types of API Applications available for the Xero API:

  • Private – connected to a single Xero organisation, doesn’t require user authentication
  • Public -connect to multiple Xero organisations, requires user authentication, 30 minute access limit
  • Partner– connect to multiple Xero organisations, requires user authentication, long term access

One of the main advantages of a Private Application is that your FileMaker users do not need to have a Xero account, so you can allow them to perform specific functions (e.g. uploading Contacts, Invoices, Payments etc from FileMaker to Xero) without having to get them access to Xero itself – the Private Application handles the authentication with Xero for them. This means you don’t have to worry about giving access to confidential business information contained in Xero to all FileMaker users.

There may be times however when you wish to only allow Xero users to upload data from FileMaker to Xero – this would require the use of a Public or Partner application. Databuzz recently took part in Xero’s XD HAX Developer Challenge 2017 and we decided to use this opportunity to explore how a Public Application integration could work. We were focussed on integrating with FileMaker Cloud which runs on AWS and wanted to have a native solution that ran on all the FileMaker clients that FileMaker Cloud supports, including FileMaker Pro for Mac/Windows, FileMaker Go for the iPhone and iPad, and FileMaker WebDirect.

As FileMaker doesn’t have the native functions to perform the OAuth 1.0a authentication that a Private Application type uses we have used a FileMaker plug-in to handle the authentication with the Xero API. FileMaker plug-ins are only supported by the Mac/Windows FileMaker Pro client applications which means they cannot be used by FileMaker Go for iOS (though you can use the iOS SDK to create an iOS application based on FileMaker Go that can include the plug-in).

Using a Public Application type integration means we could remove the dependency on the plug-in as Public applications use the standard 3 legged OAuth process where a user can authorise your application – in Xero’s case this is for 30 minutes, at which point the access token expires.

For our XD HAX Developer Challenge entry we changed the authentication method to use a Public Application integration and took advantage of a number of native FileMaker features, such as using a Card Window to handle the Xero authentication window, and the new cURL and JSON functions to handle the encoding/decoding of data and uploading/download with the Xero API. Here’s a brief video demonstrating how a Public Application integration could work with our fmAccounting Link (Xero Edition) solution:

We would love to hear if this is something that you would be interested in seeing in a future version of fmAccounting Link. We love that we can provide a native solution that runs on all FileMaker clients without a plug-in but are not sure whether customers would prefer the long term access that a private application provides and the benefit of not having to use a Xero login to authenticate.

Xero User Magazine Custom Integration Article

Issue 12 of the Xero User Magazine was released today in time for Xerocon London where Xero announced they have now surpassed a quarter of a million subscribers in the UK, contributing to the more one million subscribers in over 180 countries.

We’re pleased to report that this latest issue of XU Magazine includes an article by Andrew Duncan of Databuzz on ‘The Benefits of a Custom Xero Integration’. You can find the article on page 110 of Issue 12 – you can subscribe for free to the print and digital editions here. The article discusses the benefits of a custom Xero integration, particularly when there is no add-on in the Xero App Marketplace that meets you needs. We also mention examples of integrations we’ve done for customers over the past four years that have helped them eliminate double data entry, for both FileMaker solutions and other applications.

Earlier this year we were approached by an Australian Government agency that was using three different software applications to handle online sales, point of sale merchandise and ticket sales and needed to get the consolidated data into their internal financial accounting software. Xero was used to reconcile all financial data which was uploaded by Vend each night and we developed a custom web application which ran every 24 hours to download the Invoices from Xero and generate a custom XML file which was sent to the internal financial application. This has been running smoothly for many months now and the customer is very happy about the time saved from not having to do any manual re-entry of financial data.

If you would like to discuss a custom integration with Xero please get in touch.

 

fmSMS Updated for Telstra Messaging API v2

Back in 2015 Telstra, Australia’s biggest mobile phone operator, launched a beta of their SMS Messaging API and fmSMS was one of the first commercial solutions to support the Telstra API. Telstra have recently released v2 of their Messaging API which includes a number of new features including:

  • dedicated number: you can provision an Australian mobile number for your account via the API
  • send SMS and MMS messages
  • receive messages to your dedicated number
  • delivery status: query the delivery status of your messages
  • callbacks: automatic notifications of message delivery status to a callback URL
  • alphanumeric sender ID support
  • concatenation: send messages up to 1900 characters long and Telstra will automatically segment and reassemble them
  • scheduled delivery: delay the delivery of submitted messages

Now that the Messaging API is out of beta there are a number of plans to choose from. You can start with a free trial which includes 1000 free messages and a dedicated mobile number. They also have a PAYG plan with no fixed term contract and messages are 6c per message, as well as an Enterprise plan.

You can download a trial version of fmSMS from the fmSMS website to test the Telstra SMS API using their Free Trial. When you purchase fmSMS you get the PHP files to use for automatic delivery status updates and automatic replies into fmSMS. Please contact us if you have any questions about fmSMS and the Telstra Messaging API.

fmEcommerce Link (Shopify Edition) Update September 2017

Shopify, the leading multi-channel commerce platform, recently announced that it now powers more than 500,000 businesses in 175 countries around the world. The number of merchants of the Shopify platform is growing annually at an average rate of 74% and in the last 12 months 131 million people have bought from Shopify stores.

If you’re using Shopify for your online presence and FileMaker in your business check out fmEcommerce Link (Shopify Edition):

http://www.databuzz.com.au/fmecommerce-link-shopify-edition/

It has many examples for integrating FileMaker with Shopify, including the ability to upload Products from FileMaker and download Orders from Shopify at the click of a button – no more double data entry!

We’ve just released an update with a few minor changes, including an update to the downloading of filtered Orders by date range to now use your Shop’s timezone setting. We’ve also added a new example that allows you to delete a Product in Shopify from FileMaker. Contact us to if you have any questions or to request a free 14 day trial.

fmSMS and FileMaker Cloud

FileMaker Cloud, FileMaker Inc’s cloud-based platform for managing and running custom apps, was officially launched one year ago this month. FileMaker Cloud gives you the simplicity and performance of the FileMaker Platform without spending time and resources deploying and maintaining a server

FileMaker Cloud runs on the Amazon Web Services Cloud (AWS) and was originally only available for customers in the United States and Canada (AWS Regions of Oregon and N. Virginia). This was extended to Europe, the Middle East and Africa in March 2017 (AWS regions of Ireland and Frankfurt) and Japan, Canada and Australia in July 2017 (AWS regions of Sydney, Canada and Tokyo).

There are a number of important differences between FileMaker Cloud and the traditional version of FileMaker Server for Mac/Windows – it’s worth remembering that FileMaker Cloud is not FileMaker Server as not all FileMaker Server features are available in FileMaker Cloud. FileMaker have a comparison between FileMaker Server and FileMaker Cloud that outlines the differences in various categories – some of the features of FileMaker Server not currently available in FileMaker Cloud that have implications for fmSMS include:

  • Custom Web Publishing with PHP and XML
  • Scheduled Scripts in the FileMaker Server Admin Console

There are no issues using a FileMaker Cloud hosted version of fmSMS and the FileMaker Pro client application to send messages as all communication with the SMS Gateway when sending messages is handled by FileMaker Pro. We’re currently working on support for using Perform Script on Server – this requires a new Linux version of the plug-in to run under FileMaker Cloud which runs on CentOS Linux.

We’re currently testing this and hope to have an update shortly. Please note that server side schedule scripts are not currently supported on FileMaker Cloud – you will have to use Perform Script on Server for any server side script operations. Perform Script on Server is used by FileMaker Go and FileMaker WebDirect clients when accessing a hosted version of FileMaker Server to send messages. Now that FileMaker Pro v16 includes native support for JSON and cURL we will be able to use native functions to communicate with the SMS Gateways without requiring a FileMaker plug-in, so FileMaker Go and FileMaker WebDirect clients will be able to send messages directly without having to perform server side scripts that required a plug-in to be installed on FileMaker Server.

For receiving incoming messages/replies most of the SMS Gateways push incoming messages to a PHP file running on your FileMaker Server/Web Server. This uses the Custom Web Publishing with PHP feature of FileMaker Server – FileMaker Cloud does not support Custom Web Publishing so you will not be able to use the FileMaker Cloud to receive incoming messages using the supplied PHP pages. Some SMS Gateways do allow you to ‘poll’ periodically for new messages and download these from the SMS Gateway – see our Getting Started guide for further details.

We’re also investigating using the new FileMaker Data API to receive incoming messages – this is currently offered as a trial version with FileMaker Server v16 and is not currently available with FileMaker Cloud, so we will most likely wait until FileMaker Inc. release the shipping version and have finalised the licensing model and included this with FileMaker Cloud.

fmEcommerce Link (WooCommerce Edition) Update August 2017

We’ve just updated fmEcommerce Link (WooCommerce Edition) – our solution for integrating FileMaker with WooCommerce – with a number of new features and bug fixes. We love getting requests from our existing customer base in many different countries and have included a few feature requests in the latest update, including:

  • Products: we added support for Grouped Products so you can now create and update these from FileMaker
  • Products: we added the ability to Delete a Product in WooCommerce from FileMaker
  • Products:  you can now view Product Images using a Webviewer (you no longer need to download Images into Container field to View them)

We’ve had a number of requests for the ability to create an Order in FileMaker and upload that to WooCommerce so it is available for customers to view when they login. We had been planning to add this in already so this will now be included in the next release – there’s quite a bit of work involved in ensuring the Order data is valid and gathering the correct line items, shipping lines, taxes etc, but we’re hoping to have this released in the next 4-6 weeks.

We’re also working on an update for FileMaker Pro v16 users to take advantage of the new JSON functions and cURL options in the FileMaker v16 platform – this will allow you to no longer need a plugin to communicate with the WooCommerce API, making it easier if you’re using FileMaker Go and FileMaker WebDirect and not having to use server side scripts.

This is a free update to all our existing customers – you can get the full details of the changes in the release notes for fmEcommerce Link (WooCommerce Edition). If you have any additional feature requests please get in touch.

fmAccounting Link (Xero Edition) Update August 2017

We’ve been busy over the last couple of months working on some updates to fmAccounting Link (Xero Edition) that fill in some missing gaps with the examples that we include in the fmAccounting Link (Xero Edition) file. For example we’ve always had examples for downloading:

  • Chart of Accounts
  • Tax Rates

from Xero into FileMaker, but some customers have asked for the ability to create and update these from FileMaker to Xero. We’re pleased to report that our latest update – v1.932 – now includes examples for creating Account Codes and Tax Rates in FileMaker and pushing these to Xero. You would typically apply some kind of access privileges around these features so that only authorised accounts users can perform these functions, but the functionality for this is now included in the core fmAccounting Link (Xero Edition) files.

We’ve also updated the Bank Transactions endpoint examples to support creating and updating Bank Transactions (spend or receive money) in FileMaker and pushing these to Xero. This update also includes some minor bug fixes – you can view all the changes in the version history notes.

Last month Andrew Duncan from Databuzz attended #XD17 – the Xero Developer Roadshow – in Melbourne, Australia. There were some great presentations on upcoming features for the Xero API as well as some cool demos showcasing some cutting edge Amazon Web Services integrations with Xero. Xero have also announced that Webhooks are coming to the Xero API, starting with the Contacts endpoint first then followed by Invoices (the two most popular Xero API endpoints). Databuzz have been invited into the closed beta of this and we’ve started work on a PHP solution using the FileMaker PHP API that will accept the incoming Xero Webhooks notifications and trigger an update in the fmAccounting Link (Xero Edition) file. We will post an article with further details about this when Webhooks becomes publicly available.

Xero have also just announced support for JSON when uploading data to Xero via the API – they have previously only supported JSON for downloads (GET requests). Now that FileMaker Pro v16 supports JSON natively this will allow us to add native support for uploading and downloading data between FileMaker and the Xero API.

We also get a number of questions about Invoice Numbers when pushing Invoices from FileMaker to Xero, so we’ve updated our list of Frequently Asked Questions with some details about the options you can use when pushing an Invoice from FileMaker to Xero and whether to allow Xero to generate an Invoice Number to have FileMaker push the Invoice Number across to Xero to use. We’ve also updated our FAQ to include a note about FileMaker Cloud support.

Easier PDF Creation using PHP with FileMaker Server 16

If you’ve been doing Custom Web Publishing with the FileMaker PHP API and needed to generate a PDF report you haven’t had many simple options. You can use one of the available PHP PDF classes such as TCPDF or FPDF which require specifying x and y coordinates, fonts and text to output in certain positions on the page, or setup a “robot” FileMaker Pro client that runs in a loop looking for new jobs to process.

Developers have been requesting the ability to generate PDF files server-side for many years, and from my conversations with FileMaker, Inc. engineers it was the number one feature request. FileMaker, Inc. were finally able to deliver on this with the release of the FileMaker 16 platform earlier this year, which included the following new features related to PDF and printing from FileMaker Server:

  • the Print script step now allows you to create PDFs in web browsers with FileMaker WebDirect
  • the Print Setup script step now allows you to specify PDF options for the Print script step and Save Records As PDF script step on FileMaker Server and FileMaker WebDirect
  • the Save Records as PDF script step now allows you to save PDFs with FileMaker Server and FileMaker WebDirect

If you look at the documentation for the Save Records as PDF script step you will see that is only compatible with FileMaker Server and FileMaker WebDirect  and not compatible with Custom Web Publishing (CWP), which is used by the PHP API when running FileMaker scripts. At this point you might be inclined to assume that there is nothing helpful in these changes for CWP/PHP developers, but there is a way to leverage the Save Records as PDF support under FileMaker Server from a PHP page.

The solution to this requires the Perform Script On Server script step (PSoS) which is CWP compatible. At this point it’s important to mention that PSoS does require the fmapp extended privilege to be enabled for your PHP/CWP users and their associated Privilege Sets. If your PHP users don’t normally access the database using a FileMaker Pro client then you may need to make some changes to your OnFirstWindowOpen script to limit their access (e.g. lock and hide the toolbar, navigate to a blank layout etc).

With some planning you can implement a solution that works like this:

  1. you have a PHP script – e.g. printReport.php – which includes a Print PDF Report button
  2. when a user clicks this button it performs a FileMaker script using the PHP API newPerformScriptCommand method. Let’s call this script Create PDF Report on Server
  3. the Create PDF Report on Server script is run as a CWP script (remember this script cannot create a PDF on its own). It includes a Perform Script On Server step which performs another script running under FileMaker Server which handles the Print Setup/Save Records as PDF steps and generates the PDF file and stores it in a container field (or passes the PDF back as Base64 encoded text using the Base64Encode function). Let’s call this script Save PDF
  4. the Create PDF Report on Server receives the script result from the Save PDF script – if you’re passing the PDF as Base64 encoded data you can set a container field using the Base64Decode function. Now that you have the PDF in a regular container field you can exit the FileMaker script and your printReport.php can use the getContainerData method to retrieve the PDF and either display this in the browser or download it

This might look complicated but I was able to implement this in a couple of hours for a client that needed to generate PDFs for a PHP/CWP solution. Before implementing this I would recommend you first become familiar with the server side printing/PDF changes in FileMaker Server 16 – a great place to start is the found in the App Innovations space of the FileMaker Community. Download the 05_Server side PDF support.fmp12.zip file which is part of DemoKit16 – a collection of tools aimed at helping demonstrate and explore new features of the FileMaker 16 Platform (brought to you by the World Wide Solutions Consulting team at FileMaker, Inc.). Upload this file to your FileMaker v16 Server and run through the examples and see how the Print Setup and Save Records as PDF script steps work under FileMaker Server 16. I ended up using these scripts:

  • [btn] How – Inventory Report – request report from server
  • [sbr] How – Inventory Report – get report as PDF (PSoS)

as the basis for my CWP scripts with only a few minor modifications, such as setting and retrieving various script parameters related to the records I was creating a PDF for.

The PHP code for this looks like this:

$scriptName = 'Request Invoice PDF'; 
$scriptParams = $orderID;  
$scriptObject = $fm->newPerformScriptCommand('WebOrders', $scriptName, $scriptParams); 
$scriptResult = $scriptObject->execute(); 
if(FileMaker::isError($scriptResult)) { $scriptError = 'Perform Script Error: '. $scriptResult->getMessage() . ' (' . $scriptResult->code . ')'; 
} else { 
$scriptError = ''; $record = $fm->getRecordById('WebOrders', $recid); 
$url = urlencode($record->getField('zv_Container_gr')); 
$fileName =  $orderID. ' Order Invoice.pdf'; 
$downloadLink = 'downloadFile.php?fileName='.$fileName.'&path='.$url; 
}

The downloadFile.php script simply retrieves the container data (PDF in this example) and does a force download of the PDF file to the user’s downloads folder. You could also change this to display the PDF in either the current tab or in a new tab as required.

Here’s a screenshot of the Request Invoice PDF script (have simplified this to show just the relevant steps for this technique):

and here’s the screenshot of the (simplified once again) Create Invoice PDF script that runs as the PSoS script:

I’m setting the generated PDF into a global container field in the Create Invoice PDF script as I don’t need to store the PDF file permanently in the database as this can be generated at any time, however you could also store the PDF in a regular container field in a new record etc as required and avoid having to Base64Decode/Encode the PDF data. It’s also worth remembering that you can’t use the PSoS script to set the PDF into a global field, as global fields are unique to each clients “session” so the CWP script and the PSoS script are each running in their own session, which is why you need to use the Base64Decode/Encode functions.

I’m looking forward to implementing this in existing CWP solutions which required complex FileMaker layouts to generate the PDF that weren’t easily created using the available PHP PDF classes. If you have any questions please leave a comment below.

FileMaker Cloud Now Available in Australia and Japan

FileMaker Inc. today announced that FileMaker Cloud, their cloud-based platform for managing and running custom apps, now supports the Japan and Australia Amazon Web Services (AWS) regions. With FileMaker Cloud you don’t have to spend time and resources deploying and maintaining a server – there are no up-front costs and you can be up and running in around 20 minutes.

FileMaker Cloud now supports 7 AWS regions including:

  • Sydney
  • Tokyo
  • Canada
  • US West
  • US East
  • Ireland
  • Frankfurt

Today’s update also includes the ability to renew the 90-day trial Comodo SSL certificates through the FileMaker Store for 1, 2 and 3-year terms, using the initial host name and the filemaker-cloud.com domain. We recently wrote about our experiences with FileMaker Cloud and some differences between FileMaker Cloud and the traditional FileMaker Server product that you should be aware of.

 

Reduce No-Shows with SMS Appointment Reminders

If you’re running an appointment based business you’re probably painfully aware of the cost of no-shows and missed appointments. Whether you’re taking bookings for an office based business (doctor, dentist, hairdresser etc) or for onsite appointments (building inspections, electricians, plumbers etc) it’s important to have a system in place to remind your customers about the upcoming appointment in advance.

Integrating reminders into the daily workflow of your appointment based business has a number of important benefits:

  • decreases appointment no-shows. We’re all human and sometimes we just forget to enter the appointment into our diary, but being reminded helps prevent no-shows or gives customers a chance to cancel or reschedule. It also allows you to fill your calendar if someone cancels with other waitlisted customers
  • maximises the convenience to the customer by allowing them to receive reminders on their mobile phone which they generally have with them at most times. They can also choose to respond if necessary from their phone at a time of their choosing
  • reduce the number of outbound and inbound calls and staff playing telephone tag

SMS messaging has emerged to be a preferred channel for customer communication including appointment reminders. I personally receive SMS reminders for the majority of my appointments (everything from car repairs/servicing to dental appointments). There are a number of advantages of SMS appointment reminders including:

  • SMS/TXT messaging is available on every mobile phone – there’s no need to download an app. It will work just as well on a Nokia from the 1990s as it will on the latest iPhone or Samsung Galaxy and doesn’t require an Internet/data connection
  • sending txt messages is immediate and asynchoronous – it doesn’t require you and your customer to be talking to each other at the same time. You can send an appointment reminder to a customer and they can read the message and reply if needed at a time that is convenient to them
  • 90% of SMS messages are read within 3 minutes of being received and have a a 5X higher open rate than email
  • Cost effective – compared to a physical mail out or phone calls SMS appointment reminders are very cost effective

We’ve helped many small businesses implement an SMS based appointment reminder system into their daily workflows, including:

  • a removal business sends appointment reminders to both customers and truck drivers 2 days in advance confirming the upcoming appointment
  • a hairdresser automatically sends out appointment reminders 3 days before each appointment using a FileMaker Server scheduled script
  • a physiotherapist sends out birthday congratulations to all their customers automatically on their birthday with special offers using a FileMaker Server scheduled script

Appointment reminders can be sent by a staff member each day (for example to remind everyone about appointments tomorrow) or scheduled to be sent automatically by FileMaker Server. You can also take advantage of 2 way messaging to allow your customers to send a reply via SMS which is routed directly back into your FileMaker solution. One customer was able to replace a process that took 2 staff members over 90 minutes to contact all customers to confirm their appointments for the next day with an automated SMS reminder system that sends out hundreds of appointment reminders in under 5 minutes.

If you would like to discuss integrating SMS appointment reminders into your FileMaker solution please contact us for a free initial consultation to discuss your requirements. Our fmSMS solution is also available if you would like to have your existing in-house/external FileMaker developer perform an integration using our ready made solution.