Store Upload

Purpose: The Store Upload allows you to upload store information from an external system to create or update records the Store Cross Reference table.

Note: You cannot use the Store Upload process to delete a record from the Store Cross Reference table.

In this topic:

Store Upload Setup

Store Upload Process

Store Update Errors Report

For more information: See Work with Store Cross Reference (WSCR) for more information on creating, updating, and deleting store cross references in CWSerenade.

Store Upload Setup

The setup required to use the store upload includes:

Store File

STRUPLD Upload Store Periodic Function

Interfaces Properties File

Store File

Create a Store flat file for the store information you wish to create or update.

• The fields in this flat file are fixed length, each record separated by a carriage return.

• The name of the file must start with ST and have a .TXT file extension; for example: ST99999.txt, where 99999 is a unique value for each Store file.

• Include only one record for each store you wish to upload. However, if multiple records exist for the same store number, the system creates or updates the record in the Store Cross Reference table using the information in the last record processed.

File contents:

Field

Description

Store #

Updates Store# in the Store Cross Reference table.

Alphanumeric, 10 positions; Required.

Store Name

Updates Description in the Store Cross Reference table.

Alphanumeric, 40 positions; Required.

Store Active Indicator

Updates Active? in the Store Cross Reference table.

Valid values are:

Y = The store is active.

N = The store is not active.

Alphanumeric, 1 position; Required.

Address 1

Updates Address Line 1 in the Store Cross Reference table.

Alphanumeric, 32 positions; Required when updating an existing record whose Ship To Store flag is selected.

Address 2

Updates Address Line 2 in the Store Cross Reference table.

Alphanumeric, 32 positions; Optional.

Address 3

Updates Address Line 3 in the Store Cross Reference table.

Alphanumeric, 32 positions; Optional.

Address 4

Updates Address Line 4 in the Store Cross Reference table.

Alphanumeric, 32 positions; Optional.

City

Updates City in the Store Cross Reference table.

Alphanumeric, 25 positions; Required when updating an existing record whose Ship To Store flag is selected.

State

Updates State in the Store Cross Reference table.

The state code must be defined for the SCF associated with the postal code.

Alphanumeric, 2 positions; Required when updating an existing record whose Ship To Store flag is selected.

Postal Code

Updates Postal Code in the Store Cross Reference table.

The postal code must be at least 5 characters and its first three positions must exist in the SCF table.

Alphanumeric, 10 positions; Required when updating an existing record whose Ship To Store flag is selected.

Country

Updates Country in the Store Cross Reference table.

Alphanumeric, 3 positions; Required when updating an existing record whose Ship To Store flag is selected.

Phone

Updates Telephone # in the Store Cross Reference table.

Alphanumeric, 14 positions; Optional.

Sample record in Store file:

STORE#777 THIS IS STORE#777 NAME/DESCRIPTION YSTORE#777 STREET ADDRESS LINE 1 STORE#777 STREET ADDRESS LINE 2 STORE#777 STREET ADDRESS LINE 3 STORE#777 STREET ADDRESS LINE 4CITY MA01468 USATELEPHONENUMBR

STRUPLD Upload Store Periodic Function

Use the STRUPLD periodic function to submit the Store Upload Process.

Function:

STRUPLD

Description:

UPLOAD STORES

Program name:

PFR0110

Company

The Company flag must be selected. The Store Upload process creates records in the Store Cross Reference table using the company you entered when you submitted the STRUPLD periodic function.

1. The STRUPLD periodic function is delivered with the system. Use the Working with Periodic Functions (WPER) menu option to review it.

2. Use the Working with Periodic Processes (WPPR) menu option to assign the STRUPLD periodic function to a periodic process.

3. Once you have created the periodic process, you can use the Execute Periodic Process screen (located in the Working with Periodic Processes (WPPR) or Executing Periodic Processes (EPRO)) to define a schedule for the job. See Defining the Job Schedule.

For more information: See Scheduling Jobs for more information on How to Schedule a Job.

Interfaces Properties File

Use the following setting in the cwdirectcp_interfaces.properties file for the Store Upload.

To edit a properties file: You can use a text editor to edit the file, being careful to only change the settings that are configurable.

Note: If you make a change to a properties file, you must select Change in Refresh System Properties (PROP) or stop and restart the SERENADE service (or the application server) before the changes take effect.

Location of properties file: Typically, the CWSerenade properties files are saved on the CWSerenade application server at the following location, where C: is the root directory of the server.

C:Serenade\server\conf\cwdirectcpproperties

Note: Define this setting on the application server you wish to use for the Store Upload process. If you use multiple application servers, define this setting for one server only.

Setting

Description

STORE_FILE_PATH

The directory the Store Upload Process monitors for new Store files to process.

Note:

• The directory entry must use a double forward slash.

• The name of the file must start with ST and have a .TXT file extension; for example: ST00001.txt and ST00002.txt.

The recommended directory on the CWSerenade application server is C://CWSerenade//Store//, where C: is the root directory where CWSerenade is installed.

Store Upload Process

Store upload process flow:

When you submit the STRUPLD Store Upload periodic function, the system performs the following steps.

1.

Looks in the directory defined for the STORE_FILE_PATH setting in the Interfaces Properties File for new Store Files to process.

If a file exists in the STORE_FILE_PATH directory whose file name begins with ST and has a .TXT file extension, the system selects the file for processing.

2.

Validates each record in the file.

• The system includes records that do not pass validation on the Store Update Errors Report.

• The system continues to the next step for records that pass validation.

3.

Creates or updates records in the Store Cross Reference table for the company you entered when you submitted the STRUPLD periodic function.

The system uses the Store # in the Store File to determine if the record is an add or a change.

• If the Store # matches a Store # in the Store Cross Reference table, the system updates the existing record. Note: When updating an existing store cross reference record, the system overlays the existing values for the record with the values that are passed in the upload. For example, if the upload record does not include a Phone, the system updates the Telephone # field in the Store Cross Reference table to blank.

• If the Store # does not match a Store # in the Store Cross Reference table, the system creates a new record.

You can review the store cross reference records that have been created and updated in the Work with Store Cross Reference (WSCR) menu option.

4.

Once all of the records in the Store file are processed, the system changes the file extension of the file from .TXT to .PRC to indicate that the file has been processed.

It is your responsibility to delete files with the .PRC file extension.

WSCRb Serenade 5.0 March 2015