With the FTP/SFTP import, you can automatically fetch contact data and purchase data from an FTP or SFTP server into Heyloyalty. This lets you gather data from other systems and use it for segmentation, personalized campaigns and marketing automation.
In this guide, we walk through how to set up the integration, choose your import settings and map fields so your data ends up in the right place in Heyloyalty.
What value does the FTP/SFTP integration provide?
Automatic import of contact data
Transfer contact information from your external system to Heyloyalty without having to import files manually.
For example, you can fetch details such as email, phone number and customer number, so you can work with your contacts in Heyloyalty.
Use purchase data for targeted communication
With purchase data in Heyloyalty, you can work with your customers' purchase history and create more relevant communication.
For example, you can create segments based on previous purchases and use them to target campaigns at specific customer groups.
Automate your communication
Use your imported data to work with marketing automation.
For example, you can set up automatic messages for new contacts or use purchase history to target relevant communication.
Gather data from different systems
The FTP/SFTP integration is relevant if you work with a system that can export data to an FTP or SFTP server but does not have a direct integration with Heyloyalty.
That way, you can still use the data from the system in your email marketing.
Integration specifications
This section gives you a better understanding of how the FTP/SFTP integration works and what options you have.
The integration supports the following features:
- Import of contact data into a selected list in Heyloyalty.
- Import of purchase data into Heyloyalty's tracking database.
- Automatic retrieval of files from an FTP or SFTP server every 4, 8, 12 or 24 hours.
- Choice of import interval and start time for the import.
- Field mapping between the import file and data fields in Heyloyalty.
- Option to activate flows as part of the import.
Contact data
When importing contact data, information from the import file is transferred to the selected list in Heyloyalty.
This could, for example, be:
- Phone number
- Customer number
- Name
- Other relevant contact information
Which information can be imported depends on the fields in your file and the fields you have created on your Heyloyalty list.
Purchase data
You can also choose to fetch purchase data through the import.
Purchase data can be used to work with your customers' purchase history in Heyloyalty and create segments based on their previous purchases.
To use the data correctly, it is important that the fields in the import file are mapped to the relevant fields in Heyloyalty.
Automatic import
Once the integration is set up, Heyloyalty can automatically fetch files from the specified server.
You decide how often the integration should try to fetch data and at what time the import should start.
This requires that the files are located in the folder you specified in the integration and that Heyloyalty has access to the server.
Set up FTP/SFTP import
In this section, we walk through how to create the import and fill in the required settings.
Import settings
Start by going to Integrations → List integrations. Find the FTP import and click Set up integration.
Create a new FTP import to open the page with the import settings.
Here you specify which type of data you want to import, which list to use and how Heyloyalty should connect to your server.
Under Settings, fill in the following fields:
- Import Job Name: Give the import a descriptive name so you can easily identify it on the overview page. For example, “Purchase data” or “Contact import”.
- Import purchase or contact data: Choose whether the import should fetch purchase data or contact data.
- Contacts: If you choose Contacts, the import will create a contact on the list based on the file. Each line in the file must contain an email address or a mobile number that we can use to create the contact.
- Purchase data: If you choose purchase data, the data is imported as a purchase event into Heyloyalty's tracking database. You will be able to see the events in the activity feed. If you need to import purchase data, make sure a tracking integration has been created on the list; otherwise, you will not be able to select the list in the setting below.
- List: Choose the Heyloyalty list that the data should be imported into.
- Server link: Enter the address of the FTP or SFTP server where your import files are located.
- Path to the folder where the files are located: Specify the path to the folder or file. The rules for fetching files are as follows:
If the path ends in .csv, we only fetch one file.
If the path ends in /, we fetch all .csv files in the specified folder.
We only fetch CSV files that are located in the folder. - Username: Enter the username for the server.
- Password: Enter the password for the server.
- Protocol: Choose FTP or SFTP depending on the connection your server supports.
- Port: Enter the port the server uses. SFTP typically uses port 22, while FTP typically uses port 21.
When you import contact data, you must also choose Match contacts by field under the basic settings. Here, you choose the field Heyloyalty should use to identify existing contacts. This could be email, for example, if it is the unique field on the contact. If you cannot find the field you want to match contacts on, it is because it has not been created on the list.
Choose import settings
Under Import settings, you decide when Heyloyalty should fetch your files and how the data should be processed. The available import settings differ depending on whether you choose purchase data or contact data.
First, we describe the import settings for purchase data. The following settings must be filled in:
- FTP Import Interval: Choose how often Heyloyalty should fetch data from the server. You can choose between every 4, 8, 12 or 24 hours.
- Start Time: Choose the time at which the scheduled import should start. The interval will then run from that point.
- Delimiter, the character that separates data in your file: Specify the character that separates the values in the import file. If your file uses a semicolon, you must enter
;. This applies, for example, to CSV files. - Date format: Specify the date format if the file contains dates that must be interpreted in a specific format.
- Send active automations: Choose whether the import should trigger active flows in Heyloyalty. If you choose No, the import will not trigger active flows through this setting.
- Send any errors in the import file to: Enter the email address that should be notified of any errors in the import.
If you choose to import contact data, you get a few more import settings. You still need to fill in the import settings for purchase data described above, but you must also fill in the settings below:
- Import type: Choose how the import should process the contacts in the import file. Choose between the following:
- Update or create: Existing contacts are updated, and new contacts are created.
- Create contacts: The import only considers new contacts and creates them.
- Update only: The import only updates contacts that already exist on the list. No new contacts are created.
- Managing Contact Duplicates: Choose how the import should handle duplicates in the import file. You can choose between the following:
- Import no duplicates: If there are duplicates in the matched field, they are not imported.
- Import first duplicate: If there are contacts with the same value in the matched field, only the first one found in the file is imported.
- Import all: All contacts in the file are imported, even if there are duplicates.
- Character that separates options: Specify the character that separates multiple values in the same field, if your import file contains fields with multiple options.
- Avoid subscribing currently unsubscribed contacts: Choose Yes if contacts who have previously unsubscribed should not be subscribed again as part of the import.
- Send active automations: Choose whether the import should be able to trigger existing flows in Heyloyalty. Choose Yes if relevant flows can be sent to the contact, or No if they should not be triggered by the import.
- Send webhooks: Choose whether webhooks should be sent in connection with the import. Choose Yes to enable the feature or No to disable it.
- Send any errors in the import file to: Enter the email address that should be notified of any errors in the import.
Map fields between the import file and data fields in Heyloyalty
Under Field mapping, you decide how the information from your import file should be placed in Heyloyalty. The field mapping differs between contact data and purchase data.
If you choose to import contact data, the field mapping shows the fields from the selected list. If you import purchase data, the field mapping shows the standard fields from Heyloyalty's tracking.
On the left side of the field mapping, you see the fields in Heyloyalty. Next to each field is an input field where you enter the name of the column in your FTP file whose value should be transferred to that field.
For example, if you have the field email in your import file, you can map it to the Email field in Heyloyalty and choose Overwrite with.
On the right side, you can choose Field type. The different types mean the following:
- Overwrite with: Used to transfer the value from the import file to the selected field in Heyloyalty.
- Ignore: Used if a field from the import file should not be imported.
- Fixed Value: Here, you can enter a fixed value in the input field that will be set in the Heyloyalty field during the import.
If a field does not appear in the mapping, it is because it has not been created on the list or in the tracking. You can read how to create fields on the list here. If you need to create fields for tracking, they must be added as custom fields on the tracking integration. You do this by going to the tracking integration and clicking the three dots in the top right corner. Here, you choose Add custom fields. Then click the three dots next to the list and choose Edit fields. If the list is not in the overview, click New tracking and choose the list. Here, you can add new tracking fields, which will then be available on the FTP import for purchase data.
Save the integration
Once you have filled in the settings and reviewed your field mapping, you need to save the integration. Click Save integration.
If you want to check that data is imported correctly, you can run a manual import. Read how to do it in the Manual import section below.
From the integration overview, you can use the three dots to edit, copy or delete the import.
Check your import
Once the integration has had a chance to fetch a file, we recommend that you check that the data has been imported into Heyloyalty correctly.
When importing contact data, you can go to Lists and open the list you selected in the integration. Check that the contacts have been created or updated as expected and that the information is placed in the correct fields.
When importing purchase data, you can check the imported purchases in Heyloyalty's Activity feed.
If data is not imported correctly, check the following:
- Whether the server address and login details are correct.
- Whether the specified folder path contains the expected files.
- Whether the protocol and port match the server's setup.
- Whether the delimiter and date format match the content of the file.
- Whether the fields are mapped correctly.
- Whether an error report has been received at the specified email address.
Manual import
Once the import is set up, it only fetches data going forward. It can therefore be a good idea to start by fetching data manually to check whether the data is fetched correctly. You do this from the integration overview, where you click the three dots (•••) next to the import and choose Import Current Data.
A pop-up then appears, where you choose Import Current Data.
You can then check under Lists whether the contacts have been imported into Heyloyalty. Similarly, you can see whether purchase data has been imported into Heyloyalty by checking whether purchases have appeared in the Activity feed.
Use your FTP/SFTP data actively
Once the FTP/SFTP integration is set up, you can start using your imported contact data and purchase data to create more relevant communication in Heyloyalty.
For example, you can:
- Segment by purchase history: Create target groups based on the purchases your customers have previously made.
- Personalize your campaigns: Use imported contact information to tailor the content to each individual recipient.
- Work with flows: Use relevant contact data and purchase events as the basis for automated customer journeys.
- Keep your contact data up to date: Let the integration fetch new files automatically, so you avoid repeated manual imports.
With the FTP/SFTP integration, you can thus gather data from external systems and make it usable in Heyloyalty.
This gives you a better foundation for working with segmentation, targeted campaigns and marketing automation, without having to manually transfer data between your systems.