Send customer data to SFTP server

Published March 31, 2023
Modules
Difficulty

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:

  1. Create a segmentation of customers whose data you want to send to the external resource.
  2. 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.

  1. Go to Analytics icon Analytics > Segmentation > New segmentation.

  2. Enter the name of the segmentation.

  3. Click Choose filter.

  4. From the dropdown list, select Email agreement.

  5. As the logical operator, select Equal.

  6. In the text field, enter enabled.

  7. Click Save.

    The configuration of the segmentation
    The configuration of the segmentation

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.

  1. Go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the Scheduled Run trigger node

  1. As the trigger node, add Scheduled Run.
  2. In the configuration of the node:
    1. Leave the Run trigger option at all time.
    2. From the Timezone dropdown list, select the time zone consistent with the timezone selected for your workspace.
    3. Leave the Everyday tab.
    4. In the Select time field, choose the time when the workflow will be triggered.
    5. Confirm by clicking Apply.
The configuration of the Scheduled Run node
The configuration of the Scheduled Run node

Select customers to export

  1. Add the Get Profiles node.

  2. In the configuration of the node:

    1. Select the segmentation you created in the previous step to extract customers’ data.
    2. In the Attributes section, select newsletter_agreement and email.
    3. Confirm by clicking Apply.
    The configuration of the Get Profiles node
    The configuration of the Get Profiles node

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.

  1. Add a Create directory node.
  2. In the configuration of the node:
    1. In the Server field, enter the URL of the server.

    2. In the Port field, set the port. The default value is the most commonly used SFTP port.

    3. In the Path to directory field, provide a path where your new directory will be created (for example: /home/file-directory/).

    4. In the Directory name, you can use the following Jinjava code to use a date of launching the node as the directory name.

          {{ timestamp|timestamp_to_time|datetimeformat('%d-%m-%Y', tz="UTC" ) }}
              
      The Jinjava code returns the date in the following format: 08-03-2023.

    5. In the Authentication section, select the method of authentication.

    6. Test the connection by clicking Check connection.

    7. Confirm by clicking Apply.

Configure settings for SFTP protocol

  1. Add the SFTP - Send file node.

  2. In the configuration of the node:

    1. In the Server field, enter the URL of the server.
    2. In the Port field, set the port.
    3. In the Path to directory field, provide the path to the directory.
    4. In the File name field, enter the name of the file under which it will be passed to your SFTP server.
    5. If needed, in the File name suffix, select the suffix of the file name.
    6. From the File format dropdown list, select the CSV format.
    7. Verify and modify the delimiters if needed.
    8. In the Authentication section, select the method of authentication.
    9. Confirm by clicking Apply.
    The configuration of the SFTP node
    The configuration of the SFTP node

Add the finishing node

  1. Add the End node.
  2. In the upper right corner, click Save & Run.
    Result:
    The workflow configuration
    The workflow configuration

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.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker