---
sourceDocument: Australia Finance and Supply Chain
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/source-to-pay-operations

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Finance and Supply Chain

ft:clusterId :

    - stpop

bundleId :

    - stpop

workflow :

    - Employee


---

# Invoice data transformation logic

# Invoice data transformation logic {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 6 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Invoice data transformation logic

The Invoice Data Transformation Logic in Accounts Payable Operations integrates with Document Intelligence to standardize invoice and invoice line data for downstream processing.
It converts various fields such as invoice type, dates, currency, unit price, decimals, and reference fields into consistent formats supported by ServiceNow systems, ensuring accurate and efficient invoice processing.
Show full answer Show less  

## Invoice Type Derivation

* If the purchase order (PO) value is present on the invoice, the invoice type is set as PO type.
* If the PO value is empty, the invoice type is set as Non-PO type.

## Date Conversion Logic

* Dates in the invoice are converted to the ISO format (YYYY-MM-DD).
* Supports various common date formats such as "2nd Sep, 2022" and "09-02-2022".
* Ignores ambiguous DD-MM-YYYY dates where the day is less than 12 to avoid misinterpretation.

## Currency Conversion Logic

* Supports multiple locale number formats including US, European, and Indian.
* Converts currency representations whether the currency code or symbol is before or after the amount, with or without spaces.
* When currency code or symbol is missing or ambiguous, defaults currency based on invoice type:
  * PO invoices inherit currency from the purchase order or system currency if unavailable.
  * Non-PO invoices inherit currency from the legal entity's local currency or system currency if unavailable.

## Unit Price Conversion Logic

* Handles different locale number formats for unit prices, similar to currency formatting.
* Converts unit prices with currency symbols or codes into a normalized numeric value suitable for processing.

## Decimal Conversion Logic

* Supports locale-specific decimal and thousand separators (e.g., commas and dots) for invoice and line item amounts.
* Detects and converts numbers with mixed separators to the appropriate decimal format based on invoice data.
* If only a single decimal separator is present, conversion is bypassed and the field is cleared to prevent errors.

## Reference Field Value Logic

* **Legal Entity:** Derived by checking invoice bill-to company and location fields in a prioritized order (street, city, state, country, zip).
* **Purchase Order:** Extracts and cleans PO value from the invoice, ignoring prefixes, then matches it uniquely to the ERP purchase order number.
* **Supplier:** Matches supplier by exact name or partial name plus location from the invoice or associated PO to populate the supplier field.
* **Country:** Uses the country specified on the invoice or defaults to ISO country codes if missing.

## Subtotal, Tax, and Other Charges Logic

* Numeric fields are normalized to support up to four digits after the decimal separator.
* If three digits are present after the decimal, the value is cleared to avoid inaccuracies.
* Handles negative amounts or quantities by detecting negative signs after values or within brackets, marking such invoices as Credit memos.

## Practical Benefits for ServiceNow Customers

This transformation logic enables ServiceNow customers to reliably process invoices with diverse formats and locale-specific variations, reducing manual data correction and improving data integrity. By standardizing key invoice fields, the integration with Document Intelligence supports seamless downstream accounting and ERP system operations, enhancing overall accounts payable efficiency and accuracy.  
Accounts Payable Operations integration with Document Intelligence transforms invoice and invoice line field values into formats supported by downstream processing systems.

## Type deriving logic {#invoice-data-trans-logic__section_nwm_yrb_gyb}

The application includes the following logic for deriving the type field on the invoice.

* Considers the purchase order value in the invoice stage record
* If the purchase order value isn't empty, then the invoice type is set to PO type.
* If the purchase order value is empty, then the invoice type is set to Non- PO type.
{#invoice-data-trans-logic__ul_n3w_bsb_gyb}

## Date conversion logic {#invoice-data-trans-logic__section_acr_x4m_1xb}

The application includes the following logic for converting date formats mentioned in the invoice document:

* Considers YYY-MM-DD as the ISO format and the system format for date conversion.
* Considers dates only in MM-DD-YYYY format for conversion.
* Doesn't consider dates in DD-MM-YYYY format if DD is less than 12.
{#invoice-data-trans-logic__ul_i5l_sgn_1xb}
{#invoice-data-trans-logic__table_bfw_szm_1xb__entry__2}

| Date format in the incoming invoice | Converted date format |
|-|-|
| 2nd Sep, 2022 | 2022-09-02 |
| 3rd September, 2022 | 2022-09-02 |
| 02-Sep-2022 | 2022-09-02 |
| 02-Sept-2022 | 2022-09-02 |
| Sept-02-2022 | 2022-09-02 |
| Sep-02-2022 | 2022-09-02 |
| 09-02-2022 | 2022-09-02 |
| 02-09-2022 | 2022-02-09 |
| 09/02/2022 | 2022-09-02 |
| 02/09/2022 | 2022-02-09 |
[Table 1. Date conversion logic]

{#invoice-data-trans-logic__table_bfw_szm_1xb}

## Currency conversion logic {#invoice-data-trans-logic__section_qyh_hpm_1xb}

The application supports different locale such as US, European and Indian number systems. For example, "X,XXX.XXX", "X.XXX,XX", "XX,XX.XXX" where X is a single-digit positive number.
{#invoice-data-trans-logic__table_tbj_tzm_1xb__entry__3}

| Scenario | Currency format in the incoming invoice | Converted currency format |
|-|-|-|
| Amount followed by a space and the currency code | 76 EUR | 76 EUR |
| Amount followed by a space and the currency symbol | 76 € | 76 EUR |
| Currency code followed by multiple spaces and the amount | EUR 76 | 76 EUR |
| Currency symbol followed by multiple spaces and the amount | € 76 | 76 EUR |
| Amount without a currency code or symbol | 76 | 76 (followed by the purchase order currency or the session currency) |
| Amount separated by comma, dot or any other grouping or decimal separator followed by a space and the currency code | 7.123.456,99 EUR | 7123456.99 EUR |
| Amount followed by the currency code without any space | 76EUR | 76 EUR |
| Amount followed by the currency symbol without any space | 76€ | 76 EUR |
| Currency code followed by the amount without any space | EUR76 | 76 EUR |
| Currency symbol followed by the amount without any space | €76 | 76 EUR |
[Table 2. Currency conversion logic]

{#invoice-data-trans-logic__table_tbj_tzm_1xb}  
The application first looks for the active unique currency code in the Currency \[fx_currency\] table when an incoming invoice amount has a currency symbol or code. If multiple currency matches are found or the incoming invoice amount has no currency code or symbol, then the application runs the defaulting currency logic depending on the invoice type as follows.

* PO invoice - Searches for purchase order and related currency, and sets the invoice currency to purchase order currency. In case of missing purchase order or related currency, the invoice currency is set to system currency.
* Non- PO invoice - Searches for legal entity and local currency, and sets the invoice currency to the legal entity's local currency. In the case of missing legal entity and local currency, the invoice currency is set to system currency.
{#invoice-data-trans-logic__ul_sks_xnb_gyb}

## Unit Price conversion logic {#invoice-data-trans-logic__section_afy_hpb_gyb}

The application supports different locale such as US, European and Indian number format locale. For example, "X,XXX.XXX", "X.XXX,XX", "XX,XX.XXX" where X is a single-digit positive number.

If the incoming invoice unit price consists of currency symbol or code present in Currency \[fx_currency\] table, then the unit price is converted. For example, $ XX,XXX,XXX.XX or USD XX,XX,XXX.X, where X is a single-digit positive
number.
{#invoice-data-trans-logic__table_bfy_hpb_gyb__entry__2}

| Unit price mentioned in the incoming invoice | Converted unit price |
|-|-|
| 1,000,25.10 | 100025.10 |
| 1,00,025.10 | 100025.10 |
| $1,000,25.10 | 100025.10 |
| 1,000,25.10 $ | 100025.10 |
| USD1,00,025.10 | 100025.10 |
| 1,00,025.10 USD | 100025.10 |
[Table 3. Unit Price conversion logic]

{#invoice-data-trans-logic__table_bfy_hpb_gyb}

## Decimal conversion logic {#invoice-data-trans-logic__section_q5g_ctm_1xb}

The application supports different locale such as US, European and Indian decimal format locale. For example, "X,XXX.XXX", "X.XXX,XX", "XX,XX.XXX" where X is a single-digit positive number.  
Currency groupings on invoice and invoice lines are determined based on the user system locale settings. European currencies consider comma as a decimal separator and dot as a thousand separators. In some cases, various characters can also be used as grouping separator. The incoming invoice and invoice lines present in \[sn_ap_ic_invoice_stage\] and \[sn_ap_ic_invoice_line_stage\] tables are converted based on the positioning of decimal and thousand separators.  
Note:  
During conversion, for numbers such as 100,251 and 100.251, the system checks for other decimal separators mentioned in the invoice, and converts it to the appropriate decimal format. If the invoice contains fields with a single decimal separator, then conversion doesn't apply for the invoice, and the value is set to empty as shown in the following table.
For more information on currency conversion, see [Currency administration](https://www.servicenow.com/docs/access?context=currency&version=australia&pubname=australia-platform-administration&ft:locale=en-US).
{#invoice-data-trans-logic__table_ch1_5zm_1xb__entry__2}

| Decimal format mentioned in the incoming invoice | Converted decimal format |
|-|-|
| 1,000,25.10 | 100025.10 |
| 1,00,025.10 | 100025.10 |
| 100,251 | 100,251 |
| 10.102,510 | 10102.51 |
| 10.10.102,510 | 1010102.51 |
| 100,251 |   |
| 100.251 |   |
[Table 4. Decimal conversion logic]

{#invoice-data-trans-logic__table_ch1_5zm_1xb}

## Logic to fetch reference field values {#invoice-data-trans-logic__section_qwf_3tm_1xb}

{#invoice-data-trans-logic__table_rxz_svm_1xb__entry__2}

| Reference Field | Logic to fetch the field value |
|-|-|
| Legal Entity | The system fetches the value by checking the following values in the order listed: 1. Bill to company 2. Street, City, State, Country, Zip 3. City, State, Country, Zip 4. State, Country, Zip 5. Country, Zip 6. Country 7. Zip {#invoice-data-trans-logic__ol_f5w_zvm_1xb} |
| Purchase Order | The system does the following: * The system considers the purchase order value mentioned in the invoice stage * If the purchase order value is prefixed with special characters, alphabets, or zeroes, the application ignores the prefixes. It then matches the remaining purchase order value with the ERP number from the purchase order table. * If a unique purchase order is found, then the application populates the purchase order in the invoice {#invoice-data-trans-logic__ul_xcd_3wm_1xb} |
| Supplier | The system does one of the following: * The system considers the value mentioned in the invoice and does a complete match with supplier in Supplier table. * If the invoice contains a purchase order associated with the supplier, the application matches the supplier name in the invoice with the supplier name on the purchase order. It then populates the supplier. * If the invoice contains a supplier name with more than two words, the application performs a partial name match against the supplier table. The match includes the street address or city. For example, if the invoice contains the supplier name XX Corp and the supplier table contains XX Ltd, the application matches XX with the address. It then populates the invoice with the corresponding supplier. {#invoice-data-trans-logic__ul_yyy_bym_1xb}If a unique supplier record is found in any of the above, then the application populates the supplier in the invoice. |
| Country | The system does one of the following: * Considers the value mentioned in the invoice * If this value isn't mentioned in the invoice, it populates the International Organization for Standardization (ISO) short country name or the ISO long country name |
| Subtotal, Tax amount, Other charges | The system does the following: * If the invoice contains XX.XXX,XXX the application groups the numeric to four digits after decimal separator. * If the invoice contains three numeric digits after the separator, the application sets the invoice fields to empty. * If the invoice contains a combination of decimal and thousand separators in a form, the application defaults to the numeric value to the decimal separator. * If the invoice contains negative amount or negative quantity, then the DocIntel transformation logic is updated to extract negative amounts where the negative sign is either: * Present after the value (header or line level) * Present within a bracket (header or line level) {#invoice-data-trans-logic__ul_xbc_b5k_ydc}In such cases, the invoice is considered as of type Credit memo. {#invoice-data-trans-logic__ul_rl3_3rp_zzb} |
[Table 5. Reference field value logic]

{#invoice-data-trans-logic__table_rxz_svm_1xb}

