Attachment XML Upload

This integration uploads attachments throughout various modules of the SAP Fieldglass application.

Connector Overview

Component

Detail

Company Type

Buyer

Version Type

API-A-V1.0

Format

XML

Prerequisites

Company Details Setting must be turned on for Integration – Attachment XML Upload

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

Predecessors

  • Credit Debit Memo

  • Invoice

  • Job Posting

  • JSON Contract

  • Miscellaneous Invoice

  • Service Confirmation

  • Statement of Work

  • SOW Credit Debit Memo

  • SOW Invoice

  • Work Order

Related Connectors

N/A

File Formatting

Data Dictionary

Field Header Name

Min/Max Occurrences

Value(s)/Format

Description/Use/Field Rules

<?xml version="1.0" encoding="UTF-8" ?>

1/1

This group element indicates the start of the entire XML file.

<DocAttachments xmlns="attachmentUpload" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost/schema/InSiteAttachmentUpload.xsd">

1/1

Group Element for the downloaded XML file.

<DocumentObject>

1/*

Group Element for each object. All values for a particular file attachment(s). This group element indicates the start of the object.

<Module></Module>

1/1

Accepted values:

  • Activity Item

  • Contract

  • Decision Form

  • Event

  • Fee

  • Invoice

  • Job Posting

  • Management Event

  • Profile Worker

  • Schedule

  • Service Confirmation

  • Statement of Work

  • Supplier

  • Work Order

  • Worker

  • Workforce

The module for which this attachment will be used.

Invoice is also used for credit debit memo, misc. invoice, SOW invoice, and SOW credit debit memo.

The following modules apply to Buyers:
  • Activity Item

  • Decision Form

  • Fee

  • Invoice

  • Job Posting

  • Management Event

  • Contract

  • Profile Worker

  • Statement of Work

  • Supplier

  • Work Order

  • Worker

  • Workforce

The following modules apply to Suppliers:
  • Event

  • Fee

  • Management Event

  • Contract

  • Schedule

  • Service Confirmation

  • Workforce

<ObjectRef></ObjectRef>

1/1

Examples:

  • ABCDJP00000001

  • ABCDWO00000002

  • ABCDTQ00000003

  • ABCDIN00000004

  • ABCDCD00000005

  • ABCDMI00000006

  • ABCDPI00000007

  • ABCDPC00000008

  • ABCDPW00000009

  • ABCDWK00000010

  • ABCDWF00000011

  • SUP1

  • ABCDSR00000012

SAP Fieldglass Job Posting, Contract, Invoice, Credit Debit Memo, Misc. Invoice, SOW Invoice, SOW Credit Debit Memo, Profile Worker, Supplier, Worker, Work Order, Statement of Work, or Service Confirmation Object Reference.

Job Seeker Object Reference can be used in place of Worker Object Reference.

<ExternalObjectRef></ExternalObjectRef>

1/1

External ID 

User supplied object reference.

<DetailItemReference></DetailItemReference>

0/1

Example:

Background check

A valid SAP Fieldglass Activity Item code that is in Pending status.

This field is only applicable for the Activity Item module.

<Revision></Revision>

1/1

Revision number

Revision number corresponding to the current Object Ref.

When the target ObjectRef has multiple revisions and the DetailItemZid is linked to a specific revision, the Revision Tag is mandatory. If no Revision Tag is provided, the system considers the latest revision of the respective ObjectRef for processing.

<ProfilePicture></ProfilePicture>

0/1

Valid values are:

  • Yes

  • No

Indicates if profile picture included. Applicable for Profile Workers and Workforce only.

<Attachment>

1/1

Group element for attachment information. This group element indicates the start of the attachment file(s) data.

<NonXMLContent>

1/*

Group element for attachment information. This group element indicates the start of the attachment file data.

<TextContent> </TextContent> 1/1

Data element for attachment file in base 64 encoding.

<SupportingInformation>

1/1

Group element for attachment file information.

<Visibility> </Visibility>

1/1

Accepted values:

  • Public

  • Private

Determines who should have visibility of the attachment.

<RestrictedViewVisibility> </RestrictedViewVisibility>

0/1

Accepted values:

  • Yes

  • No

Determines if Restricted View and Approval users can view the attachment within the application.

The company configuration Restricted work order view must be enabled.

Only applicable to modules:
  • Work Order

  • Work Order Revision

If this tag is used for other modules, the system ignores this tag.

<FileName></FileName> 1/1  

File name of attachment.

No change to the file name of the attachment will determine the file name of the uploaded file.

<Description> </Description> 1/1   Description of the attachment.

</SupportingInformation>

1/1

This group element indicates the end of the attachment file information.

</NonXMLContent>

1/1

This group element indicates the end of the attachment file data.

</Attachment>

1/1

This group element indicates the end of the attachment file(s) data.

</DocumentObject>

1/1

This group element indicates the end of the object.

</DocAttachments>

1/1

This group element indicates the end of the entire XML file.

Unique Identifier

  • Object Reference field

Assumptions/Tips

  • A DetailItemZid is an internal system identifier that isn't visible in the user interface. You can get a DetailItemZid only by running the corresponding download connector, Attachment XML Download. The download file includes the DetailItemZid, which you then use in the upload file. DetailItemZids are only required for objects that have no other externally accessible identifier.

  • Attachment files can only be added.

  • For the Service Confirmations module, objects must be in the Draft status.

  • Attachments can only be made to objects that are not in either Rejected or Closed status.

  • The maximum file size can be different for each module and is configured in the application. If a specific size is not configured for a module, the limit is defaulted to 5MB.

  • If ObjectRef is for Profile Worker or Workforce and ProfilePicture is 'Yes', attachment will be stored as profile picture. For others the attachment/module combination would behave as general attachment and not as profile picture.

  • Currently the only Activity Items with Completion Type that are supported are:

    • Add Attachment with Expiration Date

    • Add Attachment to Statement of Work

    • Add Form Attachment

    • Add Attachment to Worker

  • Supplier can't upload a Profile Picture for the Workforce module.

  • Supplier can upload attachments for Event and Fee modules only.

  • SOW and SOW Revision can only be updated in Approved status.

  • For Fee or Fee Revision on Buyer upload, the status must be Pending Approval or Approved. For Fee or Fee Revision on Supplier upload, the status must be Draft.

  • An attachment cannot be added to a reversed Event or Fee.

  • Buyer is not allowed to add an attachment to an Event. Supplier can only add attachment to an Event if the Event status is Created.

  • Regarding Visibility: If you run the upload from the supplier, only attachments that are public or private to suppliers should be allowed to be uploaded. If you run the upload from the buyer company, only attachments that are public or private to the buyer should be allowed to be uploaded.

  • Buyers cannot upload attachments to workforce records if 'Allow Buyer to add Workforce' flag is set to false.

  • Buyers cannot upload attachments to workforce records if they are not the creator of the workforce record.

Errors

The following errors can occur when processing this upload file:

Possible Errors and Resolutions

Error Message

Resolution

Activity Item Completion Type is not supported. Only {0}{1}{2} and {3} Completion Types are supported.

The activity item referenced in the DetailItemReference or DetailItemZid column uses a completion type that is not supported by the Attachment XML Upload. Verify the Activity Item definition and ensure it uses a supported completion type (Add Attachment with End Date, Add Attachment, or similar).

Attachment cannot be processed as the DetailItemReference {0} is not in Pending status.

The activity item identified in the DetailItemReference or DetailItemZid column does not have a status of Pending. Only Pending activity items can receive attachments via this upload. Verify the activity item status in the system before re-uploading.

Attachment cannot be processed as the object Id {0} is not in a valid status.

The document object identified in the ObjectRef column is in a status that does not allow attachments. Status requirements vary by module: SOW and SOW Revision must be in Approved status; Fee or Fee Revision uploaded by a buyer must be in Pending Approval or Approved status; Fee or Fee Revision uploaded by a supplier must be in Draft status; Event or Schedule uploaded by a supplier must be in Created status. No module may be in Rejected or Closed status. Verify the status of the record in the ObjectRef column and ensure it meets the module-specific status requirement before uploading.

File Name is required.

The FileName element is missing for one or more attachment records. Enter a valid file name in the FileName element of the XML file.

Invalid value for Revision.

The value in the Revision element is not a valid integer. Enter a numeric value in the Revision element, or leave it empty to use the latest revision.

Invalid value for Visibility.

The value in the Visibility element is not a recognized visibility type (Public, Private, or Restricted). Enter one of the accepted values: Public, Private, or Restricted in the Visibility element.

Invalid values for DetailItemReference.

The value in the DetailItemReference element does not match an active onboarding activity item code for this company. Verify the activity item code in the DetailItemReference element exists and is of onboarding type.

Invalid values for DetailItemZid.

The value in the DetailItemZid element does not correspond to a valid or pending activity item for this record. Verify the DetailItemZid value matches an active, pending activity item associated with the parent document.

Invalid values for DocumentExpirationDate.

The DocumentExpirationDate element is not supported for Activity Item module records. Remove the DocumentExpirationDate element from Activity Item attachment rows.

Invalid values for Module.

The value in the Module element is not a valid module name, or the module is not supported for the current user type. Enter a valid, supported module name in the Module element. Buyers may use: Worker, Work Order, Job Posting, Invoice, SOW, Master Contract, Pre-Approval, Activity Item, Pay Terms Fee, Workforce, Pay Terms Management Event, Pay Terms Event. Suppliers may upload attachments for Event, Fee, and Schedule modules only.

Invalid values for ObjectRef.

The value in the ObjectRef element does not match an active record of the specified module, or the object reference is in an unsupported format for the Activity Item module (only Worker, Work Order, Candidate, and SOW parent objects are supported for activity items). Verify the ObjectRef value matches an active record for the module specified.

Invalid XML Format specified in the file

The XML in the upload file cannot be parsed. The file structure does not conform to the expected DocAttachments XML schema. Correct the XML format and re-upload the file.

Missing data for DetailItemReference.

The DetailItemReference element is required when uploading attachments for an Activity Item and no DetailItemZid is provided. Enter the activity item code in the DetailItemReference element, or provide a DetailItemZid value.

Missing data for FileName.

The FileName element is required for each attachment. Enter the file name in the FileName element of the XML file.

Missing data for Module.

The Module element is required. Enter a valid module name in the Module element.

Missing data for ObjectRef.

The ObjectRef element is required for this module type. Invoice, Activity Item, Pay Terms Event, and Pay Terms Fee records require ObjectRef to be present. Enter the object reference value in the ObjectRef element.

Multiple Workers with the same {0} exist.

The ExternalObjectRef value in the ExternalObjectRef element matches more than one worker record in the system. Use the ObjectRef element (internal reference ID) to identify the worker uniquely, or ensure the external reference value is unique for the worker.

Revision must be the latest approved version of the contract.

The revision specified in the Revision element for a Master Contract does not correspond to the latest approved version of the contract. Use the latest approved revision number in the Revision element. Applies to supplier users uploading to a Master Contract.

Revision must be the latest contract version that has a status of Pending Approval, Approval Paused, or Approved.

The revision specified in the Revision element for a Master Contract is not the latest version, or the contract is not in a valid status (Pending Approval, Approval Paused, or Approved). Use the latest contract revision with an eligible status. Applies to buyer users uploading to a Master Contract.

{0} is not associated to {1}.

The activity item code in the DetailItemReference element is not associated with the document object identified in the ObjectRef element. Verify that the activity item is assigned to the correct worker, work order, candidate, or SOW before uploading.