Specify Fax Pre-processing
This command specifies that you wish to hook into the fax delivery process by performing custom processing before the fax or e-mail is sent. For a callback request, CopiaFacts creates this command from a $pre_process command in the user profile.
The parameters on this command are used as follows:
|command||the name of an operating system command, program, or batch file that will be executed to initiate pre-processing; or an infobox name for infobox method processing. A program or batch file name must have a file extension if its extension is not .EXE. Operating system commands should be preceded by CMD /c.|
|method||one of the following keywords:|
|internal||COPIAFACTS will invoke (spawn) the specified pre-processing command with the following program arguments:|
The full name of the FS file to be processed
The FS file number only with no extension
The call number of the call generating the FS request
The directory that contains the , SENT, and FAIL directories
|Internal pre-processing should be used for legacy applications only: to run a program with your own choice of parameters, use infobox pre-processing to run a $type query infobox and execute a $run command.|
|internalNT||internal pre-processing will be done as for the internal keyword, but the FS file will not be selected for processing on a system which is not running under Windows.|
|internalDOS||internal pre-processing will be done as for the internal keyword, but the FS file will not be selected for processing on a system which is running under Windows.|
|external||preprocessing will be performed by some external process (not supplied), running on a networked system. CopiaFacts will wait for any external processing to be completed before attempting to send an outbound request that is marked for pre-processing.|
|FFEXTERN||pre-processing will be performed by FFEXTERN and the FS file will be placed in the PREPROC directory so that FFEXTERN will detect it.|
|For document conversion operations initiated automatically by a file extension specified in $convert_types, do not specify this command with an FFEXTERN keyword: the necessary commands are generated automatically and adding a 'manual' command will disrupt this. In this case the keyword is changed do DONE_FFEXTERN after successful conversion.|
|FFVIEWER||pre-processing for approval will be performed by FFVIEWER.|
|infobox||an infobox to which control is transferred during preprocessing. Only one $fax_pre-process command in an FS file may be of this type, but you can chain multiple pre-process sequences using the $set_chain and $chain commands.|
When you select the internal processing method the COPIAFACTS thread controlling the line is suspended. If you have a lengthy process, this could delay the processing of calls by the line and it would be better to do the processing externally. Your internal preprocess command is responsible for changing the status in the FS file to indicate that it is ready for processing.
An external pre-processor must monitor outbound request files to determine which, if any, files are ready for it to process. This $fax_pre-process command should be checked for a matching pre-process command. Additionally, the $fax_status1 command should be checked for a value of zero (awaiting pre-processing). Once the pre-processor begins processing the request file, it should update the status to 1 (pre-processing in progress). The pre-processor may modify the request file variables, change the images to be sent, change transmission dates and times, change the fax number, cover sheet, and any of the other information contained in the request file. It may even delete the request. After pre-processing is completed and the request is ready to send, the status must be updated to 2 (ready to send).
Infobox preprocessing can be used for operations such as calling an external DLL or program from an infobox. The user profile or user job properties file referenced from the FS file must have one or more $script_locn commands to locate the infobox file(s). Your infobox logic must finish by transferring to state 191 (IIF_PROC_COMPLETE) to continue the call, or to state 121 (ABORT_CALL) to cancel the further processing of the FS file. In the latter case it will fail with status 61, pre-process failure, but you can override this by assigning an error code to the FS_PREFAIL system variable and returning to state 191 (IIF_PROC_COMPLETE). A fax item can also be treated as a successful transmission by assigning a non-empty value to the SUPPRESS_FAX variable during pre-processing.
Voice operations within your infobox sequence will be ignored, and transfer to any other state may cause unpredictable results. The FS_... system variables contain specific data pertaining to the active FS file, but any valid system and control variables may also be used. Any program or DLL called from the infobox sequence should not attempt to modify the FS file other than via the FS_... variables.
Avoid using a fully upper-case form of this command. For a document conversion operation this will cause the command to be removed from the FS file after the first conversion attempt.
$fax_pre-process "preproc" internal