Planning how to process orders from your MarcomCentral store

In this procedure, you map MarcomCentral XML elements for orders and job tickets to RICOH ProcessDirector job properties. You decide how to supply the information required for RICOH ProcessDirector to process the items in an order. You also decide what criteria to use to report status to MarcomCentral.
To plan how to process orders from your MarcomCentral store:
  1. Review your MarcomCentral orders and decide which XML elements to map to RICOH ProcessDirector job properties.

    Later in this procedure, you map the XML elements to job properties using a third-party tool (such as Altova MapForce) that creates XSLT stylesheets.

    For reference, this table lists the eight MarcomCentral XML elements for orders that are mapped to five RICOH ProcessDirector job properties in the sample MarcomProcessOrders workflow.

    XML element for order Database name of job property User interface name of job property
    OrderNumber Job.Marcom.OrderNumber MarcomCentral order number
    ID Job.Marcom.OrderId MarcomCentral order ID
    User/Email Job.CustomerName Customer name
    ShippingAddress/Address1ShippingAddress/CityShippingAddress/StateShippingAddress/Zip Job.Info.Attr1 Custom 1
    count(OrderDetails/OrderDetail) Job.Info.Attr2 Custom 2

    Keep in mind this information about RICOH ProcessDirector job properties as you do the mapping:

    • Two job properties for orders are supplied with the MarcomCentral Connect feature: MarcomCentral order number and MarcomCentral order ID.

    • Two job properties for job tickets are supplied with the MarcomCentral Connect feature: MarcomCentral job ticket ID and MarcomCentral product type.

    • For a list of all job properties supplied with the base product, see the related reference about database property names for jobs.

    • RICOH ProcessDirector supplies custom 20 job properties: 10 of the properties hold text, 5 hold integers, and 5 hold numbers, including fractional numbers such as 8.5 or 9.725.

      • If one workflow processes order jobs and another workflow processes ticket jobs, you can use a custom job property for different purposes in each workflow. For example, you can use the Custom 1 property for the shipping address of an order in the workflow for order jobs. You can use the Custom 1 property for the SKU description in the workflow for ticket jobs.

      • You cannot use the same custom job property for different purposes within the same workflow. For example, you use the Custom 1 property for the SKU description in the job ticket workflow. If you also use the Custom 1 property to provide packaging information in the job ticket workflow, the packaging information overwrites the SKU description.

    • If you need more custom job properties, contact your Ricoh support representative.

      Note: If you are not using some of the job properties supplied with the base product or an installed feature, you can use those properties for MarcomCentral. For example, you have the AFP Support feature, but you are not using the Job.Info.Department and Job.Info.Programmer job properties. You can use those properties for MarcomCentral.

    Create a table similar to the one below to record the MarcomCentral order elements to map to RICOH ProcessDirector job properties. Add as many rows as needed.

    Note: The sample MarcomProcessOrders workflow uses three custom job properties to determine when all the expected job tickets have been retrieved. The other custom job properties are available for your use.
    Database name of job property User interface name of job property XML element for order
    Job.Marcom.OrderNumber MarcomCentral order number OrderNumber
    Job.Marcom.OrderId MarcomCentral order ID ID
    Job.Info.Attr1 Custom 1  
    Job.Info.Attr2 Custom 2 count(OrderDetails/OrderDetail)
    Job.Info.Attr3 Custom 3 count(ns0:Envelope/ns0:Body/ns2:GetJobTicketsByOrderNumberResponse/ns1:GetJobTicketResponse/JobTicket)
    Job.Info.Attr4 Custom 4 Used to determine when all job tickets for an order have been retrieved from MarcomCentral.
    Job.Info.Double1 Custom number 1  
    Job.Info.Double2 Custom number 2  
    Job.Info.Double3 Custom number 3  
    Job.Info.Integer1 Custom integer 1  
    Job.Info.Integer2 Custom integer 2  
    Job.Info.Integer3 Custom integer 3  

  2. Review your MarcomCentral job tickets and decide which XML elements for job tickets to map to RICOH ProcessDirector job properties.

    For reference, this table lists the nine MarcomCentral XML elements for job tickets that are mapped to nine RICOH ProcessDirector job properties in the sample MarcomProcessJobTicket workflow.

    XML element for job ticket Database name of job property User interface name of job property
    OrderDetails/OrderDetail/ID Job.Marcom.JobTicketId MarcomCentral job ticket ID
    OrderDetails/OrderDetail/ProductType Job.Marcom.ProductType MarcomCentral product type
    OrderDetails/OrderDetail/ProductName Job.Name Job name
    OrderDetails/OrderDetail/ProductDescription Job.Description Job description
    OrderDetails/OrderDetail/Quantity Job.Copies Job copies requested
    OrderDetails/OrderDetail/SKUDescription Job.Info.Attr1 Custom 1
    OrderDetails/OrderDetail/Shipping/Method Job.Info.Attr2 Custom 2
    FinalOutputFileURL/URL Job.Info.Attr3 Custom 3
    OrderDetails/OrderDetail/SKU/ID Job.Info.Attr4 Custom 4

    Create a table similar to the one below to record the MarcomCentral job ticket elements to map to RICOH ProcessDirector job properties. Add as many rows as needed.

    Database name of job property User interface name of job property XML element for job ticket
    Job.Marcom.JobTicketId MarcomCentral job ticket ID OrderDetails/OrderDetail/ID
    Job.Marcom.ProductType MarcomCentral product type OrderDetails/OrderDetail/ProductType
    Job.Info.Attr1 Custom 1  
    Job.Info.Attr2 Custom 2  
    Job.Info.Attr3The DownloadFile step uses this job property. Custom 3  
    Job.Info.Double1 Custom number 1  
    Job.Info.Double2 Custom number 2  
    Job.Info.Double3 Custom number 3  
    Job.Info.Integer1 Custom integer 1  
    Job.Info.Integer2 Custom integer 2  
    Job.Info.Integer3 Custom integer 3  

  3. Decide how to supply the information required for RICOH ProcessDirector to process the items in an order from your MarcomCentral store.
    MarcomCentral does not store the information required to process the items in an order. For example, MarcomCentral does not store the media, duplex, and finishing options required for print items or the packing material required for non-print items.
    1. Decide whether you want your MarcomCentral workflows to process both print and non-print items or only print items.

      If you want your workflows to process only print items, skip the instructions for non-print items. When you copy the sample MarcomProcessJobTicket workflow and modify it for your needs, remove the branch that processes non-print items.

    2. Decide what information RICOH ProcessDirector requires to process print items.

      For reference, this table lists the two RICOH ProcessDirector job properties that provide information required to process print items in the sample MarcomProcessJobTicket workflow.

      Database name of job property User interface name of job property
      Job.Media Media
      Job.Duplex Duplex

      Create a table similar to the one above to record the RICOH ProcessDirector job properties that provide the information required to process print items in your job ticket workflow. Add as many rows as needed.

      Note: Optionally, you can add an additional column to the table for XML elements to use later in this procedure.

    3. Decide what information RICOH ProcessDirector requires to process non-print items.

      For reference, this table lists the RICOH ProcessDirector job property that provides information required to process non-print items in the sample MarcomProcessJobTicket workflow.

      Database name of job property User interface name of job property
      Job.Info.Attr5 Custom 5

      Create a table similar to the one above to record the RICOH ProcessDirector job properties that provide the information required to process non-print items in your job ticket workflow. Add as many rows as needed.

      Note: Optionally, you can add an additional column to the table for XML elements to use later in this procedure.

    4. Identify the MarcomCentral XML element or elements required to look up the information RICOH ProcessDirector uses to process each item ordered at your MarcomCentral store.

      For example:

      • At one MarcomCentral store, different print items require different media and duplex options. The MarcomCentral elements for product type and product ID identify each print item. RICOH ProcessDirector maps the product type and product ID elements to job properties. RICOH ProcessDirector then uses the values of the job properties to determine the media and duplex setting required for each print item.

      • At another MarcomCentral store, different non-print items require different packing material and gift wrap options. The MarcomCentral element for stock-keeping unit (SKU) ID identifies each non-print item. RICOH ProcessDirector maps the SKU ID element to a job property. RICOH ProcessDirector then uses the SKU ID to determine the packing material and gift wrap options required for each non-print item.

      • At a third MarcomCentral store, a portion of the MarcomCentral SKU ID identifies each print or non-print item. RICOH ProcessDirector maps SKU ID to a job property and uses a substring function in the XSLT stylesheet to remove digits that are not needed. RICOH ProcessDirector then uses the portion of the SKU ID to determine the processing options required for each print or non-print item.

        Note:
      • Make sure that you plan for elements that change based on how customers customize the products they order. For example, an element identifies baseball caps, but the value of the element changes for red and blue caps. Use a second element to identify the color.
    5. If the element or elements are not included in the table of XML elements for job tickets, add them to the table.

      For example, you use the SKU ID element to identify items. Make sure that the SKU ID element is included in the table of XML elements for job tickets that you map to RICOH ProcessDirector job properties. In the sample MarcomProcessJobTicket workflow, the SKU ID element is mapped to the Custom 4 job property.

    6. If an external data source contains the information required to process items ordered at your store, decide how to retrieve the information from the data source.

      For example, if a web service can retrieve the processing information, you can use a CallSOAPService or CallRESTService step to call the web service. A later step in this procedure explains how to add a CallSOAPService step to a workflow. Another way to retrieve the information is to use a RunExternalProgram step.

    7. If you do not have an existing data source, decide how to supply the information required to process items ordered at your store.

      The procedures for configuring RICOH ProcessDirector to retrieve and process MarcomCentral orders discuss two ways to supply information:

      • XML files

        You can create a set of XML files, one for each item ordered at your MarcomCentral store. An ApplyXSLTransform step uses the XML file to set values for the job properties of the item. The sample MarcomProcessJobTicket workflow uses this method.

        To create the XML files, you map the XML elements used by each item to RICOH ProcessDirector job properties. The next step in this procedure explains how to create the XML files.

      • AssignJobValues steps

        You can add to your job ticket workflow an AssignJobValues step for each item ordered at your MarcomCentral store. For example, if SKU IDs identify items, you can use an AssignJobValues step for each SKU ID. In the step, you assign all the job properties required to produce the item.

      You can use other methods to supply the information required to process the items ordered at your MarcomCentral store. For example, if you have the Archive feature, you can store print items and the job properties required to print them correctly in a repository. When RICOH ProcessDirector processes the job for the print item, it can retrieve the PDF file and the properties required to print it from the repository.

  4. To use a set of XML files at a specified location as input to an ApplyXSLTransform step, do these steps.
    1. Assign XML elements to the job properties required to process each print or non-print item.
      You identified those job properties in earlier steps. The tables provided in those steps include a column that you can use to assign an XML element to each job property.
    2. Create a directory for the files.

      For example, create a MarcomItemProperties subdirectory in the testfiles directory:

      • /aiw/aiw1/testfiles/MarcomItemProperties (Linux and AIX)
      • C:\aiw\aiw1\testfiles\MarcomItemProperties (Windows)

    3. Create an XML file for each item that can be ordered at your MarcomCentral store.

      The file contains the XML element or elements that identify the item and an XML element for each job property required for print and non-print items. Each property specifies the value required to process the item.

      A separate file is required for each item, even if some items require the same processing information.

      In this example, the value of the SKU/ID element identifies the item. The example includes an element that identifies the name of the item (Brochure_JensenBank) and seven more elements with the values required to process the item.

      <?xml version="1.0" encoding="utf-8"?>
      <SKU>
        <ID>10000001</ID>
        <Name>Brochure_JensenBank</Name>
        <Duplex>Yes</Duplex>
        <Media>Letter Plain></Media>
        <Punch>Not set</Punch>
        <Staple>Not set</Staple>
        <Fold>None</Fold>
        <Package></Package>
        <PackMaterial></PackMaterial>
      </SKU>

    4. When you name the file, include the value of the job property or properties that identify the item in the name.

      For example:

      • SKU ID 10000001 identifies a brochure, and you map the SKU ID element to the Custom 4 ( Job.Info.Attr4) job property.

      • Name the file Item10000001.xml.

      • When you modify the MarcomProcessJobTicket workflow to access your XML files, use a symbol in the name of the input file for the ApplyXSLTransform2 step. Specify Item${Job.Info.Attr4}.xml as the value of the Input file property. For more information, see the related task for accessing XML files from your job ticket workflow.

    5. Put the files in the directory that you created.

      For example, put the files in the MarcomItemProperties directory.

  5. Prepare your XSLT stylesheet files:
    1. Create a directory in a location that the RICOH ProcessDirector server can access.
    2. Make copies of the jobticketsReceived.xslt and downloadOverrides.xslt XSLT stylesheet files and put them in the new directory.

      The jobticketsReceived.xslt and downloadOverrides.xslt files are in this directory:

      • /aiw/aiw1/testfiles/Marcom (Linux and AIX)
      • C:\aiw\aiw1\testfiles\Marcom (Windows)

      Note: You do not need to change these files.
      • The jobticketsReceived.xslt file converts an XML element into a job property that RICOH ProcessDirector uses to count the number of job tickets that have been received.

      • The downloadOverrides.xslt file converts an XML element into a job property that RICOH ProcessDirector checks to see whether a print file is ready to download.

    3. Use an XSLT tool (such as Altova MapForce) to create an XSLT stylesheet that converts MarcomCentral order elements into job properties.

      • In an earlier step, you mapped MarcomCentral order elements to RICOH ProcessDirector job properties in a table. Refer to that table as you prepare the input to the tool.

      • After you create the stylesheet, save it in a file named orderToOverrides.xslt.

      This example shows the contents of the sample orderToOverrides.xslt file supplied with the MarcomCentral Connect feature:

      <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" 
      	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      	xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs">
        <xsl:output method="text" encoding="UTF-8"/>
        <xsl:template match="/">
          <xsl:variable name="var1_initial" select="."/>
          <xsl:for-each select="Order">
            <xsl:variable name="var2_current" select="."/>
            <xsl:value-of select="concat('Job.Marcom.OrderNumber=', OrderNumber, 
      			'&#10', 'Job.Marcom.OrderId=', ID, '&#10', 'Job.Info.Attr1=', 
      			ShippingAddress/Address1, ' ', ShippingAddress/City, ' ', 
      			ShippingAddress/State, ' ', ShippingAddress/Zip, '&#10', 
      			'Job.CustomerName=', User/Email, '&#10', 'Job.Info.Attr2=', 
      			count(OrderDetails/OrderDetail))"/>
          </xsl:for-each>
        </xsl:template></xsl:stylesheet>

    4. Use the XSLT tool to create an XSLT stylesheet that converts MarcomCentral ticket elements into job properties.
      • In an earlier step, you mapped MarcomCentral ticket elements to RICOH ProcessDirector job properties in a table. Refer to that table as you prepare the input to the tool.

      • Make sure that the stylesheet maps the job ticket element or elements that look up the information required to process each item in an order.

      • Make sure that the stylesheet maps the order element that associates each job ticket with its order. In the sample MarcomProcessJobTicket workflow that element is OrderDetails/OrderDetail/OrderID, which is mapped to the MarcomCentral order ID job property.

      • After you create the stylesheet, save it in a file named jobticketToOverrides.xslt.

    5. If you created XML files with information required to process each item in an order, use the XML tool to create an XSLT stylesheet. The stylesheet converts the XML elements in each XML file into job properties.

      • In an earlier step, you recorded in tables the RICOH ProcessDirector job properties required to process print and non-print items. In another step, you assigned XML elements to the job properties. Refer to those tables as you prepare the input to the tool.

      • After you create the stylesheet, save it in a file named itemToOverrides.xslt.

    6. Put the new XSLT stylesheet files in the directory that you created.
  6. Decide what criteria to use to report status to MarcomCentral.

    Consider whether you want to report status only for some workflows or items. You can use any job property or combination of job properties to trigger the notification to MarcomCentral.

    For example, the sample MarcomCloseoutOrder notification reports status when an order is ready to ship and the state of the order job has changed to Retained. The state of the order job does not change until the jobs for all the items in the order complete their processing.

After you plan how to process orders, you are ready to prepare to call MarcomCentral web services.