Skip to main content

File Transfer Protocol & WinSCP

What is FTP?

-FTP in a method used to transfer files between systems over a network. In SFMC, FTP is commonly used to:

  1. Import Subscriber Data into Data Extension
  2. Export Tracking reports and subscriber Data
  3. Upload Files for Email Campaigns
  4. Exchange Files between external System and SFMC
  5. Automate Data Transfer

SFMC provides Safehouse FTP (Enhanced FTP) where files are stored securely before being imported or exported.

Example: A company uploads CSV file containing customer information to SFMC FTP. SFMC imports this file into a Data Extension automatically using Automation Studio

How to create users in FTP account?

Admin permission>> Open Setup>> Data Management>> FTP Accounts>> Add new FTP user>> Enter user details>> Save

What is WinSCP and how do you access it in your system?

-WinSCP stands for Windows Secure Copy Protocol. It is free file transfer software used to securely transfer files between a local computer and a remote server.

WinSCP works like a gateway for Local computer and SFMC enhanced FTP. 

Link to download: https://winscp.net/eng/download.php

Image 1:

In the image below, you will see the Set up page, from the left menu you are in Setup> Data Management> FTP Accounts

Here's what the section mean:

Host- mcbn59q90grl4-c77svccmld863y.ftp.marketingcloudops.com >> This is the FTP server address(Host Name) you enter in WinSCP to connect to SMFC (Image 2 as reference where you enter the details)

Port: 22 >> Port 22 means SFMC uses SFTP(Secure File Transfer Protocol) which is more secure than standard FTP

Users/FTP Username: (Example - 515015159-2/ 515015159) >> These are FTP usernames used to log into SFMC FTP

Status: Enabled >> Indicates the FTP account is active

Address >> Email linked to the FTP user

Password Expiration date: Never Expires >> Password doesn't expire automatically

*The image 1 & 2 are important because these credentials are used to upload or download files between SFMC and external system.


Image 1

Image 2

How these details are used in WinSCP?

>> When connecting in WinSCP, you'd use:


After login, you can upload/download CSV files for import, exports, and automation.


Image 3 shows WinSCP trying to connect to SFMC Enhanced FTP(SFTP)

Left panel>> Files on local computer(your system)
Right Panel>> Files/Folder on the remote server (SFMC FTP) after connection
Connecting to host/Connecting to server popup>> WinSCP is establishing connection to SMFC FTP using- Host name, Port 22, Username, Password.

Image 3


Image 3 page is used to >> Upload CSV/TXT files into SFMC, Download exported reports from SFMC, Move files for Automation Studio Imports, Verify FTP connection works

Workflow on how a file moves from external system into SFMC using FTP and WinSCP

SFMC FTP credentials (Setup>FTP accounts) >>Enter credentials in WinSCP>> Connect to Enhanced FTP>> Upload File(CSV)>> Automation Studio imports data into Data Extension

Image 4 & 5 were the errors/ messages I received when connecting to host/ server:

Image 4

*This appeared because its  the first time WinSCP is connecting to that SFMC FTP server or the Server host key hasn't been saved before

                                                                              Image 5

*After selecting "Accept" in image 4, received error shown in image 5. This error "Host key wasn't verified" mean, the connection did not complete. (In this scenario, i did not enter the username & password. Just entered the host name)

Possible reasons: Wrong FTP username/ password, Host Key not accepted, Incorrect Host/ Server name, Wrong Protocol or port(Protocol should be SFTP and port should be 22), User lacks FTP permission

How to fix the error?
            
Summary: 

FTP (File Transfer Protocol) in Salesforce Marketing Cloud is used to securely transfer files between external systems and SFMC for imports, exports, and automated data processing. SFMC provides Enhanced FTP (SFTP) as a secure storage location for these file transfers.

WinSCP is a file transfer application used to connect to SFMC Enhanced FTP using SFTP and port 22, allowing users to upload, download, and manage files. These files can then be processed automatically through Automation Studio and loaded into Data Extensions.

Together, FTP + WinSCP + Automation Studio enable secure, efficient, and automated data movement in SFMC, reducing manual effort and supporting marketing operations such as subscriber updates, report generation, and campaign data management.

Key takeaway:

FTP = Secure file storage & transfer
WinSCP = Tool to access SFMC FTP
Automation Studio = Automates processing of uploaded files

Comments

Popular posts from this blog

A/B Testing

Confluence link 1:  https://elearningit24.atlassian.net/wiki/external/MzA3YWUxNjI3YzBkNGZiZmFlZTc1ZGIzYmU1ZmM1MmQ   What is A/B Testing? A/B testing, also known as split testing , is a controlled experiment where two versions of a webpage, email, ad, or any digital asset are tested against each other to determine which one performs better. Why? Higher open rates Better Engagement Increased Sales and Lead conversion Reduced unsubscribed rates Date Driven- No assumption & Proven Results Test Type Subject Line Email Content Area From Name Send Date & Time Pre Header   Email Test Template: Friendly and Personalised Straight to the point & Action Oriented Confluence Link 2:  https://elearningit24.atlassian.net/wiki/external/NDk0Zjg0ODk3YjAwNDI5ZjkxOTVmMTAxNTQ3ZjlhNmQ Subject Line A/B Test: A/B Testing Use Case: Optimizing Email Subject Lines for Higher Open Rates Scenario- Subject Line: A company wants to increase the open rates of its promotional emails in Sa...

Email Marketing Campaings

Use Cases of Standard Data Extensions 1. Customer Data Storage Scenario : A retail business wants to store customer information, such as names, email addresses, and purchase history, for email marketing campaigns. Solution : Use a standard data extension to store and manage customer data securely and efficiently. Data Extension Structure Field Name Data Type Length Required Primary Key SubscriberKey Text 50 Yes Yes FirstName Text 50 Yes No LastName Text 50 Yes No EmailAddress EmailAddress N/A Yes No PurchaseHistory Decimal N/A No No Sample Records SubscriberKey FirstName LastName EmailAddress PurchaseHistory 001 John Doe john.doe@example.com 1500.50 002 Jane Smith jane.smith@example.com 200.00 https://mc.s8.exacttarget.com/cloud/#app/Email/C12/Default.aspx?entityType=none&entityID=0&ks=ks%23Subscribers

SQl Query

  Workflow: Journey Builder> Automation Studio> New Automation Enter Query: Drag and drop Schedule in  Start with a Starting Source and the SQL Query> Choose Query> Create New Query Activity> Name your file and add your query (Field name thats part of the DE you create separately- Example: FirstName, LastName, Subscriber Key) Create a new DE in Email Studio with the query field> Select The test DE which was created: Select Target DE and Save & Run Workflow: Select All Activities and Run Workflow: Activity Details: Run Completed with updated DE Edit/ add another query: Copy Source DE and create a new DE with same fields that we are running in SQL: Run the updated SQL Query added Activity and DE updated with Records: Completed Status: Received error: When the Query field and the DE created field does not match When an existing Query is being run, if we try to run another query Fixed the error by matching same field Waiting for existing query to complete