Skip Headers
Oracle® Retail Size Profile Optimization Implementation Guide
Release 14.1
E55738-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

6 Script Integration

This chapter describes the script integration of the Fashion Planning Bundle applications and integration with Allocation.

Integration Script

Integration scripts are used for moving data between applications. The following rules apply to integration scripts:

  • The exportMeasure utility is used to export data in CSV (comma-separated values) format. This maintains the consistency of start and width attributes across different applications.

  • Data exported from the source application is placed in the destination domain input directory.

  • Export scripts must run before load scripts. They should be run in the batch window.

  • Do not hard-code domain paths. The paths are entered as command-line arguments.

For prepack-related integration scripts, see Chapter 10.

Table 6-1 lists the integration scripts for SPO

Table 6-1 Integration Script

Application Script Name Arguments

SPO

exportSizeOptToAP.ksh

destination, maxprocesses, loadmeasures

SPO

exportSizeOptToAlloc.ksh

domain, output folder, product level


Batch Design

This section contains detailed information on the following integration tasks:

Export to AP

Script

exportSizeOptToAP.ksh

Usage

exportSizeOptToAP.ksh <destination> <maxprocesses> <loadmeasures>

Table 6-2 Export to AP Script Arguments

Argument Description Allowed Values

destination

Determines the AP master domain path.

-dest

If -dest is specified, the path is set to $AP_MASTERDOMAIN.

If -dest is not specified, the path is set to
$SIZEOPT_MASTERDOMAIN.

maxprocesses

Sets the maximum number of export processes to run in parallel.

-n or noparallel

n is the number of processes to run in parallel. The default is 1.

If noparallel is specified, the processes do not run in parallel.

loadmeasures

Determines whether the measures are loaded into the AP database.

-load or -noload

If -load is specified, the exported measures are loaded into the AP database. This is the default.

If -noload is specified, the exported measures are not loaded into the AP database.


Example
exportSizeOptToAP.ksh -dest 10 -noload

Table 6-3 Export to AP Error Information

Task Name Error Code Abort Required? Description of Error

export

1

yes

Unrecognized flag passed to script.

export

2

yes

Variable AP_MASTERDOMAIN is not set.

export

3

yes

$AP_MASTERDOMAIN is not an existing directory.

export

4

yes

Variable SIZEOPT_MASTERDOMAIN is not set.

export

5

yes

$SIZEOPT_MASTERDOMAIN is not an existing directory.

export

6

yes

Variable SIZEOPT_HOME is not set.

export

7

yes

$SIZEOPT_HOME is not an existing directory.



Notes:

  • This script is optional and should be used only if exports to AP are required.

  • The script uses the RPAS exportMeasure functionality to export the resolved size profile when needed. See the Oracle Retail Predictive Application Server Administration Guide for details on this utility.

  • If the Prepack Optimization component is installed with AP, modify the exportSizeOptToAP.ksh script to prevent the script from overwriting the AP prepack definitions data. To modify, add a comment to the related line by prefixing ”#” as follows:

    # f_export skuppacksizd eptpackdef eptpackdef


The pckopt_export_batch.sh script converts prepack configurations and prepack calendars from prepack's internal format into a format that is acceptable by AP. For more details on this script, see Prepack Optimization Export Batch.

Export to Allocation

The following diagram illustrates the process involved in the data flow between Size Profile Optimization and Allocation applications. SPO exports the size profile information in flat files which is formatted for use within Allocation. Allocation uses Oracle Retail Extract Transform and Load (RETL) to extract this information.

Figure 6-1 Integration with Allocation


Script

exportSizeOptToAlloc.ksh

Usage

exportSizeOptToAlloc.ksh <domain> <output folder> <product level>

Table 6-4 Export to Allocation Script Arguments

Argument Description Values Allowed

domain

Sets the path to the current folder.

-d {current folder}

output folder

Sets the location for the output file to be placed. If not specified, the output file is placed in the location specified in the RPAS_EXPORT environment variable. If neither is specified, the operation is aborted.

-o {output folder}

product level

Sets the product level at which output file must be prepared. . The valid value is itpt (item). For other values, operation is aborted.

-p {product level} where {product level} is itpt.


Export File Naming Convention

The output file name starts with lower-case d and follows a standard naming convention:

d<diff count><product level>.<domain ID> where:

  • <diff count> represents the number of differentiators included in the output. This value is constant, which is 2 (representing size and color).

  • <product level> is a four-character sequence representing the product level at which the export is prepared. The valid value is itpt (item).

  • <domain ID> is a constant with a value 01.

Example

d2itpt.01

Export File Format

Table 6-5 Export File Format

Field Name Start Position Width Format Sample Content

Product ID

1

25 char

Alpha

100045078

Location ID

26

20 char

Alpha

1000000002

Diff ID

46

48 char

Alpha

_CCOLOR01_S30x32

Value

94

12 char

Numeric

000000137500


Environment Variables

SIZEOPT_HOME must be set to the bin directory which in turn contains various SPO related scripts (such as spo_batch.sh).

RPAS_EXPORT may be set to indicate the path of the directory where the output file must be placed. If this variable is not set, the exportSizeOptToAlloc.ksh script does not execute.