FTP/SFTP import in Heyloyalty

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.

*Images for this guide are coming soon.

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

In this section, you get 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 to a selected list in Heyloyalty.
  • Import of purchase data to Heyloyalty's tracking database.
  • Automatic retrieval of files from an FTP or SFTP server every 4th, 8th, 12th or 24th hour.
  • 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 in connection with 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:

  • Email
  • 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.

Note: Please be aware that imported contact information does not in itself document that the contact has given consent to receive marketing. Make sure you handle permissions correctly before you use the contacts in your campaigns.

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 so you get to 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.
    • Contact data: If you choose Contact data, the import will create a contact on the list based on the file. Each line in the file must contain an email or a mobile number that we can create the contact on.
    • Purchase data: If you choose purchase data, the data is fetched as a purchase event in 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 the import should import data to.
  • Link to server: Enter the address of the FTP or SFTP server where your import files are located.
  • Path to the folder the files are located in: Specify the path to the 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 can be found 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.

Note: The server address, folder path, username, password and port must match the information from your server provider. We recommend using SFTP, as the connection is encrypted.

When you import contact data, you must also choose Match contacts on field under the basic settings. Here you choose the field Heyloyalty should use to identify existing contacts. This could, for example, be email, if it is the unique field on the contact. If you cannot find the field you want to match the contact 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 import settings you get differ depending on whether you choose purchase data or contact data.

First we describe the import settings for purchase data. Here, 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 4th, 8th, 12th or 24th hour.
  • Start time: Choose the time at which the scheduled import should start. The interval will then run from that point.
  • Delimiter, 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 flows: 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 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 existing: The import only considers contacts that were created through the import and updates those contacts
  • Handling of contact duplicates: Choose how the import should handle duplicates in the import file. You can choose between the following:
    • Import first duplicate, so the first occurrence of a contact is imported.
    • Import first duplicate: If there are contacts with the same field value in the matched field, only the first one found in the file is fetched.
    • 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 flows: Choose whether the import should be able to trigger existing flows in Heyloyalty. Choose Yes if relevant flows should be able to be sent to the contact, or No if they should not be triggered through 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 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 in the field mapping you see the fields in Heyloyalty, and opposite them you see an input field that corresponds to the name of your column in the FTP file, which the value from the import file should be transferred to.

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.

Note: It is important that the name in the input field matches exactly what it says in your FTP file. The mapping is not case sensitive.

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.
  • Disregard: 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 should be set in the Heyloyalty field in connection with 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 here how to create fields on the list. If you need to create fields for tracking, they must be added as customer 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. From the list's tracking integration, click the three dots and choose edit fields. Here you can add new tracking fields, which will then be available on the FTP import for purchase data.

Note: Check that the fields in Heyloyalty have the correct field types in relation to the data in the fields in the import file. If the field type does not match the data in the import file, the data will not be imported.

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 comes in correctly, you can choose to do a manual import. Read here how to do it.

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 come 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, you can go through 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 fit 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 relevant to start by fetching data manually to get an idea of 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 popup then appears where you choose Import current data

You can then check under Lists whether the contacts have come into Heyloyalty. You can likewise see whether purchase data has been fetched 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 on 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.

Need Support?

If you have questions you can't find answers to here, you can always contact us at support@heyloyalty.com

Contact Support