CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
eduard_stelle
Employee
Employee


Hi C4C community,

 

This blog post explainins how to import attachments with the Data Workbench. Please make yourself familiar with the SAP Hybris Cloud for Customer Data Workbench User Guide and the Data Workbench FAQ before you start with the import of attachments with the Data Workbench.

 

Steps to perform

1. Navigate to the WCView Import in WoC Data Workbench and select option Import Attachment.

Select an object for which you want to import attachments and download the manifest file for the selected object.



 

2. Rename the downloaded file to manifest.csv and save it in a folder where the attachments are located that you want to upload.



 

3. Open the downloaded file in MS Excel to maintain the records.

The header of the CSV file is clubbed in the first column. In order to split it to the columns, select the first column and select function Text to Columns in the Data tab.



 

4. In the first step of the wizard select file type Delimited, and select Comma as delimiter in the second step. Confirm the wizard by pressing Finish.



 

Recommendation: Excel tries to interpret your data and apply a format accordingly. In most cases when you are dealing with upload file, you don't want any formatting. To avoid that, I recommend to select all cells (by clicking on the upper left corner), select option Format Cells in the context menu (right click on any selected cell) and select Category Text in the first tab.



 

5. Now you can fill the manifest file with the data for your attachments, 1 record per attachment.

Check the Data Workbench User Guide for details on how to use the fields [...]ExternalKey and [...]InternalID.



 

TypeCode: Type of the attachment. TypeCode for type Standard Attachment is 10001. If you want to use one of the other type available for Account attachments, check the list of attachment type codes at the end of the blog post.



AttachmentName: Name shown in the attachment list in C4C.


MimeType: Media type of the attachment file. You can check and maintain the list of allowed MIME types in your C4C tenant in the business configuration activity Allowed MIME Types for Document Upload.


Path: Path to the attachment file relative to the manifest file in the archive, with "/" as path separator.


Example: In my example the attachment file "1000290_attachment1.jpg" is in a subfolder "Files" relative to the manifest file. Therefore I need to specify  the path as "Files/1000290_attachment1.jpg". If the file would reside next to the manifest file, I would need to specify the path as "1000290_attachment1.jpg".


 

6. Once all records are maintained, save the file in a CSV format.

In many cases Excel delimits the values in CSV files with a semicolon, but for the Data Workbench the delimiter must be comma. Therefore open the saved file with an text editor (e.g. Notepad), replace all semicolons by commas and save the file.

Note: Name of the manifest file must be "manifest.csv".



 

7. Create a zip archive containing the manifest file and the attachments.

Important: The size if the zip archive must not exceed 100 MB, and size of each attachment must not exceed 10 MB.



 

8. Navigate again to the WCView Import in Worcenter Data Workbench and select option Import Attachment, select the object for which you downloaded the manifest file in step 1 go to the next step.

Upload the zip archive and review the sample records.




 

9. In the next step you can change the task name of the import run and trigger the import.

 

10. The import runs asynchronously. In order to check the status of the import, navigate to the WCView Monitor.

Once the import run is completed, the status changes from In Process to Finished. You need to refresh the view manually, by pressing the Refresh button.

Inthe list you see the total number of records, successfully uploaded and erroneous records in the import run. In case of errors, you can click on the number to get a list of errors. For details check Data Workbench User Guide.



 

11. The last step is a spot check if the import really worked. Navigate to the attachments section of the object you specified in the manifest file and check if the file is uploaded correctly and has the specified name.



 

 

Available Attachment Type Codes

Note: Many type codes can be used only for specific objects. Check in the object if the used type codes are permitted for the object. Otherwise the import will run into an error. In the error CSV file, which you can download from the monitor, you can check the processing error and correct your manifest file.

You can lookup the list in your C4C development tenant with the Repository Explorer in the Cloud Applications Studio (PDI), Data Type: DocumentTypeCode (Namespace http://sap.com/xi/AP/Common/GDT)

 

 


































































































































































































































































































































































































Code Value



Description



10001



Standard Attachment



10002



Original Document



10003



Incident Context



10004



Curriculum Vitae



10005



Policy



10006



Certificate



10007



Skills Profile



10008



Requirements Specification



10009



Summary



10010



Employee Image



10011



Product Image



10012



Thumbnail



10013



Image



10014



Graphical Instruction



10015



Technical Drawing



10016



Business Partner Image



10017



Business Card



10018



Product Specification



10019



Application



10020



Protocol



10021



Job Description



10022



Inspection Instruction



10023



Inspection Method



10024



Sample-Drawing Instruction



10025



Certificate of Analysis



10026



Technical Delivery Terms



10027



Quality Assurance Agreement



10028



Finding



10029



Plain Invoice Text



10030



System Status Information



10031



Product Safety Sheet



10032



Manual Visit Report



10033



Catalog Data



10034



Catalog Pictures



10035



Specification & Results



10036



CAD Viewable



10037



Primary CAD Viewable



10038



Confidential



10039



Incoming Messsage/File



10040



Outgoing Message/File



10041



Technical Service Parameters



10042



Product Requirement Specification



10043



Details for Supplier



10044



Invoice



10045



Deliver Note



10046



Export accompanying document (EAD)



10047



Multimedia



10048



Web Document



10049



Maps



10050



News



10051



Web Page



10052



Maps



10053



Search Engines



10054



DATEV Header File



10055



DATEV Postings File



10056



DATEV Customer Masterdata File



10057



DATEV Supplier Masterdata File



10058



DATEV Account Masterdata File



10059



Manual



10060



FAQ



10061



Best Practice



10062



Manual



10063



Guideline



10064



Declaration File



10065



Itemized List



10066



Proof of Export



10067



Export Message File



10068



Internal Attachment



10069



WEKTRA Help Document



10070



Marketing Information



10071



Project Document



10072



Warehouse Confirmation



10073



IT Administration Script



10074



Contact data



10075



Inventory Notification



10076



Pro Forma Invoice



10077



Quality Assurance Document



10078



Avatar Image



10079



Account-Specific Attachment



10080



Employee-Specific Attachment



10081



House Bank-Specific Attachment



10082



Supplier-Specific Attachment



10083



Tax Authority-Specific Attachment



10084



Centrally Scanned Document



10085



Campaign Export File



10086



Graphical Signature of Seller



10087



Graphical Signature of Buyer



10088



Graphical Signature of Empl. Responsible



10089



Questionnaire Style Document



10091



Analytical Report Subresult



10092



Graphical Signature of Payer



10093



Graphical Signature of Recipient



10094



Graphical Signature of Agent



10095



Graphical Signature of Technician



5 Comments