One of the most popular applications for Interfax is in time-sensitive order processing applications, such as restaurant and take-away ordering. Time-sensitive applications are usually business-critical processes, as each fax represents an actual order by a web visitor.
The visitor is unaware that his order, which has been placed and charged through a web site, travels to the order-fulfillment destination by fax, and that a number of variables may delay or prevent its arrival. Therefore, special precautions must be taken to ensure the faxes arrival.
Closed-loop tracking In order to overcome various faults that may keep an order from reaching its destination, programmers developing with Interfax must implement a closed-loop logic to track faxes' progress through the system up to their ultimate arrival. This requires usage of the Interfax Web Service (and not the Email Interface) for two reasons:
When submitting a transaction through the Web Service, the submitted message's transaction number is returned as a token.
The Web Service offers methods that enable the retrieval of a submitted faxes status.
Backup Procedure A backup procedure must be in place to alert an administrator of a failure. The administrator must be able to retrieve the failed fax (for example, by entering the Interfax online screens and finding the failed transaction) and either to resubmit it manually or to forward the message by alternative means.
The following steps are suggested to implement a closed-loop logic to track a faxes progress through the Interfax system:
blockquote dir="ltr" style="margin-right: 0px;">
1. Submit your message through a Web Service method and receive a transaction number back as a token.Keep a local list of transactions in process (TIP) and add this transaction's number to the list.
- Check the status of all of your transactions in process (the ones listed in TIP) using one of the applicable Web Service methods.For each transaction in TIP apply the following logic.
- If a transaction has completed successfully (Status = 0) - remove it from TIP.
- If a transaction has failed* (Status > 0) notify an administrator; remove the transaction from TIP.
- If a transaction is not yet complete (Status < 0) then:
- If the transaction has been in process for more than x (unreasonably long) minutes** - notify an administrator and remove the transaction from TIP.
- This condition indicates that the Interfax system has made several attempts to send a fax, but has ultimately been unsuccessful. This could be due to the fax machine on the recipient number being busy (engaged), out of paper, or not answering, or due to telephone line problems.
** This condition indicates a delay in the Interfax system, possibly due to congestion or a system fault. Note that a regular fax may take up to 15 minutes to complete all retry attempts, if the recipient number is continuously busy.