Salesman Associate Upload

Purpose: The Salesman Associate Upload allows you to upload salesman information from an external system to create or update records in the Salesman table.

You cannot use the Salesman Associate Upload process to delete a record from the Salesman table.

In this chapter:

Salesman Associate Upload Setup

Salesman Associate Upload Process

Sales Rep Update Errors Report

For more information: See Working with Sales Representatives (WSLS) for more information on creating, updating, and deleting sales representatives in Order Management System.

Salesman Associate Upload Setup

The setup required to use the salesman associate upload includes:

Salesman Associate File

Associate File Path Property

Work with File Upload (WUPL)

SLSUPLD Upload Salesman Associates Periodic Function

Salesman Associate File

Create a Salesman Associate flat file for the salesman 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 SR and have a .TXT file extension; for example: SR99999.TXT, where 99999 is a unique value for each Salesman Associate file. However, if you use the File Storage API, you can upload a zip file that contains a single text file with the same name, for example: SR00001.ZIP containing a text file named SR00001.TXT.

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

• In order to leave any field in the upload file blank, pass a space in the field so that the file can be processed without errors. Leaving a field with no space is interpreted as null in the database and causes errors.

Field

Description

Associate ID

Updates SLS Salesman # in the Salesman table.

The system performs a modulus 10 check against the salesrep number during the Salesman Associate Upload Process if the Modulus 10 Check on Salesrep Number (E88) system control value is selected.

Numeric, 7 positions; Required.

Associate Name

Updates SLS Name in the Salesman table.

Alphanumeric, 30 positions; Required.

Associate Status

Updates SLS Active Flag in the Salesman table.

Valid values are:

Y = The salesman is active.

N = The salesman is not active.

Alphanumeric, 1 position; Required.

Home Store

Updates SLS Store # in the Salesman table.

Validated against the Store Cross Reference table; see Work with Store Cross Reference (WSCR).

Alphanumeric, 10 positions; Optional.

Associate Email

Updates SLS EMail in the Salesman table.

During the Salesman Associate Upload Process, the system verifies that:

• there is an @ sign and a period (.)

• there is some text:

- before the @ sign

- between the @ sign and the period

- after the period

Alphanumeric, 100 positions (however, only the first 50 positions are uploaded to the Salesman table); Optional.

Associate Phone

Updates SLS Phone in the Salesman table.

Alphanumeric, 14 positions; Optional.

Associate Ext

Updates SLS Phone Extension in the Salesman table.

Alphanumeric, 4 positions; Optional.

Sample record in salesman associate file:

5555555SALESMAN ASSOCIATE UPLOAD NAMENHOMESTORE SalesmanAssociateEmail@email.com PHONENUMBER EXT

Associate File Path Property

Use the following setting in Working with Customer Properties (PROP) for the Salesman Associate Upload.

Setting

Description

ASSOCIATE_FILE_PATH

The directory the Salesman Associate Upload Process monitors for new Salesman Associate files to process, if the File Storage API is not in use. However, even if the file storage API is enabled, the process still uses this folder to place files that have been uploaded prior to additional processing, so this property must be set up even if you use the file storage API.

An example directory on the application server is /domain/conf/OMSFiles/File/Associate/, where domain is the WebLogic domain directory for Order Management System.

The name of the file must start with SR and have a .TXT file extension; for example: SR00001.TXT and SR00002.TXT. If there are multiple eligible files, they are processed sequentially based on file name; SR00001 processes before SR00002. If you use the File Storage API, you can upload a zip file that contains a single text file with the same name, for example: SR00001.ZIP containing a text file named SR00001.TXT.

Work with File Upload (WUPL)

Use the Work with File Uploads (WUPL) menu option to upload the Salesman Associate flat file to the folder defined in the ASSOCIATE_FILE_PATH property.

SLSUPLD Upload Salesman Associates Periodic Function

Use the SLSUPLD periodic function to submit the Salesman Associate Upload Process.

Function:

SLSUPLD

Description:

UPLOAD SALESMAN ASSOCIATES

Program name:

PFR0109

Company

The Company flag must be selected. The Salesman Associate Upload process creates and updates records in the Salesman table based on the records in the Salesman Associate File using the company you entered when you submitted the SLSUPLD periodic function.

1. The SLSUPLD 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 SLSUPLD 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.

Salesman Associate Upload Process

Salesman associate upload process flow:

When you submit the SLSUPLD Salesman Associate Upload periodic function, the system performs the following steps.

1.

If the File Storage API is enabled, looks in the OMS-IMPORTS container in the FILE_STORAGE table for the Salesman Associate Files to process; otherwise, if the file storage API is not enabled, looks in the directory defined for the ASSOCIATE_FILE_PATH property.

The name of the file must start with SR and have a .TXT file extension; for example: SR00001.TXT and SR00002.TXT. If there are multiple eligible files, they are processed sequentially based on file name; SR00001 processes before SR00002. If you use the File Storage API, you can upload a zip file that contains a single text file with the same name, for example: SR00001.ZIP containing a text file named SR00001.TXT.

2.

Validates each record in the file.

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

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

3.

Creates or updates records in the Salesman table for the company you entered when you submitted the SLSUPLD periodic function.

The system uses the Associate ID in the Salesman Associate File to determine if the record is an add or a change.

• If the Associate ID matches a SLS Salesman # in the Salesman table, the system updates the existing record. Note: When updating an existing salesman 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 an Associate Email, the system updates the SLS EMail field in the Salesman table to blank.

• If the Associate ID does not match a SLS Salesman # in the Salesman table, the system creates a new record.

You can review the salesman records that have been created and updated in the Working with Sales Representatives (WSLS) menu option.

4.

Once all of the records in the Salesman Associate file are processed:

• if the file storage API is in use, the system deletes the record from the FILE_STORAGE table; however, if there were any errors in processing, the system creates a record in the table in a container of OMS-ERRORS.

• if the file storage API is not in use, the system changes the file extension of the file from .TXT to .PRC to indicate that the file has been processed; however, if there were any errors in processing, the system writes the text file in the Errors subfolder of the ASSOCIATE_FILE_PATH. Any files with the .PRC file extension are deleted automatically.

Note: The system processes all correct records in the upload file, and creates an error file that contains only any records that could not be processed.

WSLSb OMSCS 19.0 December 2019 OHC