Creating a workflow to exchange data with postal software

You can create a workflow, or a set of workflows, to extract mailing address data from the documents in a job and prepare the data for processing by external postal software. After the postal software verifies the addresses and improves their quality, the workflow can process results received from the postal software to update the documents in the job.
The Postal Enablement feature does not provide postal software. You can use your choice of external postal software, for example, the Bell and Howell BCC Mail Manager software or the TEC Solutions MailPreparer software. You must understand what information your postal software needs to perform the postal processing that you want. You also need to know how to connect the postal software to RICOH ProcessDirector.
To create a workflow to exchange data with postal software:
  1. Identify the job and document data that you need to exchange with the postal software.
    1. Identify the data that your postal software requires for each mail piece.
      The postal software requires name and address data in a specific format.

      If you are using the postal software to compute postage, the software might need information about mail piece weight and thickness. Some postal software assumes that all mail pieces in a job have uniform weight and thickness. Other postal software lets you specify different values for each mail piece.

    2. Identify the data that your postal software requires for each job.
      For example, you might need to specify Mailer ID and Postage statement date.
    3. Identify the RICOH ProcessDirector job and document properties that correspond to the data required by your postal software.
      The Postal Enablement feature provides a large number of job and document properties for use with postal software. For job properties, examine the properties notebook for the SetPostalJobProps step template. For document properties, examine the properties notebook for the BuildExternalDocPropsFile step template. Select from the document properties on the Available list.
    4. If you need custom document properties, edit the docCustomDefinitions.xml file and then run the docCustom utility to define the properties to the system. See RICOH ProcessDirector: Installing Document Processing Features for instructions.
  2. If your print file is in PDF format, do these steps:
    1. Follow the instructions in the Information Center to enhance PDF files for Postal Enablement.
      These instructions explain how to identify the start of each mail piece in a job, define document properties to extract address data from each mail piece, and make changes to the PDF file based on the data returned by the postal software.
    2. Save your document property definitions in a control file for use with a step based on the IdentifyPDFDocuments step template.
    3. Send the control file to the RICOH ProcessDirector server in a directory that the RICOH ProcessDirector system user has access to.
    4. If you are making changes to the PDF file based on the data returned by the postal software (for example, adding a barcode or replacing the address), save your document property definitions and updated address data in a control file with a different name from the control file in the previous step. Send the control file to the RICOH ProcessDirector server in a directory that the RICOH ProcessDirector system user has access to.
      This new control file is used with a step based on the BuildPDFFromDocuments step template.
  3. If you have the AFP Support feature installed and your print file is in AFP format, do these steps:
    1. Follow the instructions in the Information Center to enhance AFP files for Postal Enablement.
      These instructions explain how to identify the start of each mail piece in a job, define document properties to extract address data from each mail piece, and make changes to the AFP file based on the data returned by the postal software.
    2. Save the control file created by RICOH Visual Workbench and send it to the RICOH ProcessDirector server in a directory that the RICOH ProcessDirector system user has access to.
      This control file is used with a step based on the IdentifyDocuments step template.
    3. If you are making changes to the AFP file based on the data returned by the postal software (for example, adding a barcode or replacing the address), save your document property definitions and updated address data in an Enhance AFP control file. Send the control file to the RICOH ProcessDirector server in a directory that the RICOH ProcessDirector system user has access to.
      The Enhance AFP control file is used with a step based on the BuildAFPFromDocuments step template.
  4. Log in to RICOH ProcessDirector as an administrator.
  5. Click the Workflow tab.
  6. Copy the workflow that best meets your processing needs:
    • If you do not need to change how documents are processed based on results from the postal software, right-click the PrintAndMailJob workflow, and select Copy.

      The PrintAndMailJob workflow collects document data to send to postal software and uses a step based on the RunHotFolderApplication step template to exchange files with the postal software. After receiving the output of the postal software, the workflow updates the document data and prints the job for mailing. If you have RICOH ProcessDirector, the workflow processes both AFP and PDF print jobs. If you are using only one format, you can delete the steps in the branch for the other format.

    • If you need to take results from the postal software and split a job into child jobs that are processed by different workflows, right-click the GroupDocsForPostalProcess workflow, and select Copy.

      GroupDocs ForPostalProcess is part of a set of three workflows:

      • GroupDocsForPostalProcess

        This workflow collects document data to send to postal software and updates the document data from the output of the postal software. Using rules that you set up to interpret the data, the workflow produces child jobs for each type of mail that the postal software identified. The workflow is configured to pass the child jobs to one of the next two workflows.

      • ProcessQualifiedDocuments

        This workflow processes child jobs created by the GroupDocsForPostalProcess workflow if the documents in the job qualified for additional postal processing. The workflow sorts the documents, using the optimal method determined by the postal software, and passes the child jobs to the PrintForPostalProcess workflow.

      • PrintForPostalProcess

        This workflow prints the child jobs created by the GroupDocsForPostalProcess workflow. The child jobs contain qualified, nonqualified, and other types of mail. The workflow makes sure that the order of documents within each job is correct for each type of mail.

      After you copy the GroupDocsForPostalProcess workflow, determine how many additional workflows you need to perform postal processing at your company.

  7. Name the copy of the workflow, fill in or edit other values that you need, and click OK.
  8. If you have both the AFP Support and PDF Document Support features installed, these workflows process both AFP and PDF print jobs. If you only have one of those features installed, delete the steps in the branch for the other format.
  9. If the workflow process PDF jobs, right-click the IdentifyPDFDocuments step. Select Properties, and then click PDF. For the Identify PDF control file property, type the path and file name of the control file that contains your document property definitions. Click OK.
  10. If you have the AFP Support feature installed and the workflow processes AFP jobs, do these steps:
    1. Right-click the IdentifyDocuments step. Select Properties, and then click AFP. For the Visual Workbench control file property, type the path and file name of the control file that you created with Document Property Designer. Click OK.
    2. If your AFP print file is not already indexed, add a step based on the IndexAFP step template before the IdentifyDocuments step.
      This step shares the control file you specified for the IdentifyDocuments step. You do not need to specify the control file here.
  11. Right-click the SetPostalJobProps step. Select Properties, and then click Postal. Specify the values of the properties for the job. Click OK.
  12. Right-click the BuildExternalDocProps step. Select Properties , and then click Document processing. Do these steps:
    1. For the External document properties file property, specify the name and location that you want to use for the external document properties file.
      The default value writes a file named jobID.ToPostal.csv to the job's spool directory.
      When RICOH ProcessDirector creates this file, it converts the document properties file into the format required by the postal software.
    2. For the File type property, select CSV or Tab-delimited.
    3. From the Document properties list, select the document properties that you saved in the control file for the IdentifyPDFDocuments step (PDF) or the IdentifyDocuments step (AFP).
        Important:
      • Make sure that you include the Document number or Sequence in job property.
    4. In the Column headings field, type the names of the column headings required by postal software for the document properties. Use commas to separate the names, even if you selected Tab-delimited for the file type.
      The order of the headings must match the order of the selected document properties.
    5. Click OK.
  13. Based on the capabilities of the postal software, choose an interface with RICOH ProcessDirector:
    • RunHotFolderApplication step

      If your software can receive data using a hot folder, use this step to send and receive files containing document information that the postal software requires. You must:

      • Configure the postal software to watch a directory for a file with a specific name or filetype.
      • Configure the postal software to write its output to a directory with known filename characteristics.
      • Set up the network (for example, NFS or SAN), file permissions, and so on to share the directories defined for input and output on the RunHotFolderApplication step.

      The sample workflows provided with the Postal Enablement feature use this step with example directory names.

    • RunExternalProgram step

      If your software accepts command line input, use this step to run the postal software directly in the workflow.

      • The postal software must have a command line invocation that can be run on the primary RICOH ProcessDirector server. If you have RICOH ProcessDirector, the command line invocation also can be run on a secondary server or a Windows application server.
      • You must use standard RICOH ProcessDirector methods, such as ${getFileName(postal,bcc,read)}, to reference the files exchanged with the postal software.

    • SendEmail and ManualStepWithAutoStart steps

      Use these steps for a manual interface with the postal software. The SendEmail step sends the output file to a person who submits the file to the postal software while the job waits in the ManualStepWithAutoStart step. The person puts the results file returned by the postal software into the workflow where the MapExternalResultsFiletoDocProps step expects to find the file. The person then does a Manual Complete action to let the job continue through the workflow to the MapExternalResultsFiletoDocProps step.

  14. If you are using the RunHotFolderApplication step to interface with the postal software, do these steps:
    1. Right-click the RunHotFolderApplication step. Select Properties, and then click Job Defaults.
    2. Specify values for the Sending folder, File to send, Retrieval folder, Retrieval pattern, and Retrieved file properties.
    3. Specify values for other properties as needed.
    4. Click OK.
  15. If you are using the RunExternalProgram step to interface with the postal software, do these steps:
    1. Delete the RunHotFolderApplication step and replace it with the RunExternalProgram step.
    2. Right-click the RunExternalProgram step, select Properties, and then click External.
    3. Specify the command line invocation for the postal software in the External command field.
    4. Specify other values as needed.
    5. Click OK.
  16. If you are using the SendEmail and ManualStepWithAutoStart steps to interface with the postal software, do these steps:
    1. Delete the RunHotFolderApplication step and replace it with the SendEmail step.
    2. Add the ManualStepWithAutoStart step to the workflow after the SendEmail step.
    3. Right-click the SendEmail step. Select Properties, and then click Email.
    4. For the Recipient address property, specify the email address.
    5. Specify the other values as needed.
        Note:
      • If you have not already specified SMTP server settings, you should specify them to enable the email function. After you save the workflow, you can access the settings by clicking the Administration tab on the Main page. In the left pane, click System Settings.
    6. Click OK.
    7. Right-click the ManualStepWithAutoStart step, and select Properties.
    8. Specify values as needed.
    9. Click OK.
  17. Right-click the MapExternalResultsFileToDocProps step. Select Properties, and then click Document processing. Do these steps:
    1. For the Modified results file property, specify the name and location that you want to use for the modified results file.
    2. For the External results file property, specify the name and location that you want to use for the external document properties file that is returned from the postal software.
    3. For the File type property, select the type of the external results file: CSV or Tab-delimited.
    4. For the External results contain column headings property, select Yes or No.
      If the external results file does not contain column headings, you must edit the results file to contain only the columns of data that map to the list of selected properties. The number and order of columns in the external results file must match the number and order of the document properties in the Selected list.
    5. If the external results file contains column headings, type the names of the column headings that you want to keep in the Columns to keep field. Use commas to separate the names.
    6. From the Document properties list, select the document properties that correspond to the column headings that you are keeping.
      The order of the document properties must match the order of the column headings. The step uses this Information to create a modified results file.
    7. Click OK.
  18. You can use the information in the modified results file to have other RICOH ProcessDirector steps do additional processing of the document data before the data is merged into the document properties file.
  19. Right-click the UpdateDocPropsFromExtResultsFile step. Select Properties, and then click Document processing. For the Modified results file property, type the path to and name of the file. Click OK.
    This step merges the document data in the modified results file with the original document properties file that was created in the IdentifyPDFDocuments step for PDF jobs or the IdentifyDocuments step for AFP jobs.

    The document data from your postal software is now in RICOH ProcessDirector. The data can be used by a variety of RICOH ProcessDirector steps.

  20. If you want to set job properties based on document properties, do these steps:
    1. With a text editor, create a properties conditions file.
    2. Define the logic required to group documents for additional processing.
      Four sample properties conditions files are in the /aiw/aiw1/control_files/postal directory (on Linux) or the C:\aiw\aiw1\control_files\postal directory (on Windows):
      • postal_doc.csv
      • postal_doc_qualified.csv
      • postal_doc_print.csv
      • postal_doc_print_afp.csv
      For more information, see the topic on the SetDocPropsFromConditions step template in the information center.
      The GroupDocsForPostalProcess workflow uses a properties conditions file to place documents in child jobs for additional processing by the ProcessQualifiedDocuments workflow, the PrintForPostalProcess workflow, or both.
    3. If you are editing a copy of the PrintAndMailJob workflow, add a step based on the SetDocPropsFromConditions step template to the workflow.
    4. Right-click the SetDocsPropsFromConditions step. Select Properties, and then click Documents. For the Property conditions file property, type the path to and name of the file. Click OK.
  21. If the workflow processes PDF jobs, right-click the BuildPDFFromDocuments step. Select Properties, and then click PDF. For the Build PDF control file 1 property, type the path and file name of the control file that contains your document property definitions and address replacement data. Click OK.
      Note:
    • The GroupDocsForPostalProcess workflow does not have a BuildPDFFromDocuments step. If you have been editing a copy of GroupDocsForPostalProcess, you can copy the PrintForPostalProcess workflow and edit the BuildPDFFromDocuments step in that workflow, or you can create a workflow to perform the job processing you need. If you edit a copy of the PrintForPostalProcess workflow, you can use different control files for each processing path.
  22. If the workflow processes AFP jobs, right-click the BuildAFPFromDocuments step. Select Properties, and then click Documents. For the Enhance AFP control file property, type the path and file name of the Enhance AFP control file that you created. Click OK.
    If you edit a copy of the PrintForPostalProcess workflow, you can use different Enhance AFP control files for each processing path.
  23. Save the workflow.
  24. To test the workflow, do these steps:
    1. Create one or more input devices to point to the workflow.
    2. Enable the input devices.
    3. Submit your PDF or AFP print job to the input device.
  25. If you want to process reports from the postal software that are required for your postal service, you can add steps to your workflow to receive those reports along with the external results file and use a step based on the CopyToFolder step template to submit the report files for printing in their own workflow.
    Another approach is to build a workflow that emails the reports to users. If the reports are in a specified directory with a specified name, the SendEmail step can email them to a recipient that you specify on the step.