Chapter 20: Using the STS Sales Interface (WSTS)

Purpose: The STS Sales interface is available so that you can transfer sales information to the STS sales package. This interface enables you to use CWDirect for order entry, pick slip generation and confirmation, but use STS to review sales information, such as invoice details, returns and discount variances. The process has four key steps:

• Create STS subcodes for the STS Sales interface to identify what the subcodes correspond to in CWDirect. See Work with STS Subcodes Screen for more information on the areas in CWDirect you need to populate with STS subcodes.

• Run the periodic function STSGEN, Generate STS Interface Files. The program extracts invoice records based on the CWDirect company code and date. See Generating the STS Interface File.

• Review the STS Mark Up/Down Report. This report is generated when you run the Generate STS Interface Files periodic function. The report lists transactions where the list price was lower than the selling price.

• Run the periodic function DLT_STS, Delete STS Interface Files. This periodic function deletes the existing STS Interface files, except for the seven most recent files. See Generating the STS Interface File.

In this chapter:

Work with STS Subcodes Screen

Create STS Subcodes Screen

Change STS Subcodes Screen

Display STS Subcodes Screen

Generating the STS Interface File

STS Interface File

Mark Up/Down Report

Work with STS Subcodes Screen

Purpose: Use this screen to cross-reference CWDirect company and paytype codes with the equivalent STS subcodes.

How to display this screen: Enter WSTS in the Fast path field at the top of any menu or select Work with STS Subcodes from a menu.

IFR0004 DISPLAY Work With STS Subcodes 2/05/03 16:27:45

The KL Mail Order Company

Opt STS

Subcode r STS

Type Value Subcode Description

Type options, press enter

2=Change 4=Delete 5=Display

CMP 555 001 COMPANY CODE

PAY 001 801 CHECK

PAY 004 814 VISA

PAY 011 803 CASH

F3=Exit F6=Create F12=Cancel F24=Select Company

Field

Description

STS subcode type

A code that identifies the type of STS subcode being cross referenced with a CWDirect value. Valid values are:

CMP = This is an STS subcode that identifies a CWDirect company.

PAY = This is an STS subcode that identifies a CWDirect paytype.

Alphanumeric, 3 positions; optional.

value

A code that identifies the CWDirect value that corresponds to the STS subcode. This code identifies a CWDirect company code or a CWDirect paytype code, depending on the value in the STS subcode type field.

Numeric, 3 positions; optional.

STS subcode

The STS subcode that equates to the corresponding CWDirect value.

Numeric, 3 positions; display-only.

Description

The description of the STS subcode.

Alphanumeric, 30 positions; display-only.

Screen Option

Procedure

Create an STS subcode

Press F6 to advance to the Create STS Subcodes Screen.

Change an STS subcode

Enter 2 next to a subcode to advance to the Change STS Subcodes Screen.

Delete an STS subcode

Enter 4 next to a subcode to delete it.

Display an STS subcode

Enter 5 next to a subcode to advance to the Display STS Subcodes Screen.

Create STS Subcodes Screen

Purpose: Use this screen to create an STS company or paytype subcode.

How to display this screen: Press F6 on the Work with STS Subcodes Screen.

IFR0005 ENTER Create STS Subcodes 2/05/03 14:19:07

EZK Mail Order

Subcode Type . . . . . . .

CWDirect Value . . . . . .

Subcode . . . . . . . . . .

F3=Exit F12=Cancel

Field

Description

Subcode type

A code that identifies the type of STS subcode being cross referenced with a CWDirect value. Valid values are:

CMP = This is an STS subcode that identifies a CWDirect company.

PAY = This is an STS subcode that identifies a CWDirect paytype.

Alphanumeric, 3 positions.

Create screen: required.

Change screen: display-only

CWDirect value

A code that identifies the CWDirect value that corresponds to the STS subcode.

Numeric, 3 positions.

Create screen: required.

Change screen: display-only

Subcode

The STS subcode that equates to the corresponding CWDirect value.

Numeric, 3 positions; required.

Description (Unlabeled field to the right of the Subcode field)

The description of the STS subcode.

Alphanumeric, 30 positions; required.

Step-by-step instructions:

1. Enter CMP in the Subcode type field if you are creating an STS subcode that identifies a CWDirect company, or

2. Enter PAY in the Subcode type field if you are creating an STS subcode that identifies a CWDirect paytype.

3. Enter the CWDirect value that represents the company or paytype you are using to correspond to the STS subcode in the CWDirect value field.

4. Enter the STS subcode and description that equates to the corresponding CWDirect value in the Subcode field.

5. A message similar to the following displays informing you the STS subcode has been created:

STS Subcode reference CMP/555/1 created.

Identifying STS subcodes in CWDirect: .

CWDirect Code or Information

STS Equivalent (STS subcode)

File Maintenance Option to Use to Create Cross Reference

Division code

Store number

Work with Divisions (fast path = WDIV)

Invoice date from invoice ship-to

Sales date

Order Inquiry/Maintenance (fast path = OIOM)

Invoice date from invoice ship-to

Reformat date

Order Inquiry/Maintenance (fast path = OIOM)

Long SKU Department

Item

Work with Item/SKUs (fast path = MITM)

List price

Price

Work with Item/SKUs (fast path = MITM)

SKU user field one

Merchandise

Work with Item/SKUs (fast path = MITM)

Group code

Special handling and additional charges

Work with Additional Charges (fast path = WADC)

Tax jurisdiction code

Sales tax

Work with Tax Jurisdiction (fast path = WTXJ)

User field five

Non-taxable employee discount

Work with Source Codes (fast path = WSRC)

User field six

Taxable employee discount

Work with Source Codes (fast path = WSRC)

Change STS Subcodes Screen

To change: Enter 2 next to an STS subcode to advance to the Change STS Subcodes screen. You can change the Subcode or Subcode description fields only. See Create STS Subcodes Screen for field descriptions.

Display STS Subcodes Screen

To display: Enter 5 next to an STS subcode to advance to the Display STS Subcodes screen. You cannot change any information on this screen. See Create STS Subcodes Screen for field descriptions.

Generating the STS Interface File

The system creates this file when you run the Generate STS Interface Files periodic function. In order to set up this periodic function, use the function name STSGEN and the program name IFR0021. See Working with Periodic Functions (WPER).

The STS Interface files are named as follows:

IN = This represents the production company where the STS Interface file was created. (TN displays if you are using a test company.)

YYYY = This represents the year the STS Interface file was created.

MM = This represents the month the STS Interface file was created.

DD = This represents the day the STS Interface file was created.

For example, a file created on April 24, 1998 would be named IN19980424. However, if you run the STSGEN function more than once in a given day, a message similar to the following displays:

File IN19980424 already exists. File will be renamed to STS113401 and a new file will be created.

When you process the STSGEN function you must specify the company and date. The system uses the current date if none is specified. The system then pulls sales information from invoices that match the company and date you entered during the execution of the periodic function. The system also processes the Mark Up/Down Report, which lists transactions that had a mark-up or mark-down.

Deleting the STS interface file: You can run the Delete STS Interface Files periodic function periodically to eliminate any unnecessary files. When you run this periodic function, the system deletes the existing STS Interface files, except for the seven most recent files. In order to set up this periodic function, use the function name DLT_STS and the command call IFR0013 parm(''). See Chapter 13: Working with Periodic Functions (WPER).

STS Interface File

Purpose: The STS Interface file creates a record set for each CWDirect invoice ship-to record. Each STS record set is made up of three record types:

• Record type 1: header information

• Record type 2: invoice header information

• Record type 3: details of each sales transaction

Record type 1: The STS Interface file creates one header type 1 record for each invoice ship-to record.

Field

Positions

Value

Record type

1

1

Company number

2

Value defined in the value field that is associated with the STS subcode type CMP at the Create STS Subcodes Screen.

Register number

3-10

Value defined is always register 1. This value is right justified and zero filled. For example, 00000001.

Cashier number

11-18

Zero filled.

Transaction number

19-23

Zero filled.

Transaction total

24-35

Zero filled.

Unused Filler

36-42

Zero filled.

Record type 2: The STS Interface file creates one invoice header type 2 record for each invoice ship-to record.

Field

Positions

Value

Record type

1

2

Company number

2

Value defined in the value field that is associated with the STS subcode type CMP at the Create STS Subcodes Screen.

Store number

3-8

Value defined as the division code associated with the source code on the order header. This value is right justified and zero filled. For example, 0000TN.

Sales date

9-14

Value defined as the invoice date from the invoice ship-to (MMDDYY format).

Reformat date

15-20

Value defined as the invoice date from the invoice ship-to (MMDDYY format).

Transaction code

21

1 = Sales transaction. This value displays if the invoice total (merchandise + freight + tax + GST + PST + handling + additional charges + additional freight) is greater than or equal to zero.

2 = Returns transaction. This value displays if the invoice total is less than zero.

Time of sale

22-25

Zero filled.

Time Reformatted

26-29

Zero filled.

Unused filler

30-42

Zero filled.

Record type 3: The STS Interface file creates multiple sales transaction type 3 records for each invoice ship-to record. Each detail record represents an element of the sale, such as order number, item number and method of payment. The subcode determines what sale element the detail record represents.

Field

Positions

Value

Record type

1

3

Company number

2

Value defined in the value field that is associated with the STS subcode type CMP at the Create STS Subcodes Screen.

Identifier

3-22

This value varies according to the subcode defined for this detail record. For example, the identifier for merchandise is the value defined in the User 1 field on the SKU screen in Work with Item/SKUs.

Subcode

23-25

This value identifies the type of data this detail record represents. For example, the subcode for merchandise is the value defined in the Long SKU department field on the Item screen in Work with Item/SKUs.

Quantity

26-30

This value varies according to the subcode defined for this detail record. For example, the quantity for merchandise is the shipped quantity from the invoice detail. This field is zero-filled if a quantity is not required.

Amount

31-42

This value varies according to the subcode defined for this detail record. For example, the amount for merchandise is the amount defined in the List price field on the SKU screen in Work with Item/SKUs. This field is zero-filled if an amount is not required.

Record type 3 layout: Each detail record represents an element of the sale, such as order number, item number and method of payment. The subcode determines what sale element the detail record represents.

The STS Interface creates a detail record only for elements of the sale that exist. For example, a detail record for freight does not display if freight was not charged on the order.

Note: The maximum value STS can accept in the quantity field is 32767. If the quantity exceeds this value, the sales transaction displays across more than one detail record.

CWDirect Sales Transaction Element

Row

STS Identifier (positions 3-22)

STS Subcode (positions 23-25)

Quantity (positions 26-30)

Amount (positions 31-42)

Order number

1

STS uses the order number from invoice ship-to as the identifier for order number.

950

zero fill

zero fill

Order date

2

STS uses the order date from the order header associated with the invoice ship-to as the identifier for order date.

953

zero fill

zero fill

Invoice number

3

STS uses the invoice number from the invoice ship-to as the identifier for invoice number.

956

zero fill

zero fill

Merchandise

4

STS uses the value found in the User 1 field on the SKU screen in Work with Item/SKUs as the identifier for merchandise.

STS uses the value found in the Long SKU department field on the Item screen in Work with Item/SKUs as the STS subcode for merchandise.

STS uses the shipped quantity from invoice detail as the merchandise quantity.

STS uses the value found in the List price field on the SKU screen in Work with Item/SKUs as the merchandise amount.

 

 

 

STS adds 100 to this value if tax was charged for this item.

Merchandise and discount detail records are not created for gift certificate items. See Gift certificate sale.

 

The amount is the unit price, not the extended price.

A negative sign displays if this is a sale.

The selling price on the invoice detail displays if it is greater than the list price.

Employee discount

5

blank

The value defined in the User 5 field in Work with Source Codes displays if no tax was charged for this item.

The value defined in the User 6 field in Work with Source Codes displays if tax was charged for this item.

zero fill

An employee discount record is only created if a value has been defined in the Discount percent field and the User 6 field in Work with Source Codes.

 

 

 

 

 

The following calculations determine the employee discount.

The system calculates the selling price of the item before the employee discount:

selling price / (1 - discount %) = selling price before employee discount

 

 

 

 

 

The system then calculates the employee discount:

selling price before employee discount - selling price = employee discount

Discount (mark-up or mark-down)

6

blank

601 displays if tax was charged for this item.

611 displays if no tax was charged for this item.

zero fill

STS uses the value found in the List price field on the SKU screen in Work with Item/SKUs as the discount amount.

The selling price on the invoice detail displays if it is greater than the list price.

 

 

 

 

 

The discount amount is an extended value.

A negative sign displays if this is a return.

Order line

7

STS uses the order detail line number on the invoice detail record as the identifier for order line.

954

zero fill

zero fill

Item number

8

STS uses the item number from invoice detail record as the identifier for item number.

951

zero fill

zero fill

Gift certificate sale

9

STS uses the gift certificate number defined in Gift Certificate file as the identifier for a gift certificate sale.

499

STS uses the shipped quantity from invoice detail record as the gift certificate quantity.

STS uses the extended price of the gift certificate as the gift certificate amount.

Gift certificate name

10

STS uses the first 20 positions of the customer sold-to's last name as the identifier for the gift certificate name.

930

zero fill

zero fill

Gift certificate address

11

STS uses the first 20 positions of the customer sold-to's street address as the identifier for the gift certificate address.

931

zero fill

zero fill

Gift certificate city and state

12

STS uses the first 17 positions of the customer sold-to's city and state code (separated by a single space) as the identifier for the gift certificate city and state.

932

zero fill

zero fill

Gift certificate zip

13

STS uses the zip code from the customer sold-to record as the identifier for the gift certificate zip code.

933

zero fill

zero fill

Handling (line level)

14

blank

STS uses the value defined in the Group field for the additional charge code defined on the order detail as the subcode for handling.

STS adds 10 to the group code if tax was not charged.

zero fill

STS uses the handling amount from the invoice detail as the handling amount.

A negative sign displays in the first position if this is a sale.

Additional charges (order level)

15

blank

STS uses the value defined in the Group field for the additional charge code that was billed on the invoice as the subcode for additional charges.

STS adds 10 to the group code if tax was not charged.

zero fill

STS uses the additional charge amount from the order's total additional charge amount as the additional charge amount.

A negative sign displays if this is a sale.

Freight

16

blank

451 displays if tax was charged for freight.

461 displays if tax was not charged for freight.

zero fill

STS uses the freight and additional freight amounts from the invoice ship-to record as the freight amount.

A negative sign displays if this is a sale.

Sales tax

17

STS uses the tax jurisdiction code defined for the postal code of the customer ship-to's address as the identifier for sales tax.

400

zero fill

STS uses the tax, PST and GST amounts from invoice ship to record as the sales tax amount.

 

A negative sign displays if this is a sale.

Payment

18

STS uses the credit card number as the identifier for payment if a credit card was used as payment.

If this transaction is a sale, STS uses the value defined in the STS subcode field in Work with STS Subcodes for the CWDirect pay type code defined on the invoice pay method as the STS subcode for payment.

zero fill

STS uses the sum of the following fields as the payment amount:

 

 

 

 

 

- merchandise

- freight

- additional freight

- order level freight

- order level freight tax

- handling

- additional charges

-tax

- PST

- GST

A negative sign displays if this is a return.

 

 

STS uses the gift certificate number of the redeemed gift certificate as the identifier for payment if a gift certificate was used as payment.

Blank for all other payment types.

If this transaction is a return, STS uses the value defined in the STS subcode field in Work with STS Subcodes for the CWDirect pay type code defined on the refund record associated with the invoice pay method as the STS subcode for payment.

 

 

 

 

 

 

 

 

Authorization

19

STS uses the credit card expiration date, 01 and authorization number as the identifier for credit card authorization.

901

zero fill

zero fill

Salesman

20

STS uses the salesman number from the order header record as the identifier for salesman.

If this invoice is a sale, subcode 900 (salesperson) displays.

If this invoice is a return, subcode 910 (original employee number) displays.

zero fill

zero fill

Source code

21

STS uses the source code from the order header record as the identifier for source code.

957

zero fill

zero fill

Invoice example: An example of how the system creates an STS Interface record set using CWDirect invoice information is shown below.

Order #: 1325

Order date: 04/24/98

Salesrep #: 18812

Source code: TAN

Invoice #: 186 Invoice date: 04/24/98

Item/SKU

Inventory quantity

Unit price billed

List price

Charges

Extended price

ST1111

2

20.00

10.00

 

40.00

Merchandise

 

 

 

Freight

4.00

PETIT

 

 

 

Payment

Total

 

 

 

 

Check

44.00

STS interface record: An example of an STS Interface record set using the information displayed in the invoice example is shown in the tables below.

Record type

Company number

Register number

Cashier number

Transaction number

Transaction total

Unused filler

1

2

3-10

11-18

19-23

24-35

36-42

1

1

00000001

0000000

00000

00000000000

0000000

Record type

Company number

Store #

Sales date

Reformat date

Trans. code

Time of sale

Time reformatted

Unused filler

1

2

3-8

9-14

15-20

21

22-25

26-29

36-42

2

1

0000TN

042498

090897

1

0000

0000

0000000

Record type

Company number

Identifier

Subcode

Quantity

Amount

Field

1

2

3-22

23-25

26-30

31-42

 

3

1

00001325

950

00000

000000000000

Order #

3

1

042498

953

00000

000000000000

Order date

3

1

0000186

956

00000

000000000000

Invoice #

3

1

PETIT

211

00002

- 00000002000

Merchandise

3

1

01

954

00000

000000000000

Order line

3

1

ST1111

951

00000

000000000000

Item #

3

1

 

461

00000

- 00000000400

Freight

3

1

 

801

00000

000000004400

Payment

3

1

0018812

900

00000

000000000000

Salesrep

3

1

TAN

957

00000

000000000000

Source code

SO02_08 CWDirect 18.0 August 2015 OTN