Skip to Content

Business Context

In Cloud for Customer projects the migration of data is an important aspect. C4C provides the tooling to migrate data from legacy systems into Cloud for Customer. When a customer is moving from their legacy CRM system to C4C, there is usually quite a history of customer information in the form of e-mail messages, contracts, or any other kind of documents. Obviously this history contains valuable information and needs to be available for salesreps to serve their customers.

Documents.jpg

Until recently you had to write your own program and make use of web services in order to mass upload documents and assign them to the accounts in C4C.

Recently SAP has added new functionality to C4C to mass upload documents and assign them, in this case, to accounts. This blog describes how to benefit from this Data Workbench functionality.


Before we can actually upload documents we first need to create an OData service to import the attachments.


Creating the OData Service


First log on as administrator in the Silverlight client.



Go to (Beta) Administrator-> (OData) Service Explorer

  • Select “Custom OData Services” from the “show” drop down
  • Create new OData service
  • Click on “New”
  • On quick create, give the service name and select the checkbox “Data Workbench Enabled”. 02 acct attachment create.JPG

Click on “Select Business Object”

  • Give the Object and the node a name and click OK


03 object and root.JPG

  • Create Entities
    • Select the line “Root” and check the Root tick box, an entity will be added to  the “OData Service” list on the right

    • Expand the “Root”, and select Attachment Folder association, an entity (CustomerAttachmentFolder) will be added to the “OData service” list. This entity name will appear in the Data Workbench “Select an Object” list with the same name.


04 OData editor.JPG

  • Provide Scheme code.
    • Go to “ID Mapping” tab, select the scheme code ERP Account
    • Select the Parent external key i.e. property with name CustomerAttachmentFolderExternalKey
  • Expand the Customer AttachmentFolder entity.

05 ID mapping.JPG

  • Click on Activate


Creating the attachment upload file

  • The documents that you want to upload should all be in one zip file. The zip file must contain a manifest file that indicates which document should be attached to which customer in C4C. In this example I have three MS Word documents that I want to attach to three different customers 06 zip.JPG


  • I have created a manifest file in Excel. The customers that I use in this file have been replicated from SAP ECC and have an external id. The first column contains the external id. The second column is the default Business Partner Document Type code. The third column is the name of the attachment that will be in the customer attachments tab in C4C.

07 manifest.JPG

  • Depending on the document, each document should contain their own MIME Type. You can find the valid MIME types in fine-tune activity “Allowed MIME Types for Document Upload”. In this example I want to upload three .docx documents so I choose: application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • Save the file as manifest.csv and make sure it uses the UTF-8 encoding
  • Save all the documents and manifest file in one zip file


Mass upload of attachments

  • Go to the C4C HTML web browser (Only Google Chrome is supported) and Import the attachments via the Data Workbench Workcenter
  • On the IMPORT tab, Select “Import Attachment”
  • Select the “Business System ID”. (System from which the Business Object data was replicated, in this case the SAP ECC system
  • From “Select an Object” list, select the entity name created in step 4b above

09 Data Workbench.JPG

  • Click on next and confirm the “Successfully Submitted” message
  • Browse for the zip file and click on Upload and on Submit

10 Upload.JPG

Now all documents are uploaded to C4C and attached to the specific accounts. In the Data Migration Workbench go to the Monitor tab to see the status of the upload

11 monitor.JPG
Go to one of the accounts and click on the Attachments tab to see the uploaded document12 account.JPG
The following scenarios for attachment upload are supported by the Data Workbench:

  1. Import of attachment for any business object which was imported via the Data Workbench, just use the Import attachment by providing the valid external key.
  2. The import of attachments for any business object that was created directly in cloud for customer is not supported via Data Workbench, for example prospects
  3. Creation of an OData service is required as explained above
  4. Import of attachments for the business object that was replicated from any other external system like SAP CRM, SAP ERP, only master data objects like Employee, Customer/Account etc. are supported.
  5. The Data Workbench Workcenter is currently (in version 15.11) only supported in the Google Chrome browser.

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Roman Richter

    Hello Guus,

    thank you for this blog!

    I have 2 questions:

    1. Is it also possible to upload attachments to objects that have been migrated via the C4C migration tool?

    2. I thought that the migration templates also provide the possibility to upload attachments. Is this not working?

    Thank you and BR,

    Roman

    (0) 
    1. Michal Kurian

      Hello Roman,

      as far as I know, you can only enter the URLs of attachements to other type of objects through migration templates. I’ve seen some people, just storing the attachements on some kind of virtual drive and put them as URLs, instead of uploading them into c4c directly. Attachments uploaded as a files can not be migrated through migration templates right now. You need to do that manually.

      However there’s a really popular topic on sap ideas portal about it. So keep your fingers Xed that it’s going to be released soon. 🙂

      https://ideas.sap.com/D21792?status_id_filter=F884CEC6-376F-4B29-BD97-A85B03034A45&current_tab=Best&row_num=6&getparameters=1

      All the best!

      (0) 
      1. Gayathri Ramachandran

        @Michal Kurian

        Can you share details on this .. How is this done?
        <<
        as far as I know, you can only enter the URLs of attachements to other type of objects through migration templates. I’ve seen some people, just storing the attachements on some kind of virtual drive and put them as URLs, instead of uploading them into c4c directly.
        >>

        Thanks
        Gayathri

        (0) 
  2. Balaswamy Kakarla

    Hi All,

    Thank you so much for the wonderful post on Attachments upload using Data Workbench.

    I am trying to upload attachment to Ticket (Service Request Attachment) using the above approach.

    Files have been uploaded to the ticket.

    /wp-content/uploads/2016/05/attachments_954555.jpg

    But when they are opened, it tells that files are empty / can’t be opened. It is same with PDF, JPG and DOCX.

    attach - empty.jpg

    Can you please advise what is missing.

    Thank you

    Kakarla

    (0) 
    1. Nikhil Pais

      Hello Kakarla,

      Were you able to solve this issue?

      It seems that only master data objects like Employees/Accounts etc replicated from an external system are supported.

      Do let me know your thoughts.

      @guus.dorenbos2 is it possible to upload attachments against service requests through this approach for Prospects maintained only in SAP C4C? Has there been any enhancement for this functionality.

      Best Regards,

      Nikhil

      (0) 
  3. Piyush Gandhi

    Hello

    Can any one recommend/suggest what is the attachment file size limit

    What is the allowed file size limit for each attachment file.

    Regards

    Thanks

    Piyush Gandhi

    (0) 

Leave a Reply