How to set up Import Files

Import Files supports 3 modes of uploading files, these are:

  1. Upload from file on your PC/Mac
  2. Copy/Paste
  3. Email to Salesforce

In order to use the Import Files email-to-salesforce, you will need to setup the following:

  • An Apex Email Listener for the importFileEmailListener Class

This procedure takes you through how to setup the email listener.

1. Add a New Email Service

Under Setup > Develop > Email Service.  Click the New Email Service button

2. Link Email service to importFileEmailListener

Link Email service to importFileEmailListener
  1. Ensure you link the service to the Apex Class: importFileEmailListener
  2. Accept all attachments
  3. Put authorized individual emails and/or your companies domain here.  If the email is forwarded from a different email then it will not be accepted.
  4. Re-queue if you go over your daily limit
  5. Enable Error Routing
  6. Send any errors to a support person in your organization.

Press Save and New Email address

3. Save the email address

Save the email address

4. Copy email address for use

This is the email address that you can email details into

5. Send a test email

Send an email to the email address created in the previous step.

TIP:  If you include in the body of the email "AAkPay__Import_Type__c: XXXX" where XXXX is the Import File objects - Import File Type picklist value, then this is the value that will be used for the upload.

For the technically minded, if you use the api_file_name:xxxx then this will work upload/apply this value for any field on the Import File Object