Invoice Buyer XML Download

This integration downloads invoices, credit debit memos, and miscellaneous invoices that are in Approved or Consolidated status. This upload uses the OAGIS XML standard. For further information on the generic implementation of this standard, visit their website at http://www.openapplications.org.

Connector Overview

Component

Detail

Company Type

Buyer

Supplier

MSP Partner

Version Type

1.0 - Downloads invoices for buyer in XML format: triggered from UI, Integrator, and Subscription.

2.0 - Downloads invoices for buyer in XML format: triggered from Web service.

3.0 - Downloads specific number of invoices for buyer in XML format: triggered from UI, Integrator, Subscription, or Web service.

4.0 - Downloads specific number of invoices for buyer in XML format: if count parameter not provided, it will consider the default value configured for the connector.

Format

XML

Prerequisites

Company Details Setting must be turned on for Integration – Standard Invoice XML Buyer Download.

User role permission must be turned on for Upload Data and Download Data.

Predecessors

Time / Expense Invoice(s)

Misc Invoice(s)

Credit Debit Memo(s)

SOW Invoice(s)

Related Connectors

Invoice Buyer Download

Invoice Supplier Download

Standard Invoice XML Supplier Download

Triggering Events

  • The status can be ‘Approved’ or ‘Consolidated’.

    • If the status is ‘Approved’, the invoice revision time should be between the last run date and the run date.

    • If the status is ‘Consolidated’, the consolidate revision time should be between the last run date and the run date.

  • For an MSP Partner or Supplier user, the company code for the connector is downloaded.

Parameters

The parameter will change the status of the invoice after the download:
  • 33 if the status is to be set to ‘Payment Pending’.

  • 52 if the status is to be set to ‘Paid’.

If version 3.0, another parameter is needed. Multiple parameters are separated by a comma:
  • Status to be set (33 or 52).

  • Number of invoices/consolidated invoices to be download.

File Formatting

Data Dictionary

Elements and Attributes

Data Type

Length

Min/Max Occurrences

Value(s)/Format

Description/Use/Field Rules

Invoice\InvoiceHeader\Party\PartyIDs\ID Text 6 1/*

Valid values are:

Valid SAP Fieldglass Supplier List

Supplier’s SAP Fieldglass Supplier Code
Invoice\InvoiceHeader\Party\Name Text 200 1/1

Valid values are:

Valid SAP Fieldglass Supplier List

Supplier Name
Invoice\InvoiceHeader-\DocumentReference (type=”CI”)-\DocumentID\ID Text 16 0/1   SAP Fieldglass Consolidated Invoice ID. Populated only if Invoice has been consolidated.
Invoice\InvoiceHeader\DocumentID\ID Text 16 1/1   SAP Fieldglass Invoice ID.
Invoice\InvoiceHeader\AlternateDocumentID\ID Text 16 0/1  

SAP Fieldglass Underlying Invoice ID.

For CrDb this will be the Invoice ID of the invoice being adjusted.

Invoice\InvoiceHeader\DocumentID\VariationID Text 50 1/1   Supplier Invoice Code

Invoice\InvoiceHeader\PerDiemAmount currencyID="ISO Currency code"

Decimal

0/1

Per diem amount for indicated currency code.

Invoice@Type=”Invoice Type” Text 2 1/1

Valid values are:

IN

CD

MI

PI

PC

SAP Fieldglass Invoice Type.
Invoice\InvoiceLine\Item\ItemID\ID Text 2 1/1

Valid values are:

TS

ES

MI

PS

PE

TU

Invoice Line Item Type.

The following values are specified:

PS(Sch)

PE(Event)

TU(SOW Fee/Unit)

Invoice\InvoiceHeader\DocumentDateTime Date 1/1

Example:

Date in mm/dd/yyyy format

Invoice Submit Date.

Date supplier submitted the invoice, or if Auto Invoicing is enabled, the date for which final approval of the source document was received.

Invoice\InvoiceHeader\ExtendedAmountInAdditonalCurrency currencyID="currency code"

Decimal

0/1

Additional invoice currency amount, Currency code must be valid SAP Fieldglass currency code.

Invoice\InvoiceHeader\TotalAmountInAdditionalCurrency currencyID="currency code"

Decimal

0/1

Total additional invoice currency amount. Currency code must be valid SAP Fieldglass currency code.

Invoice\InvoiceHeader\Party\Location\ID Text 100 1/1 Valid SAP Fieldglass Site List SAP Fieldglass Site Code.
Invoice\InvoiceHeader-\RemitToParty\Location\ID Text 100 0/1   Supplier Remit to Address Code.
Invoice\InvoiceHeader-\PurchaseOrderReference-\DocumentID\ID Text 100 1/1   PO Number from Work Order. If none has been entered on the Work Order, then the field will be blank.
Invoice\InvoiceHeader-\ExtendedAmount(currencyID=”ISOCurrency code”) Decimal 0/1  

Gross Invoice Amount.

Invoice Amount prior to any adjustments.

Invoice\InvoiceHeader-\TotalAmount(currencyID=”ISOCurrencycode”) Decimal 1/1  

Net Invoice Amount.

Invoice Amount inclusive of any adjustments.

Invoice\InvoiceHeader\Tax- \Amount(currencyID=”ISO Currencycode”) Decimal 1/1  

Invoice Adjustment Amount.

Total of all adjustments applied to the invoice.

Invoice\InvoiceHeader\Tax\TaxDetails\TaxLine\AdjustmentName

Text

100

0/*

Example:

State Tax

Name of adjustment (tax)

Required if site config 'Expense Code Adjustment' is enabled for the global site for the buyer.

Invoice\InvoiceHeader\Tax\TaxDetails\TaxLine\Amount(currencyID = 'ISO Currrencycode")

Decimal

1/1

Example:

19.50

Amount of adjustment (tax).

Required if site config 'Expense Code Adjustment' is enabled for the global site for the buyer.

Invoice\InvoiceHeader\Tax\TaxDetails\TaxLine\Adjustment%

Decimal

0/1

Percentage associated with adjustment (tax)

Required if site config 'Expense Code Adjustment' is enabled for the global site for the buyer.

Invoice\InvoiceHeader\Tax\TaxDetailsl\TaxLine\ExpenseAmount

Decimal

Conditional

Example:

100.00

Indicates expense amount.

Only applicable if site config 'Expense Code Adjustment' is enabled for the global site for the buyer and for adjustments with Calculation Entry Method 'Net Expense Amount' selected.

Invoice\InvoiceHeader\Tax\TaxDetails\TaxLine\ExpenseTotal

Decimal

Conditional

Example:

950.00

Indicates total of all expenses.

Only applicable if site config 'Expense Code Adjustment' is enabled for the global site for the buyer and for adjustments with Calculation Entry Method 'Gross Expense Total' selected.

Invoice\InvoiceHeader\Charge-\CurrencyExchangeRate-\SourceCurrencyCode Text 3 1/1

Examples:

USD

CAD

GBP

EUR

Currency
Invoice\InvoiceHeader\UserArea\WorkerData\FirstName Text 100 1/1   Worker’s First Name.
Invoice\InvoiceHeader\UserArea\WorkerData\LastName Text 100 1/1   Worker’s Last Name.
Invoice\InvoiceHeader\UserArea\WorkerData\Person\PersonId Text 24 1/1   Worker’s unique SAP Fieldglass Person ID.
Invoice\InvoiceHeader\UserArea\WorkerData\JobSeeker\JobseekerdId Text 16 1/1   Worker’s SAP Fieldglass Job Seeker ID.
Invoice\InvoiceHeader\UserArea\WorkerData\Worker\WorkerId Text 16 1/1   Worker’s SAP Fieldglass Worker ID.
Invoice\InvoiceLine-\InvoiceSubLine\DocumentReference(type=”token”)\DocumentDateTime Date 1/1

Example:

Date in “mm/dd/yyyy” format

Week Ending Date for Time Sheet.

Create Date for Expense Sheet, Misc Invoice, Credit Debit Memo, and SOW Invoice.

Invoice\InvoiceLine-\InvoiceSubLine\UserArea\BusinessUnit\BusinessUnitCode Text 100 1/1 Valid SAP Fieldglass Business Unit List Business Unit Code.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\BusinessUnit\BusinessUnitName Text 100 1/1 Valid SAP Fieldglass Business Unit List Business Unit Name.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CostCenter\CostCenterCode Text 200 1/1 Valid SAP Fieldglass Cost Center List Cost Center Code.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CostCenter\CostCenterName Text 200 1/1 Valid SAP Fieldglass Cost Center List Cost Center Name.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CostCenter\AccountCategory Text 100 0/1

Valid values are found in an Account Category Pick List.

Examples:

Internal Order

Cost Center

WBS Element

Type of Cost Center.
Invoice\InvoiceLine-\InvoiceSubLine\Item\ItemID\ID Text 100 1/1  

If Time Sheet, then the Task Code will be downloaded.

If Expense Sheet, then the Expense Code will be downloaded.

If SOW Invoice, then SOW Characteristic type is downloaded. Possible values:

  • Schedule

  • Event

  • Fee

If Credit Debit Memo for:

  • Time Sheet – TS

  • Expense Sheet – ES

  • SOW – PS

For Miscellaneous invoice - MI

Invoice\InvoiceLine-\InvoiceSubLine\Item\Description Text 100 1/1   Task or Expense Name.

Invoice\InvoiceLine-\InvoiceSubLine\Item\ExpenseEntryMerchant

Text 100

0/1

Name of merchant for expense sheets only.

Invoice\InvoiceLine-\InvoiceSubLine\UserArea\GeneralLedger\GeneralLedgerCode Text 100 1/1 Valid SAP Fieldglass General Ledger Account List

GL Account Code.

This field is mutually exclusive with Segmented Object Detail field.

Invoice\InvoiceLine-\InvoiceSubLine\UserArea\SegmentedObjectDetailCode Text 2000 1/*

Examples:

SOD1

Segmented Object Detail name associated with Segmented Object Detail value.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\SegmentedObjectDetail Text 2000 1/*

Examples:

IS|Admin|12001

IS-Admin-12001

IS;Admin;12001

IS:Admin:12001

Segmented Object Detail string. Segments will be separated by delimiter on the Segmented Object.

Valid delimiters are colon (:), semi-colon (;), pipe (|), and dash (-).

Required if 'Segmented object detail' configuration set.

This field is mutually exclusive with GL Account fields.

More than one string can appear for a cost center.

Invoice\InvoiceLine-\InvoiceSubLine-\TotalAmount(currencyID=”ISOCurrency code”) Decimal 1/1   Line Item Amount.
Invoice\InvoiceLine-\InvoiceSubLine-\Quantity(unitCode=”HR”) Number 1/*  

For Time Sheet Invoices, the value will equal the Time Sheet Hours.

For Expense Sheets, Misc Invoices, SOW Invoices, and amount-based Credit Debit Memos, the value will be 1.

Invoice\InvoiceLine-\InvoiceSubLine\UnitPrice-\Amount(currencyID=”ISO Currencycode”) Decimal 1/1  

For Time Sheet Invoices, the value will equal the rate paid by the buyer.

For Expense Sheets, Misc Invoices, SOW Invoices, and amount-based Credit Debit Memos, the value will be the same as the Total Amount for the Line Item.

Invoice\InvoiceLine-\InvoiceSubLine\UnitPrice\Code Text 100 1/1  

Rate Category Code.

Only populated for Time Sheet Invoices.

Invoice\InvoiceLine-\InvoiceSubLine\UnitPrice-\PerQuantity(unitCode=”HR”) Text 3 1/1

Valid values are:

Hr

Day

Mo

EA

For Time Sheet Invoices, the value will be the Rate Unit.

For Expense Sheets, Misc Invoices, SOW Invoices, and amount-based Credit Debit Memos, the value will be 'EA'.

Invoice\InvoiceLine-\InvoiceSubLine\WorkOrderMspPctDetail

Decimal

0/*

Work order MSP percent for each rate category (ex. ST, OT).

Company configuration ‘Does Buyer Have a MSP?’ must be enabled.

Invoice\InvoiceLine-\InvoiceSubLine\MspLineAmount

Decimal

0/*

MSP amount for each rate category.

Company configuration ‘Does Buyer Have a MSP?’ must be enabled.

Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CustomFields\CustomField\Module Text 100 1/1   Module name for which the Custom Field is associated.
Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CustomFields\CustomField\Name Text 100 1/1  

Custom Field Name.

Modules include:

Statement of Work

SOW Revision

SOW Worker

Worker

SOW Invoice

Invoice\InvoiceLine-\InvoiceSubLine\UserArea\CustomFields\CustomField\Value Dependent on Custom Field Type 0/1  

Custom Field Value.

Modules include:

Statement of Work

SOW Revision

SOW Worker

Worker

SOW Invoice

Contract ID

Text

Alphanumeric, 16 characters

Six-letter company code, then CT, and numerical string

EXAMPLE: CRPACT00000921

When the SOW Invoice is for an SOW that uses a Contract, the Contract ID will output.

External Contract ID

Text

Alphanumeric, 24 characters

When the SOW Invoice is for an SOW that uses a Contract, the External Contract ID will output.

The Invoice Buyer XML Download’s XML Schema Definition is also available at the link below if that format is preferred for the description of the connector:

https://xxxx.us.fieldglass.cloud.sap/schema/InSiteInvoice.xsd

Unique Identifier

  • Invoice ID field

Assumptions/Tips

  • This download won't change the status of any invoices in Pending SAP Quality Review status.

  • This download will also pull SOW Line Item revision invoices.

  • Only attachments that are set as public or private to the user’s company executing the download, are included in the download when the optional field ‘Include Attachments’ is enabled.

  • When the optional field ‘Include PDF in XML Download’ is enabled, a PDF will be generated.

  • Non-billable items are not included in download.

  • When Vendor Master fields are enabled in the download, the Supplier of the Invoice must be associated to a Vendor Master record, and the Vendor ID on the Vendor Master record must match the Vendor ID on the Supplier record.

  • This download will also pull Holdback revision invoices.

  • If buyer company has multiple MSPs, when MSP supplier user downloads invoices, they will see only invoices for their MSP.

  • This download will also pull the expense sheet revised invoice and its associated reversed invoice.

  • Zero (0.00) amount invoices are not included in the download.

  • The status of zero-dollar consolidated invoices are updated.

  • The system includes any inactive cost centers associated with the document.

Custom Fields

In order to include Custom Fields in this download, you must contact your SAP Fieldglass Representative. Custom coding will be required in order to include them in the file.

Configuration Considerations

#

Item

Notes

1

Attach an Invoice PDF to this Download

To attach an Invoice PDF to the Invoice Buyer XML Download, do the following: 

  1. From the connector details page in the SAP Fieldglass application, go to the Enable Fields tab.

  2. Click +Add Native Fields.

  3. Search for 'Include PDF in XML Download?' and click the checkbox.

  4. Click Add Selected Fields.

2

Add XML Tags into <InvoiceLine>

To add XML tags into the <InvoiceLine> portion, do the following:

  1. From the connector details page in the SAP Fieldglass application, go to More Actions | Change Post Processor.

  2. Click Add Post-Processor.

  3. From the drop-down select class:insite.web.integration.invoice.PDFAttachmentInvoiceDownload.formatInvAPI

  4. Click Update.

3

Turn on ITI Fields

To turn on ITI fields, do the following:

  1. From the connector details page in the SAP Fieldglass application, go to More Actions | Enable Feature.

  2. In the drop-down, select Include ITI fields for buyer, supplier, and MSP for Version X. The version number will change depending on which connector version is currently being used.

  3. Click Enable.

4

Version 4 error avoidance

Prerequisite for version 4.0 is to add the optional field '0' from the connector configuration page prior to download or else download will fail with 'SQL Server Exception'. Since the field list is common for other versions of this connector, this field '0' will not be available on enabling the version 4.0 and hence it has to be manually added from the optional field list by selecting 'Add native fields'.

 

Add XML Tags into <Tax Details>

Add XML Tags into the <TaxDetails> portion<TaxDetails><TaxLine><AdjustmentName >Adj1 Name</AdjustmentName ><Amount currencyID="USD">20.00</Amount><SupplierAmt><Amount currencyID="USD">15.00</Amount></SupplierAmt><MspAmt><Amount currencyID="USD">5.00</Amount></MspAmt></TaxLine></TaxDetails>

When you add columns for adjustments and their values to invoice downloads, the download will show the buyer adjustment amount. To see the supplier or MSP adjustment amounts, add the optional columns "Supplier Adjustment" or "MSP Adjustment" after the "All Adjustments" column. You will see one column per adjustment with the buyer amount. Following this, there will be another column with the supplier or MSP amount, or both if added, for the same adjustment before moving to the next adjustment columns.