Configure an SFTP transport to retrieve external files for the Data Load utility

We can create and configure an SFTP transport for a Data Load utility scheduled job to use to retrieve an input file from an external source for loading into WebSphere Commerce.


Before beginning

Ensure that you complete the following tasks:


Task info

When the SFTP transport is configured, a Data Load utility scheduled job can use the defined parameters for the transport to retrieve one or more CSV files from an external site. The job can then call the Data Load utility to use the files as input files to load data into WebSphere Commerce.

Note: If the WebSphere Commerce instance includes multiple stores, each store needs to have a separate SFTP transport configured.

(Enterprise) If the site uses the extended sites store model, configure an SFTP transport for each extended site store and for the catalog asset store. With these transports, we can use a scheduled job and the Data Load utility to load prices into the asset store. These prices can be inherited by one or more extended sites stores. We can then load prices into each extended site store to override the inherited prices when needed.


Procedure

  1. Connect to the WebSphere Commerce database and update the TRANSPORT database table to include an entry for our new transport method. Choose a transport ID that is not in use. For example,

    TRANSPORT_ID TIMEOUT IMPLEMENTED ADDRESSABLE CODE NAME DESCRIPTION
    101 0 'Y' 'N' NULL MySFTPTransport MySFTPTransportDesc

  2. Update the configuration file to include your new transport. By including your transport in this file, we can access the transport in the Administration Console for the site. Add the following configuration just below the DemandTec OutboundConnector

      <OutboundConnector default="true" enabled="true" id="101" name="MySFTPTransport" retries="3">
        <JNDI JndiName="eis/JCAMySFTPTransport" display="false"/>
        <InteractionSpec
          ClassName="com.ibm.commerce.wc.messaging.adapters.jcaftp.JCAFTPInteractionImpl" default="true"/>
        <ConnectionSpec
          ClassName="com.ibm.commerce.wc.messaging.adapters.jcaftp.JCAFTPConnectionSpecImpl" default="true">
          <EditableProperty Admin="host" display="true" editable="Yes" encrypt="No" name="setHost" value=""/>
          <EditableProperty Admin="port" display="true" editable="Yes" encrypt="No" name="setPort" value=""/>
          <EditableProperty Admin="userName" display="true" editable="Yes" encrypt="No" name="setUserName" value=""/>
          <EditableProperty Admin="password" display="true" editable="Yes" encrypt="Yes" name="setPassword" value=""/>
          <EditableProperty Admin="remoteDirectory" display="true" editable="Yes" encrypt="No" name="setRemoteDirectory" value=""/>
        </ConnectionSpec>
      </OutboundConnector>

  3. Restart the WebSphere Commerce server.

  4. Open the Administration Console and select Site on the Administration Console Site/Store Selection page.

  5. Click Configuration > Transports. The Transport Configuration page displays.

  6. Click Add. The Add Transport page displays.

  7. In the list of Available Transports, select your new transport type and click Add.

  8. On the Transport Configuration page, select the newly added transport and click Configure.

  9. On the Transport Configuration Parameters page, enter the values to configure your transport. For example:

      Host
      The host name or IP address for our external site.

      Port
      The port number for our external site. The default port number is 22.

      User name
      The user name to access the external site.

      Password
      The password to access the external site.

      Remote directory
      The directory on the external site where the exported CSV files are located for a Data Load utility to retrieve.

    Note: Your transport can include more or different customization parameters that depend on how you created your transport type.

  10. Click the OK. Your custom SFTP transport for the Data Load utility scheduled job is configured.


What to do next

After you define and enable the transport, we can use the WebSphere Commerce Administration Console to configure a scheduled job to use the transport to retrieve the input file from the external source. See Configure a Data Load utility scheduler job.

Note: When you configure a scheduler job to use your new transport, we must include the job parameter "transport=TRANSPORT_ID", where TRANSPORT_ID is the ID for our new transport. For example, "transport=101"