Importing Store Cross Reference Locations through Locate’s Discovery Web Service

Purpose: You can use Locate’s discovery web service to request the codes, descriptions and addresses of locations from Locate, and use this information to create Store Cross Reference records in CWSerenade. A periodic function calls the web service and specifies the system in Locate whose locations should be imported and used to create the cross-reference records.

Location discovery setup:

Periodic function: Create a periodic function such as IMPSTLC using the Program name PFR0122 and assign it to a periodic process. The Parameter for the periodic function is composed of up to 11 positions, where:

position 1 = Y or y if the store cross-reference records should be created with the Ship to store flag selected; otherwise, you would typically set the first position to N. If the first position is set to anything other than Y or y, the Ship to store flag is unselected for the Store Cross Reference record.

positions 2-11 = The code identifying the system associated with the locations. Must be a valid system code in Locate.

Example: If the parameter is set to NPOS, the periodic function imports location records for system POS in Locate, and leaves the Ship to store flag for each imported location unselected.

Required property file setting: To import locations using the discovery web service, you need to set the CW_LOCATE_DISCOVERY_SERVICES_WSDL_LOCATION entry in the cwdirectcp_locate.properties file to http://SERVER:8080/Locate/DiscoveryServices?WSDL, where SERVER is the name of your Locate server.

Location discovery processing: The periodic function:

• Sends a request to Locate’s discovery web service for locations in the system specified in the Parameter for the periodic function, as described above.

• Receives a response from Locate’s discovery web service, listing all locations in the specified system, excluding the Default Unfulfillable Location.

• For each location code specified in the response message that does not match an existing record, creates a new Store Cross Reference record in the company specified for the periodic process, using the first position of the periodic function’s Parameter to determine whether to select the Ship to store flag for the new record. See below for mapping details.

Note:

• Prior to Locate 5.3, the Default Unfulfillable Location is labeled the Default Shipping Location at the Preferences screen.

• If there is already a Store Cross Reference record for a location specified in the response message, the function does not update it.

• If the first position of the Parameter is not Y or y, the Store Cross Reference records are created with the Ship to store flag unselected.

• If a valid system in Locate is not specified by positions 2-11 of the Parameter, Locate does not return any locations in the response, and no Store Cross Reference records are created.

• All characters are converted to uppercase when creating the Store Cross Reference records.

• If the information passed for a field from Locate exceeds the length of the corresponding field in CWSerenade, it is truncated.

• Only the fields listed below are mapped. For example, the apartment or suite, if any, for the location is not mapped from Locate to CWSerenade.

• Locate does not log the discovery web service messages; however, CWSerenade logs the activity in the Locate Log.

• The function does not validate the data passed, such as city, state, or postal code, when creating new records.

For more information: See:

• the Locate Operations Guide for details on the discovery web services.

Working with Periodic Functions (WPER) and Working with Periodic Processes (WPPR) for information on setting up and running the periodic function.

Work with Store Cross Reference (WSCR) for information on working with Store Cross References and on how they are used.

Location data mapping: The table below describes how the function maps the data from the web service response when creating Store Cross Reference records.

From Locate

Store Cross Reference Record

Comments

N/A

Company code

From the Company specified when executing the periodic process.

location code

Store #

 

Name

Description

 

N/A

Ship to store

From the first position of the Parameter specified for the periodic function; see above.

Address lines 1-4

Address lines 1-4

Truncated if they exceed 32 positions.

City

City

 

State or province

State

Truncated if it exceeds 2 positions.

Postal code

Postal code

 

Country code

Country code

 

Telephone number

Telephone number

Truncated if it exceeds 14 positions.

N/A

Active

Selected (set to Y).

WSCR Serenade 5.0 March 2015