Use advanced rules to extract line-item fields from XML invoices

Advanced rules can be created while optimizing XML invoices to extract values for line-items in XML invoices:

Important To avoid problems while creating advanced rules for line-item fields, make sure to create them exactly following the order specified below.
Tip To find information on the location and any keywords, etc. that are currently specified for a line-item field in the profile, first select the line-item field to the right on the Line item editor tab, select the Field mapping rules tab on the left of the window, and then expand Field profile properties.

To create advanced rules to map values for line-item fields in XML invoices

  1. Open the Optimize module.
  2. Double-click the invoice profile that contains the invoice definition that you want to optimize.
  3. In the list that is displayed, double-click an XML invoice definition or profile that needs optimization (the cell in the Optimize column reads 99). The XML Mapper is displayed.
  4. If you do not know where the section for line-items is found in the XML code, click the XML tab at the top to the left on the screen to display the code for the invoice definition or profile. Browse through the code to find and make note of the top node that defines the line items (such as InvoiceLine, for example).
  5. Click the Line-item editor tab in the section to the right on the screen. Expand the top node displayed in the XML node selection box at the top of the window, and navigate to and select the node you found in the previous step. Click the Select button to the right of the box.
  6. In the Line items box further down on the screen, select the line item field that you want to map with an advanced rule.
  7. Now click the Field mapping tab at the top to the left in the window and select Use advanced rules. The same node you selected in step five should be displayed in the XML node selected to work with box. If necessary, expand it to display and select the node that corresponds to the line-item field you want to map with an advanced rule.
  8. Under Settings for new condition, specify the settings for the new condition and click Add next to the box. The new condition is added to the Conditions to work with box. Click it to select it.
  9. Specify the Settings to define how the field value is set and click Add next to it. The rule is added to the Rules applied to map this field box.
  10. Repeat steps 8 - 9 if additional rules are required to map the field.
  11. Click Extract and review the image to check the results. If you need to modify the rule, you need to click it in the Rules applied to map this field box, click Del to delete it, make the changes needed to fix the rule, and click Add again to add the modified rule. If you need to modify a condition, the process is the same (and if a rule is based on it, the rule is also deleted if you delete the condition).
  12. Consider if the change(s) should apply to all invoices or only those for the current XML invoice definition. Click Save XML definitionto save the change for the current XML invoice definition only (that is, the current supplier). Click Save XML profile if you want the rule to apply to all XML invoices that match the XML invoice profile regardless of the XML invoice definition.
  13. Click Close when you are done.