Downloading B2B E-Commerce Static Files (BBED)

Purpose: Use the Download B2B E-Commerce Static Files option to download information that does not change frequently to the web storefront and that supports business-to-business orders.

The B2B static information download includes:

• individual departments

• individual positions

• price tables

• source codes

• customer sold-to user fields

You can download all B2B static information at once, or selected types as needed.

Related system control values:

Get Orders from E-Commerce (G35) (must be set to Y)

E-Commerce Staging Library (G56)

Division for Source Code Download (H66)

Default Price Table Code for E-Commerce Extraction (H67)

In this topic:

Process B2B E-Commerce Downloads Screen

B2B Static File Download Summary

Selecting Price Table Information for Extract

Extracting Customer Changes through a Periodic Function

Customer Extract Process Overview

Customer Extract Periodic Function Summary

Customer Extract Setup

For more information: See Downloading E-Commerce Static Files (ESTF) for an overview of the e-commerce download process and additional download options. Also, see the CWDirect E-Commerce Integration manual for information on mapping of CWDirect files and fields to the web storefront schema.

Process B2B E-Commerce Downloads Screen

How to display this screen: Enter BBED in the Fast path field at the top of any menu, or select Download B2B E-Commerce Static Files from a menu.

Note: All records in each related file for your company will be selected for download, unless noted otherwise in the field descriptions below.

ECR0325 ENTER Process B2B E-Commerce Downloads 11/02/01 15:48:30

EZK Mail Order

Select data for download:

Department . . . N N=No, Y=Yes

Position . . . . N N=No, Y=Yes

Price Table . . . N N=No, Y=Yes

Source . . . . . N N=No, Y=Yes

Customer . . . . N N=No, Y=Yes

F3=Exit F12=Cancel

Field

Description

Department

Set this field to Y to download information from the Individual Department file to the staging library; otherwise, leave this field set to N.

See Customer Service Working with Individual Departments (WDPM).

Alphanumeric, 1 position; required.

Position

Set this field to Y to download information from the Individual Position file to the staging library; otherwise, leave this field set to N.

See Customer Service Working with Individual Positions (WPOS).

Additional information will be provided by MICROS at a later date.

Alphanumeric, 1 position; required.

Price table

Set this field to Y to download information from the price table files to the staging library; otherwise, leave this field set to N. The Default Price Table Code for E-Commerce Extraction (H67) system control value defines whether to download a selected price table, or all price tables in your company.

See Marketing Working with Price Tables (WPTB) for general information on price tables; also, see Selecting Price Table Information for Extract for a discussion of the extract.

Alphanumeric, 1 position; required.

Source

Set this field to Y to download information from the Source Code file to the staging library; otherwise, leave this field set to N. The Division for Source Code Download (H66) system control value defines whether to download source codes assigned to a particular division only, or all source codes regardless of division. Only unrestricted source codes (based on the Restricted field) are included.

See Marketing Working with Source Codes (WSRC) for general information on source codes.

Alphanumeric, 1 position; required.

Customer

Set this field to Y to download customer sold-to user fields from the Customer Sold To Extended file to the staging library; otherwise, leave this field set to N. Only active customers (the Inactive field is set to N or blank) are included in selection.

See Extracting Customer Changes through a Periodic Function for information on how you can track and extract changes to customers that take place between the times you run the full B2B e-commerce download.

Alphanumeric, 1 position; required.

Instructions:

1. Set any field required for download to Y.

2. Press Enter. The system submits the job EC_B2B_DL, which downloads the selected information to the staging library specified in the E-Commerce Staging Library (G56) system control value. See B2B Static File Download Summary for a detailed list of download information.

Note: If there are already records in any of the staging files, the system just adds the new records to the file; the existing information is not deleted.

B2B Static File Download Summary

Purpose: This table provides a summary of the files and fields included in the static file download, and how they map to the files in the e-commerce staging library.

Note: Dates are in YYYMMDD format.

CWDirect File

Staging Library File

Fields

Additional Information

If you set the Department field to Y at the Process B2B E-Commerce Downloads screen:

Individual Department (CSIDDP)

EC Ind Dept (EXINDD)

Company code

Department code

Department description

 

If you set the Position field to Y at the Process B2B E-Commerce Downloads screen:

Individual Position (CSIDPP)

EC Ind Position (EXINDP)

Company code

Position code

Position description

Department required

Valid values for the Department required field are:

N = You cannot specify a department for this position.

R = Department is required for this position.

blank = Department is optional for this position.

If you set the Price table field to Y at the Process B2B E-Commerce Downloads screen:

Price Table Item (PRTBIT)

Price Table Group (PRTGRP)

Price Table Group Details (PRGRDT)

Price Table Item Details (PRITDT)

EC Price Table Item (EXPTIT)

Company code

Price table

Item and SKU

Maximum price level

Premium quantity required

Premium quantity to add

Premium multiple

Premium as free gift

Premium price

Premium $ required

Premium item and SKU

Quantity level 1-10

Price level 1-10

The Default Price Table Code for E-Commerce Extraction (H67) system control value controls whether to select a particular price table, or all price tables in your company.

See Selecting Price Table Information for Extract for more information on how the system determines which information to select.

If you set the Source field to Y at the Process B2B E-Commerce Downloads screen:

Source Code (MSSRC)

EC Source Code/PTB (EXSRCP)

Company code

Source code

Source description

Source discount

Source user fields 1-6

Last change date

Price table

Offer

The Division for Source Code Download (H66) system control value controls whether to select only source codes in a particular division, or all source codes in your company regardless of division. Only unrestricted source codes (based on the Restricted field) are included.

Note: The Last change date for a source code is updated when you first create the source code, and then each time you Enter 2 next to a source code and Press Enter to accept your entries.

If you set the Customer field to Y at the Process B2B E-Commerce Downloads screen:

Customer Sold To Extended (CSTXNA)

EC CST Ext (EXCSTE)

Company code

Customer number

Customer user-defined fields 1-4

Only active customers are selected (the Inactive field is set to N or blank).

See Extracting Customer Changes through a Periodic Function for information on how you can track and extract changes to customers made between the times you run the regular B2B e-commerce download for customers through the menu option.

Selecting Price Table Information for Extract

In addition to checking the Default Price Table Code for E-Commerce Extraction (H67) system control value, the system uses the following guidelines in determining how to populate the EC Price Table Item file (EXPTIT):

Select item or group information? If any information is defined for both the item and group, use the item information. For example, if there is a premium item specified for both the item and the group it belongs to, use the premium information specified for the item. Similarly, if there are pricing levels set up for both the item and the group, use the pricing levels for the item. However, if there is no premium item specified for the item, but there is a premium item for the group, include the group-level premium; similarly, if there is a Discount % set up at the group level, apply this percentage after applying any detail-level discounts.

How many pricing levels? The system includes price level information for up to 10 levels, if specified for the item or group, for items with a Pricing type of 1 (item quantity) or 2 (group quantity). However, the system includes only the first level of pricing information for items with a pricing type of 3 (group dollars).

SKUed items: If you enter a specific SKU when setting up the price table item, then the system selects this SKU only. If you enter the base item for a SKUed item, then the system selects all SKUs of the item; however, it does not create a record for the base item.

For more information: See Working with Price Tables (WPTB) for an overview of price tables and setup information. Also, see B2B Static File Download Summary for a summary of selected files and fields.

Extracting Customer Changes through a Periodic Function

If you would like to track and download changes to the customer user fields without running the regular B2B e-commerce download for customers through the menu option, you can use the process described below. This process may be more efficient and less time-consuming than running the download menu option repeatedly, since you use a periodic function that selects customer records that:

• are active, based on the setting of the Inactive field for the customer (Note: The download menu option also selects only active customers)

• have been:

• newly created, if they include user field information

• updated, if the update includes a change, addition, or deletion of any of the user fields

• deleted, if the deleted customer included user field information

 

Note: The periodic function does not select customers that have changed status from inactive to active; these records will be selected the next time you use the menu option to download customer information. Neither the periodic function nor the menu option selects customers that have changed status from active to inactive.

Customer Extract Process Overview

Customer Extract Periodic Function Summary

Sample

Customer

Activity

Periodic Function Selects Customer for Extract?

Existing, active customer with user field information

Change a user field

yes

Change customer status to inactive

no

Delete

yes

New customer with user field information

Create

yes

Existing, inactive customer with user field information

Change a user field

no

Change customer status to active

no (but customer will be selected when you run the menu option)

Delete

no

Existing, active customer without user field information

Add user field information

yes

Change customer status to inactive

no

Delete

no

Existing, inactive customer without user field information

Add user field information

no

Change customer status to active

no

Delete

no

Customer Extract Setup

1. Set up the trigger program to track changes: This step is necessary because, once you have set up the trigger program and run the initial B2B e-commerce customer download, the system will use the Customer Information Extract file (ECCSTX) to track when customer user field information is extracted to the staging file, when new customers with user fields are created, and when any changes are made to the user fields. When you run the periodic function, it will use the extract file to determine which customers have had changes to their user fields since the last time you extracted records to the staging file. You should set up the trigger program before running the initial B2B download so that you do not miss any relevant changes.

To set up the trigger program:

1. Make sure that there are no users in CWDirect, including any batch or asynchronous jobs. Setting up the trigger program will work only if nobody is using the Customer Extended file (CSTXNA), which is where the customer user fields are located.

2. Log in to CWDirect and press F14 to display a command line. At the command line, enter CALL ECC0352 ‘ADD’ to set up the trigger program.

2. Run the B2B customer download: Run the regular B2B e-commerce download through the menu option, with the Customer field set to Y. The system creates records in the:

• EC Customer Extended staging file (EXCSTE) for download to the web storefront.

• Customer Information Extract file (ECCSTX), so the trigger program can then track subsequent changes to the selected customers. When you run the download, the system sets the Extract date and Extract time in the Customer Information Extract file to the current date and time.

As you add, update, or delete the user fields on existing customer records, the trigger program updates the corresponding Customer Information Extract record with the change date and time. Similarly, the trigger program creates records in the Customer Information Extract file when you create a new customer who has user field information, or change an inactive customer with user field information to active status.

3. Set up the periodic function: Create a periodic function for the program ECX0358 and assign the function to a periodic process. See Working with Periodic Functions (WPER) and Working with Periodic Processes (WPPR).

4. Run the periodic process that includes the function: The periodic function goes through the Customer Information Extract file and checks each record to see if it has been changed since the last extract; if it has, the function creates a record in the EC Customer Extended (EXCSTE) staging file. Again, only active customers are selected by the periodic function.

SO10_16 CWDirect 18.0.x 2018 OTN