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:
To create advanced rules to map values for line-item fields in XML invoices
- Open the Optimize module.
- Double-click the invoice profile that contains the invoice definition that you want to optimize.
- 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.
- 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).
- 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.
- In the Line items box further down on the screen, select the line item field that you want to map with an advanced rule.
- 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.
- 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.
- 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.
- Repeat steps 8 - 9 if additional rules are required to map the field.
- 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).
- 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.
- Click Close when you are done.