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 Gatways 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 FileMaker Server and the PHP API and a static IP address. 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 pages to install on your web server that converts these into records in the Delivery Receipts table

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:

Sent Messages

Sent Messages

Click the green arrow button to the left of the Sent Timestamp to view the details for an individual Message:

Sent Message

Sent 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:

Check Message Status

Check Message Status

If a matching Message Status is found it will be highlighted in green – in the above screenshot the Message Status returned was 004 which means “Received by recipient – Confirmation of receipt on the handset of the recipient”.

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/Server Advanced v12 or later
  2. you will need to deploy and configure Custom Web Publishing with PHP
  3. 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)
  4. 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 this page 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 deliveryReceipt.php file inside the fmSMS folder the URL will be: http://www.myserver.com/fmSMS/deliveryReceipt.php

FileMaker Cloud Compatibility – if you’re using FileMaker Cloud to host fmSMS you will not be able to automatically receive delivery receipts using the supplied PHP pages as FileMaker Cloud does NOT support Custom Web Publishing with PHP.

The web server “root” folders for the installation location of the PHP files for FileMaker Server v13 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.

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:

Clickatell

  1. login to your Clickatell account via their website (remember to select the Developers Central product when logging in)
  2. from the Home page click Manage my Products
  3. under the My Connections section you should see an entry for your HTTP API Connection – click on the Name
Clickatell Delivery Receipts Setup

Click on the Name of your HTTP API Connection

  1. ensure 
  2. enter your URL in the Your URL field
  3. for Method select HTTP GET

Clickatell Delivery Receipts Setup 2

  1. click the Save Changes button
  2. make sure your fmSMS Account is using one of the Clickatell Auto Delivery Receipts Gateways

SMS Global

  1. login to your SMS Global account via their website
  2. click Tools on the left hand menu
  3. enter your URL in the To URL field under Delivery Receipts
  4. click the Update Settings button at the bottom
SMS Global Delivery Receipts

SMS Global Delivery Receipts

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:

Auto Delivery Receipts

Auto Delivery Receipts

Click on the green 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:

Delivery Receipt Details

Delivery Receipt Details

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 green 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.