Step 7 – Delivery Receipts

Most SMS Gateways provide a way to check the delivery status of a sent Message using one of the following methods:

  • most Gateways let you generate reports within their website for messages sent from your Account via their Gateway
  • some Gateways allow you to check on demand for the status of an individual message sent from fmSMS (see below for details)
  • some Gateways allow you to specify a webserver that you control to be the recipient for automatic delivery receipts for all messages sent via fmSMS. This requires that fmSMS be hosted by FileMaker Server and that you configure the Customer Web Publishing service or enable the Data API with FileMaker Server v17 or later. The Gateway will automatically send status updates for sent messages directly to your server which can be automatically matched to the original message. We provide the necessary PHP files to install on your web server that converts these into records in the Delivery Receipts table for both the PHP API and the Data API.

Manually Check the Delivery Status of a Sent Message

To check the delivery status of a sent message in fmSMS (where supported by your SMS Gateway) click on the MESSAGES button at the top of the screen to view your sent Messages. Click the arrow button to the left of the Sent Timestamp to view the details for an individual Message:

Click on the Message Status tab then click the Check Status button to check the delivery status of this Message. fmSMS will then attempt to check the delivery status and return a result in the Message Status field. You can then compare this result to the list of Gateway Status Codes that appear below the Message Status field:

If a matching Message Status is found it will be highlighted in green – in the above screenshot the Message Status returned was 'delivered' which means “Confirmation of SMS delivery has been received by the upstream carrier and/or the destination handset.”

Automatically Receiving Delivery Receipts for Sent Messages

Many SMS Gateways also offer the option to automatically send delivery receipts for sent Messages directly to your Server. This has the advantage of not having to manually check the delivery status of sent messages – they will automatically appear in your copy of fmSMS. To set up automatic delivery receipts you will require the following:

  1. your copy of fmSMS must be hosted by FileMaker Server v16 or later if you are using the PHP API Webhook files
  2. your copy of fmSMS must be hosted by FileMaker Server v17 or later if you are using the Data API Webhook files
  3. you will need to deploy and configure Custom Web Publishing with PHP if you are using the PHP API Webhook files
  4. you will need a static IP address/domain name for the web server that is part of the FileMaker Server deployment (we need to provide the SMS Gateway with a URL to a php page that will be hosted on your Server)
  5. If you’re using the Data API Webhook files you will need to enable the Data API and host the PHP files (either on your FileMaker Server or elsewhere, for example Amazon Lightsail or your own web server running PHP)
  6. you need to install the deliveryReceipt.php file (supplied as part of your purchase of fmSMS) on your Web Server and determine the URL to these pages from the outside. For example if your web server has a domain name of www.myserver.com and you create a folder called fmSMS and place the dedicatedNumberReply.php file inside the fmSMS folder the URL will be: https://www.myserver.com/fmSMS/deliveryReceipt.php

FileMaker Cloud Compatibility – The only unsupported feature for FileMaker Cloud 2.x is the use of webhooks for automatically receiving incoming messages or delivery status updates. The Data API Webhooks currently don’t work with FileMaker Cloud 2.x deployments due to the differences in how authentication is handled for FileMaker Cloud 2.x users with the Data API. We hope to have a version of the Webhooks that support FileMaker Cloud 2.x soon.

The web server “root” folders for the installation location of the PHP files for FileMaker Server v16 and later is:

Windows (HTTP or HTTPS):

[drive]:Program FilesFileMakerFileMaker ServerHTTPServerConf

where [drive] is the drive on which the Web Publishing Engine component of your FileMaker server deployment resides.

Mac OS X (HTTP): 

/Library/FileMaker Server/HTTPServer/htdocs

Mac OS X (HTTPS):

/Library/FileMaker Server/HTTPServer/htdocs/httpsRoot

N.B. the HTTPS options require a valid SSL certificate to be installed.

If you are using FileMaker Server v17 you cannot use the FileMaker Server Admin Console to enable Custom Web Publishing using the PHP API. You will need to use the Command Line Interface to enable these – see the FileMaker Server 17 Help for more information on these commands.

Once you have determined the URL to the deliveryReceipt.php file you then need to update your account settings with your SMS Gateway to enable the automatic delivery receipts option and provide the URL to the deliveryReceipt.php page so they can sent the delivery receipts to this page (these will then be converted into records in the Delivery Receipts table). The process for this is different for each SMS Gateway.

You can test that automatic delivery receipts is working by sending yourself a test message from your hosted copy of fmSMS – you should start to see the Delivery Receipts appear when you click on the RECEIPTS button at the top of the screen to view the automatic Delivery Receipts:

Click on the arrow to the left to view the full details for a Delivery Receipt. If a match is found between the delivery status and the Gateway Delivery Status Codes it will be highlighted in green

The following details are available for an automatic Delivery Receipt:

Delivery Receipt ID – this is generated automatically by fmSMS and can be ignored

Status – the delivery status of the sent Message

Gateway ID – the Gateway Message ID from the SMS Gateway that matches the Gateway Message ID for the sent message (not all SMS Gateways will provide this). If there is a Gateway ID you can click the arrow to the right of the Gateway ID to go to the original sent Message for this delivery receipt

Gateway Status Code – some SMS Gateways also provide an additional Status Code

Timestamp – the timestamp for the Delivery Receipt

Gateway: this shows the SMS Gateway that is sending the Delivery Receipt

Account: this shows the fmSMS Account that was used to send the original Message

If your preferred SMS Gateway is not listed here please let us know – we can easily modify the deliveryReceipt.php file for additional SMS Gateways that support this feature.

Step 8 - 2 Way Messaging/Replies

Still need help? Contact Us Contact Us