Step 8 – 2 Way Messaging/Replies

The options for 2 way messaging (sending and receiving messages using fmSMS) will depend on the SMS Gateway that you use, the Sender ID that you use and how you host fmSMS:

  1. Some SMS Gateways allow you to “poll” their server for any replies to messages sent from a shared virtual mobile number or a dedicated virtual mobile number. This requires manual intervention – someone needs to click the Get Incoming Messages button in the Account details screen to initiate this process (some Gateways also allow you to filter by date range and where supported the Date From and Date To fields will be visible). This method is supported when fmSMS is hosted/opened in FileMaker Pro or hosted by FileMaker Server. You could also setup a FileMaker Server script schedule to have this run on a scheduled basis (e.g.every hour) to save you from having to manually download/check for new messages - your script would just need to handle the incrementing of the timestamps.
  2. Most SMS Gateways that offer 2 way messaging will have an option to “push” incoming messages to you automatically using Webhooks in a similar way to how automatic Delivery Receipts are delivered. This is also our preferred method, but it does require 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. A static IP address is also recommended as you have to provide the SMS Gateway with a URL to a php page on your server. For the Data API you will need a domain name with an SSSL certificate installed. We provide the necessary PHP pages that convert the incoming message into a record in the Replies table in fmSMS for both the PHP API and the Data API. Some Gateways charge additional fees to use this feature and if you require a dedicated virtual number you will need to rent/purchase one through your SMS Gateway.
  3. you can also use Claris Connect Webhooks if you are also a Claris Connect customer. This is usually a much simpler process than using the supplied PHP files for the FileMaker Data API as you don't need to worry about hosting the files and dealing with web servers, PHP configuration changes, port forwarding etc.

To view the options for each supported SMS Gateway visit our list of Supported SMS Gateways and click the Further details link for more information.


Manually Check for Replies

To manually check for new Replies in fmSMS (where supported by your SMS Gateway) click on the  ACCOUNTS button at the top of the screen to view your list of Accounts. Click the arrow button to view the details for the Account you wish to check for new replies, then click the Get Incoming Messages button (if the SMS Gateway associated with this fmSMS Account does not support manually checking for replies you will receive an alert).

fmSMS will then communicate with the SMS Gateway and check for any new replies since it last checked and then download any awaiting replies. If the SMS Gateway supports filtering by a date range the the Date From and Date To fields will be visible which you can use to filter the request for replies received between the 2 dates.

To view incoming Replies click on the  REPLIES button at the top of the screen to view all existing Replies (you may need to click the Show All button on the FileMaker toolbar if you have Replies but none are showing):

Click the arrow button to the left of the Reply From field to view the details for an individual Reply:

The following details are available for a Reply:

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

Sender – the name of the Contact (if found) who send the Reply

Sender Mobile – the mobile phone number of the sender of the Reply

Destination – the number for the Reply was sent to (typically a shared virtual number or a dedicated virtual number – not all SMS Gateways provide this)

Timestamp – the timestamp for the Reply

Gateway Message ID: the SMS Gateway ID/reference for this Reply

Gateway Reply Ref: if the SMS Gateways allows you to include a hidden unique identifier in outgoing messages sent from a shared virtual number this will also appear here. This can be used to match an incoming Reply with a previously sent Message

Reply Body: the text of the incoming Reply

To help you match an incoming Reply to a previously sent Message we display the following below the Reply Body field:

Previous Messages By Gateway Message ID: we use the Gateway Message ID to match the Reply to a previous sent Message from fmSMS

Previous Messages by Gateway Numeric ID: some Gateways don’t allow alphanumeric reference numbers to be used as the hidden identifier when sending Messages from shared virtual numbers (we always use the fmSMS Message ID, e.g. MG1106 or the numeric component where required). For these SMS Gateways that only allow numeric identifiers to be used we match on the numeric component of the fmSMS Message ID

Previous Messages to this Sender: all previous Messages sent from fmSMS to the mobile number of the sender of the Reply


PHP Webhooks Setup

You get get more information on using the supplied PHP Webhook files in our Using Webhooks with fmSMS article.


Claris Connect Webhooks Setup

You can get more information on setting up Claris Connect Webhooks in our Getting Started guide. If you are using the Twilio SMS Gateway make sure you reference the Twilio Webhooks using Claris Connect article as Claris Connect has native support for handling incoming messages from Twilio.


Step 9 - FileMaker Server Side Sending

Still need help? Contact Us Contact Us