This is an old revision of the document!
Smart Routing (not to be confused with the optional Smart Router module) is a set of features in iDocs that permits the automatic routing of merged documents to Email, Fax and/or Print. It is implemented in two basic ways:
The first step is to create a mapped field that contains the database key value. This for example might be a customer number if you are using a customer database file. From the main InFORM Decisions menu, take option one, Define a form or Check Application. Locate the form application and place a two next to the application. Next locate a sample spool file and select this spool file with an option one and press enter twice.
At this point, the left column of the screen should display the corresponding lines numbers of the spool file. Additionally the key value, such as the customer number, should be in full view. If the value is not in full view, the display screen may be shifted right by using the shift F8 key.
With the key value in full view, position the cursor in the leftmost position of the value and press the F8 key. Next, place the cursor in the rightmost position of the key value and press the F8 key again. This will display the Map Field Maintenance screen.
Complete the field prompt by entering a field name and description. Enter 9998 for both horizontal and vertical positions so the data does not print on the output page – those coordinates are off the pcl page.
Secondly, specify a sort sequence. You should specify a sort sequence if you wish to group pages to one target into one transmission. For example, if you are emailing based on customer number you probably want to group all pages to a particular customer into one attachment and send the customer one email. Odd sort sequences sort in ascending order, even sequences sort in descending order.
Bursting should be set to Y. This will create a new document and thus a separate transmission, email fax or print, to the target. If you do not burst then each input spool file will generate one output transmission to the target found on the first page only of the document.
The normal procedure is to sort and burst on this field.
Smart Routing considers output targets to Email, Fax and/or Print. Any output method not defined will be skipped.
In the prompt for the Distribution Out Queue enter the key word value of either *EMAILPDF to process the distribution of the spool files in a PDF format, *EMAILPCL to process the distribution of the spool files in a PCL format.
In order to target destination can be resolved,
Destination Out Queue must be defined as *EMAILPDF or *EMAILPCL if you want to route for Email, Fax and Print. Destination Out Queue *FAX to route for Fax and Printing and *PRINT to route for Print only
'Work with Form Applications' screen, place an option 14 next to the entry and press Enter to open the
'Smart Routing Configuration' screen
In the main screen of Smart Routing, you can specify the target destination for Email in
Email Settings, for Fax in
Fax Settings and for Print in
Smart Routing can support up to three key fields for an external database. You can indicate the key values in fields 1st Key, 2nd Key and 3rd Key, or press F4 to select a spool map field from a list of available fields defined on the form application.
Email, Fax and Printing external database name can be the same or different, it means you can specify the different (or same) databases for Email, Fax and Printing.
In this screen specify the file name and library of the database file containing the Smart Routing address information. It can be a either a Physical or a Logical file. In the field specifying the Map field data to use as key, enter the name of the mapped field defined to contain the database key. This field must be defined as a keyed field on the PF or LF.
The new Smart Routing supports two approaches to access the databases:
+ The old approach: retrieve target destination by database column position by input a position at
Extract Field From and
To (like as old Smart Routing)
+ The new approach: retrieve target destination by database field name.
Besides database retrieval, the user is also able to use constant value for target destination by enter value in ‘Constant Value’ screen fields. Be aware of the data is only retrieved from database field, column position or constant value.
The further settings can be defined in
F6=Email Settings (for Email),
F7=Fax Settings (for Fax) and
F8=Print Settings (for Print)
Invalid Out Queue : if target destination is unresolved, the output is removed or moved to Invalid Out Queue (if specified)
An enhancement for IFDClient was added in 6.95 (7/24/20). If the IFDClient DataQ is specified, when smart routing is processed, it will create a temporary PDF into /tmp/idocs – this PDF is independent with any PDF created for SR mail, then a message is sent to data queue. If IFDClient is running, it will be able to download this PDF into PC user.
By default, Data is *SPJUSR which is the user ID of original spool file. Thus, if IFDClient is monitoring the data queue with key is user ID, the PDF will be sent to respective user ID.
You can set the condition for email to allow or forbid an email. If the condition does not match, the email will not be sent. If this option is enabled, the email is processed only if the result of condition returns true. DB Field or Extract Field From/To: enter database field name or a column position. If the fields is input, the database record will be checked the condition. Operator : the valid values are = (equal), <> (not equal), < (less than), ⇐ (less than or equal), > (greater than), >= (greater than or equal) Spool Map Fld or Constant Enter value for only one of them.
Some other settings are: From Address, CC Address, BCC Address, Email Subject, Mail Message… have similar usage as To Address in main screen, it means only database field, column position or constant value is input.
* CC Address: indicate the CC address; the usage is same as ‘TO Address’. The intention of adding the constant value is in case the user wants to have a copy to someone; he will not need to change his existing database.
* BCC Address: indicate the BCC address, the usage is same as TO Address
* Subject: indicate the subject of email. The user can either retrieve from database or input a constant value.
* Request Delivery Receipt and Request Read Receipt should be ‘Y’ or ‘N’
* Message: indicate the email message. The user can either retrieve from database or input a constant value.
Fax Settings is also defined as Email Settings
Print Settings is also defined as Email Settings
Description: We’ll use the EXAMPLE01 Form Application with the Invoice spool file which is a one page invoice.
When the Form Application is merged with the spool file sequences 1, 2, and 3 will be outputted to a Destination Out Queue with a writer for printing. In our example the Out Queue is called GOODOUTPUT.
Sequence 4 has a Destination Out Queue *EMAILPDF which is a reserved destination. *EMAILPDF will trigger iDocs to use Smart Routing. In our example we are using the iMail Address Book (option 3. Work with Users from the iMail menu) to acquire the email destination address; and we are using option 14.Smart Routing on the Form Application to configure the settings to trigger the look up of the email address by using the User Profile of the spool file owner.
In our example when Smart Routing is triggered the configuration will use the User Profile (*USRPRF) as the Key to search the EFLDIST2 (physical file that holds address book information) file in the IDOCS695 and use the email address in field DIEMAILADR corresponding to the User Profile. If no email address is available or a bad email address, then the PCL output will be sent to the Invalid Mail Out Queue BADOUTPUT.
In the Email Address Book we tie in the User Profile with the email address information by filling in the User Profile parameter in the address book record as shown in the example.