Manage Item Attachments by Import
In addition to importing items, you can also import and upload the attachments related to the items to Product Hub. Attachments may include digital assets such as images, PDF files, and videos. You can also update and delete existing attachments by using import.
You can import item attachments by these methods:
-
File-based data import (FBDI)
-
Import maps
In addition to importing attachments, you can also add attachments to items using REST APIs as described here.
For the files that are to be imported as attachments, you can provide them to the import process by either:
-
Compressing the files into a compressed file (recommended for ongoing incremental attachment imports)
-
Uploading the files to Oracle WebCenter Content (recommended for initial migration or large volume attachments import for best performance. Note that any user with direct access to Oracle WebCenter Content and the FAFusionImportExport security group will be able to view all files in WebCenter Content.)
For the compressed file method, each compressed file must not be more than 500MB. If your compressed file size is larger than 500MB, then you should split it into multiple files. Each item batch must not have more than 5 to 10 compressed files and less than 5000 attachments should be imported per item batch. Including compressed files within compressed files is not recommended.
Identify Documents in Oracle WebCenter Content
If you have uploaded your attachment files to Oracle WebCenter Content, you need to identify the attachment documents to be imported.
To identify your attachments, use the GET_SEARCH_RESULTS search service of the Core Content Server for Oracle WebCenter Content to obtain the values of these attributes of an uploaded file:
File Attribute to obtain |
Use attribute value for |
---|---|
dDocName This value also appears in the Content ID field of the user interface of WebCenter Content. |
The value of Document ID in FBDI template spreadsheets and in import maps. |
dID |
The value of Document Version Number in FBDI template spreadsheets and in import maps. |
Manage Attachments with File-Based Data Import
You can import, update, and delete attachments to items, item revisions, and trading partner items using file-based data import (FBDI).
-
Identify the source of your attachment files, in Oracle WebCenter Content, or in a compressed file.
-
Refer to the Oracle Fusion Cloud SCM: File-Based Data Import for SCM guide for more information about using FBDI to load data into interface tables and product tables. Use the spreadsheet template file for item import to specify your item data and item attachment data.
-
In the downloaded template file
ItemImportTemplate.xlsm
, specify your item attachment data in the EGP_ITEM_ATTACHMENTS_INTF sheet. The template file includes formatting details and example values.Column Name
Column Description
Transaction Type
Indicates the action (CREATE, UPDATE, SYNC or DELETE) to be performed. If you're not sure whether an attachment for an item exists, use SYNC, which updates existing attachments or creates attachments if necessary.
Batch ID
The ID of the item batch that's to be used for importing attachments.
Batch Number
The number of the item batch that's to be used for importing attachments.
Item Number
The item number of the item to which the attachment is to be attached.
Organization Code
The organization of the item.
Revision
The item revision to which the attachment is to be attached.
Source System Code
The external source system from which data is being imported.
Source System Reference
The Spoke System Reference data or the Item Name from the external source system.
Trading Partner Item Number
The item number of the trading partner item being attached.
Trading Partner Number
The number of the trading partner providing the attachment.
Entity Type
The entity for which the attachment is to be imported: Item, Item Revision, Customer Item, Competitor Item, Supplier Item or Manufacturer Part Number.
Batch Doc Name
The name of the compressed file containing the attachments to be imported.
Attachment Category
The category of the item attachment being imported. Examples: Image, Miscellaneous.
If the attachment category of an existing attachment is changed to another attachment category with the Primary attribute set to Yes through import, and a primary attachment already exists for that attachment category on the item, then the attachment being imported will be set as the primary attachment after successful import. The Primary attribute of the existing attachment will be unchecked after successful import.
File Type Name
The type of attachment being imported. Values are: File, Repository File/Folder, URL, or Text.
File URL Text
The file name or URL of the file to be attached to an item.
Document ID
The ID in Oracle WebCenter Content of the document to be imported.
Document Version Number
The revision number in Oracle WebCenter Content of the document to be imported.
Title
The title of item attachment being imported.
Shared
Indicates whether the attachment is a shared attachment.
Primary Category Flag
Optional. Marks the attachment category as primary for the attachment. For example, if there are multiple item images attached to an item, the primary image appears first when you view that item.
New Attachment Category
The new category of the item attachment being updated by import.
New File URL Text
The name of the updated file or URL to be attached to an item.
New Title
The new title of the updated item attachment being imported.
-
If you're importing item attachment files that were uploaded to Oracle WebCenter Content:
-
Select
Repository File/Folder
in the File Type Name column. -
Either do this:
-
Batch Doc Name: Leave the column empty.
-
Document ID and Document Version Number: Specify the values.
Or this:
-
Batch Doc Name column: Specify the name of the compressed file.
-
Document ID and Document Version Number: Omit the values.
-
-
-
Generate a
.csv
file from the template. -
Upload the
.csv
file, and the compressed file containing attachments (if you're using one), to the accountscm/item/import
.The size of the compressed file should be kept under 2 GB.
-
In the Scheduled Processes work area:
Schedule the process Load Interface File for Import to load the attachment data to the interface tables.
Schedule the process Item Import to import the attachments from the interface tables to the product tables.
-
During import:
-
If you provided the attachment files by uploading them to Oracle WebCenter Content, then the files with the specified Document ID and Document Version Number from WebCenter Content are added to the item, item revision, or trading partner item as attachments.
-
If you provided the attachment files using a compressed file, then the files from the compressed file are extracted and added to item, item revision, or trading partner items as attachments.
-
Manage Attachments with Import Maps
You can import, update, and delete attachments to items, item revisions, and trading partner items using an import map.
-
Identify the source of your attachment files, in Oracle WebCenter Content, or in a compressed file.
-
Create an import map and map the columns of the source data file to the attachment attributes listed in this table, in the Attachment node in the Master Data region of the import map.
You can't save an import map as external if any one of these attachment attributes are mapped: New Category, New File Name, or New Title.
Attachment Attribute
Attribute Description
Attachment Entity
The entity for which the attachment is to be imported: item, item revision, customer item, competitor item, supplier item or manufacturer part number.
Category
The category of the item attachment being imported.
If the attachment category of an existing attachment is changed to another attachment category with the Primary attribute set to Yes through import, and a primary attachment already exists for that attachment category on the item, then the attachment being imported will be set as the primary attachment after successful import. The Primary attribute of the existing attachment will be unchecked after successful import.
Description
The description of the item attachment being imported.
Document ID
The ID in Oracle WebCenter Content of the document to be imported.
Document Version Number
The revision number in Oracle WebCenter Content of the document to be imported.
File Name
The file name or URL of the file to be attached to an item.
File Type
The type of attachment being imported. Values are: File, Repository File/Folder, URL, or Text.
New Category
The new category of the item attachment being updated by import.
New File Name
The name of the updated file or URL to be attached to an item.
New Title
The new title of the updated item attachment being imported.
Primary
Optional. Marks the attachment as the primary attachment. For example, if there are multiple item images attached to an item, the primary image appears first when you view that item.
Sequence
Optional. Marks the sequence of the attachment. For example, if there are multiple item images attached to an item, the image appears on the item in the indicated sequence when you view that item.
Shared
Indicates if the attachment is shared with another entity.
Title
Title of the item attachment being imported.
Transaction Type
Indicates the action (CREATE, UPDATE, SYNC or DELETE) to be performed during import.
To delete an existing attachment by import, select DELETE.
To update an existing attachment by import, select UPDATE.
If you're not sure whether an attachment for an item exists, use SYNC, which updates existing attachments or creates attachments if necessary.
-
Create an item batch.
-
If your attachment data is in a compressed file, select the Upload from File action and upload the item data file and the compressed file containing item attachments to be imported.
-
If your attachment data is in Oracle WebCenter Content, map the source data columns to the master Document ID and Document Version Number attributes in the Attachment node of the Attributes table in the Master Data region. Then select Upload from File from the Actions menu and upload the item data file to be imported.
-
-
Submit the batch to import the item attachments.
Manage Existing Attachments
After importing new attachments, you can update or delete existing attachments using either file-based data import (FBDI) or import maps.
To update or delete existing attachments, the high-level tasks are:
-
Decide whether to import by FBDI or by import map. This may have been decided by your previous imports.
-
Identify each existing attachment to be updated or deleted.
-
Set the import Transaction Type for the attachment to UPDATE, DELETE, or SYNC. SYNC updates an attachment if it exists, or creates a new attachment if it doesn't exist.
-
If updating the attachment, provide the new attachment's category, file name, and title.
The task details are provided in this table:
Task |
FBDI |
Import map |
---|---|---|
Identify the existing attachment |
Verify the correct values for the columns:
See the identification logic in the next table. |
Verify the correct values for the columns:
See the identification logic in the next table. |
Update the existing attachment |
Set Transaction Type to UPDATE or SYNC Provide values for the columns:
|
Set Transaction Type to UPDATEor SYNC Provide values for the attributes:
|
Delete the existing attachment |
Set Transaction Type to DELETE |
Set Transaction Type to DELETE |
-
To update an existing attachment of the File or Repository File/Folder attachment type by uploading a new file, you should use only the compressed file import method.
-
To create or update a particular attachment of Repository File/Folder attachment type, you should specify the attachment title and description in only one row of the data file and not all rows.
The identification logic for updating or deleting existing attachments depends on the type of the attachment, as described in this table:
Attachment Type |
Identification Logic |
---|---|
File Repository File/Folder URL |
The existing attachment will be identified during import using a combination of these attributes:
If no attachments are found with that combination, then the import process fails. If multiple attachments are found with that combination, then the attachment title is also used for identification. If multiple attachments are still found with that expanded combination, then the import process fails. |
Text |
The existing attachment will be identified during import using a combination of these attributes:
If no attachments are found with that combination, then the import process fails. If multiple attachments are found with that combination, then the import process fails. |
Import Shared Attachments
You can share the same attachment among multiple items
The high-level process for importing shared attachments is:
-
Designate an attachment on an existing item as shared.
-
Import attachments to other items by referencing the sharing data from the source item.
The detailed process for importing shared attachments is:
-
For the item that's the source of the attachment to be shared, create a shared attachment through either of these ways:
-
On the Attachments tab of the item, select Shared.
. In the Details pane for the attachment, select -
Perform an attachments import using the compressed file method that's described elsewhere in this topic. Be sure to select Shared when importing the first attachment.
-
-
For the other items that are sharing the attachment, create an attachment in each item, using the data listed in the following table, either through an import map or by FBDI item import.
-
For import maps, map the attributes.
-
For FBDI item import, pass the attribute values in the data template file (on the EGP_ITEM_ATTACHMENTS_INTF sheet of the
ItemImportTemplate.xlsm
file).
Attribute
Value
Shared
Yes
File Type Name
Repository File/Folder
File URL Text
The name of the attachment file in the source item
Document ID
In WebCenter Content, the ID (dDocName) of the attachment file in the source item
Document Version Number
In WebCenter Content, the version number (dID) of the attachment file in the source item
-
Import Specific Entities
When importing specific entities, you need to provide specific information for certain entries.
You need to provide some specific information when importing:
-
Item images
-
Item revision attachments
-
Trading partner item attachments
-
Attachment descriptive flexfields
Attachment Entity |
FBDI Template File |
Import Map |
---|---|---|
Item images |
Enter |
Enter Image in the Category column. |
Item revision |
Enter the specific item revision in the Revision
column, and select |
Map the source Revision column to the master data column.Map the source Attachment Entity column to the master column.Specify ITEM_REVISION in the source file column that maps to the attribute. |
Trading partner item |
Enter the trading partner item data in the Trading Partner Item Number and Trading Partner Number columns and specify CUSTOMER_ITEM, COMPETITOR_ITEM, SUPPLIER_ITEM or MANUFACTURER_PART_NUMBER in the Entity Type column. |
Map the source TPI columns to the master |
Descriptive flexfields |
Enter the Descriptive Flexfields values in the attachment Descriptive Flexfields columns. |
Map the source Descriptive Flexfields columns to the master Descriptive Flexfields attributes in . |
Add Attachments Using REST API
You can use REST APIs to add files in Oracle WebCenter Content as item and item revision attachments, and as product attachments.
-
Upload your attachment files to Oracle WebCenter Content.
-
Identify the source of your attachment data, in Oracle WebCenter Content, using the GET_SEARCH_RESULTS search service of the Core Content Server for Oracle WebCenter Content to obtain the values of dDocName and dID for an uploaded file.
-
Once the files are uploaded to Oracle WebCenter Content, you can use the dDocName and dID to:
-
Use the POST action on the Item Attachments child-resource of the Items Version 2 REST API to add the files as item level attachments.
-
Use the POST action on the Item Revision Attachments child-resource under the Item Revisions child-resource of the Items Version 2 REST API to add the files as item revision level attachments.
-
Use the PROCESS action of the Product Uploads REST resource to add the files as product attachments.
The Product Uploads REST API uses import maps to upload the data from the source data file to the staging interface tables. When calling the Product Uploads REST API, you need to specify:
-
The import map to use for uploading the data to staging interface tables.
-
The Oracle WebCenter Content location of the source data file (CSV or XML) containing the item data. You can upload the source data file to the
/scm/item/import/
account. -
Either:
-
The Oracle WebCenter Content location of the compressed file containing attachment files. You can upload the compressed file to the
/scm/item/import/
account. Using a compressed file is recommended. -
An import map in which you have mapped the Document ID and Document Version Number attributes.
-
-
-
During the POST or PROCESS action, the file with the specified dDocName and dID from Oracle WebCenter Content is added to the item as a non-shared attachment.
-
The user who uses these REST APIs should be the same user who uploads the files to Oracle WebCenter Content.
-
-
Refer to the REST API for Oracle Fusion Cloud SCM guide for more information about using these REST APIs.
- Oracle Fusion Cloud SCM: File-Based Data Import (FBDI) for SCM
- REST API for Oracle Fusion Cloud SCM
- GET_SEARCH_RESULTS search service of the Core Content Server, in the Oracle Fusion Middleware Services Reference for Oracle WebCenter Content guide
- Video: Import Item Attachments Using Manage Item Batches