Generating a Fax or Email request
The module $type fsfile may be used to generate a .FS (fax send) file. The fax send file may also be used to send email on email-enabled systems, to call a number to leave a voice message, or to interact with the called party by invoking an automated call script. This file is a text file which contains commands that tell CopiaFacts what files to fax, what fax number to use, optionally what time and date to send them, retry strategies, etc. The FS file is written to a queue (folder) on the fax server where it is picked up and actioned by a CopiaFacts node handling outbound calls or e-mails. This scripting module type allows greater flexibility in sending faxes. It can be used to replace external processing routines that created FS files by various means in previous releases. Note that this module is not required for normal FoD applications, where FS files are generated automatically when needed for callback FoD, and where the 'scripting' needed for document selection is already built in to CopiaFacts.
It is very seldom necessary to use custom scripting in a FoD application, but there are commands to customize the processing such as $add_image (which will add a document to the FoD selection list), and system and control variables such as FAXCOVER (which will override the cover sheet in the user profile for callback FoD operations), and CALLTYPE and RCVRFAX to select one-call or callback delivery and destination. When you are ready to send the fax, you must use $next_box to branch to state s:NO_MORE_IMAGES (s72), which tells CopiaFacts that the image catalog selection process is complete. At that point the standard CopiaFacts FoD internal script takes over to complete the fax delivery, either on the same call or by generating an FS file to make a separate outbound call.
An FoD document is normally added in scripting by placing its document number on a $next_box command. The CopiaFacts built-in scripting would then either confirm the selection or report a missing document using the system messages and prompts described in Appendix A. To control this processing in a script, you would instead use the $add_image command to add documents to the list of documents to send, and you can determine whether this was successful by checking the ADDOK control variable after adding the document. You also have the ability to clear this list and start over if you wish by setting the system variable IMAGECOUNT to zero.