Upload custom fields using SFTP
This topic contains helpful information to ensure your file uploads are successful.
TABLE OF CONTENTS
Custom field response file processing logic
Spotnana requires a complete custom field response data set each time you upload the file. The primary field used to identify which custom field the responses are added to is the SFTP custom field identifier. Custom field responses can be sent in separate files or combined into a single file.
The SFTP custom field identifier can be found upon creating a custom field and setting “Require SFTP identifier code” to “Yes”.
The logic used to process the contents of your CSV file is as follows:
The responses which are present in the custom field file for a given SFTP custom field identifier and not in the Spotnana database, would be created.
The responses which are not present in the custom field file for a given SFTP custom field identifier and are present in the Spotnana database, would be deactivated.
File format and naming conventions
The .CSV custom fields feed file name must use this format:
custom_fields.*.csv
where the * (wildcard) represents any characters you wish to add to the name. The “.” after “feed” and the “.” before “csv” must be present. The file name is not case sensitive. We recommend including the date and time in the name of the file (to ease troubleshooting in the future). For example:
custom_fields.spotnana_integration_<DateTime>.csv
The .CSV feed file must also be in a specific format. The column names must exactly match the defined format (see Custom field format section below). More details on file formatting can be found in Appendix 1.
We require certain data level validations to be followed (see Custom field format section below for details).
Hosting and authentication
Spotnana hosts your SFTP folder on its own SFTP server (via AWS). Each client will have a unique user account with direct access to their specific SFTP folder. We support key-based authentication. As a result, you will need to create a public-private key pair and share the public key with Spotnana. The key must be in openSSH format. Steps to help you create the keys are in Appendix 2.
Frequency and scheduling
You determine the scheduling and frequency of file uploads. Spotnana uses the file object creation trigger to initiate the custom field upload. This means that as soon as you push a file to your folder on the Spotnana SFTP server, the Spotnana application will begin processing the upload. We recommend you upload a file at least once a day to be sure to notify Spotnana of any additions/updates/deletions that may have occurred. If this practice is followed:
new responses will be available to be selected at checkout by travelers immediately.
deprecated responses will be removed as an option and no longer available for travelers to select.
Deprecated responses will still be visible on reports.
Reporting and error-handling
Spotnana collects data on your file uploads. An internal report is created after each file upload. A copy of this file can be obtained upon request. For each file uploaded, the report will contain:
Any reasons why a file upload failed (wrong format, missing column names, etc.).
Any reasons why a row within a file was unable to be uploaded. Spotnana does not do partial updates and will fail the row if an error occurs in a specific column.
Appendices
Use the information in these two appendices to help you ensure the data in your custom field upload is correctly formatted and prepared.
Appendix 1: Custom field file format
Column | Required/Optional | Notes |
---|---|---|
Appendix 2: How to create a public SSH key for the SFTP server
The information below provides information required to create the public SSH key.
Format:
Type: String
Length Constraints: Maximum length of 2048.
Pattern:
^ssh-rsa\s+[A-Za-z0-9+/]+[=]{0,3}(\s+.+)?\s*$
Creating SSH Keys on Microsoft Windows
Run this command on the command line (cmd):
ssh-keygen -m PEM -f key_name
Where
-m is Format
-f is Keyname
Creating SSH Keys on macOS, Linux, or UNIX
Run this command on terminal:
ssh-keygen -P "" -m PEM -f key_name
Sample key:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDDJB9oBRPrBegMDPEQo+HmNDb/jKUJL6q2kQpNNMDjNps9mhhwJ1dP/lOavMitBPAndeXlwaNEm2XbGaSrZtD/tbQTX1HQjP6pacy+Alf8kYBm5QFfl/Z6lGC8qHys10fpRXgYE7UhdSv6VyRqt1gELGFQwVBZ2kJJuBGJF1IRywwvG/h68B8iWU1+6KEWYQoUcT45r3j3otnx4NhhzpTiNgDbMk0ix+kar4/IstobRLcb7rt7FoUerTLNrVDi69DqbsGY5LN+NM8jVx0sPQLRC/ruil8pTHP3k4rDCc7a80+sH4sUTW+mHc7MTqbi/CcyyFAD8h7p6WqxEydOaJjMnvqAbE17BOj0TSxv3HMohTf3skzE7PbzVcjIfHTpFPGxmJkghAYAMi5l9VvAs91IpVylxjqPss3xQQJIZEmQdG2k7zk/UpsUFlmaOj6lCHRicFKCixKekzzm3nFuJvDEklurtydOQjZ8WkPzTSJfZBdKMuMUi0SQ9m9ZAw99t0=
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article