Send customer data to SFTP server
The SFTP integration allows you to send data from Synerise to your other platforms and vice versa, ensuring that all your customer data is synchronized across all platforms. By using the Synerise Automation module and the Create Directory node, you can streamline your data management process, saving time and resources while ensuring that all your customer data is organized and up-to-date. This ensures that any data exports can be automatically saved in the correct folder in your resources, making it easier to manage and analyze your data.
This use case describes how to prepare an automated workflow that exports customer data with the agreement for email communication to SFTP. This workflow will be triggered everyday and before it sends a file with extracted customer data, it will send a request to your SFTP to create a directory whose name will be a date of the export.
Prerequisites
- You must have customers in the Profiles module.
- You must have a target resource with which you synchronize the data (in this use case, an SFTP server is used).
Process
In this use case, you will go through the following steps:
- Create a segmentation of customers whose data you want to send to the external resource.
- Create a workflow that sends a request to your SFTP server to create a new file with customer data from Synerise in a dedicated folder.
Create a segmentation
As the first part of the process, create a segmentation of customers who agreed to receive emails. Data of these customers will be sent to the external resource.
-
Go to Analytics > Segmentation > New segmentation.
-
Enter the name of the segmentation.
-
Click Choose filter.
-
From the dropdown list, select
Email agreement
. -
As the logical operator, select Equal.
-
In the text field, enter
enabled
. -
Click Save.
Create a workflow
In the final part of the process, create a workflow which will send everyday a request to your SFTP server to deposit customers’ data in a dedicated folder.
- Go to Automation > Workflows > New workflow.
- Enter the name of the workflow.
Define the Scheduled Run trigger node
- As the trigger node, add Scheduled Run.
- In the configuration of the node:
- Leave the Run trigger option at all time.
- From the Timezone dropdown list, select the time zone consistent with the timezone selected for your workspace.
- Leave the Everyday tab.
- In the Select time field, choose the time when the workflow will be triggered.
- Confirm by clicking Apply.
Select customers to export
-
Add the Get Profiles node.
-
In the configuration of the node:
- Select the segmentation you created in the previous step to extract customers’ data.
- In the Attributes section, select newsletter_agreement and email.
- Confirm by clicking Apply.
Create a new directory in your SFTP
The Create Directory node allows you to send a request to your SFTP server to create a new folder.
- Add a Create Directory node.
- In the configuration of the node:
-
In the Server field, enter the URL of the server.
-
In the Port field, set the port. The default value is the most commonly used SFTP port.
-
In the Path to directory field, provide a path where your new directory will be created (for example:
/home/file-directory/
). -
In the Directory name, you can use the following Jinjava code to use a date of launching the node as the directory name.
The Jinjava code returns the date in the following format:{{ timestamp|timestamp_to_time|datetimeformat('%d-%m-%Y', tz="UTC" ) }}
08-03-2023
. -
In the Authentication section, select the method of authentication.
-
Test the connection by clicking Check connection.
-
Confirm by clicking Apply.
-
Configure settings for SFTP protocol
-
Add the Send File node by clicking THEN > SFTP.
-
In the configuration of the node:
- In the Server field, enter the URL of the server.
- In the Port field, set the port.
- In the Path to directory field, provide the path to the directory.
- In the File name field, enter the name of the file under which it will be passed to your SFTP server.
- If needed, in the File name suffix, select the suffix of the file name.
- From the File format dropdown list, select the CSV format.
- Verify and modify the delimiters if needed.
- In the Authentication section, select the method of authentication.
- Confirm by clicking Apply.
Add the finishing node
- Add the End node.
- In the upper right corner, click Save & Run.
Result:
Check the use case set up on the Synerise Demo workspace
You can check all the configurations directly in Synerise Demo workspace:
If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.