Siebel Marketing Guide > Administering Siebel Real-Time Marketing > Setting Up the Analytics Server >

Creating an Interface to a Third-Party Scoring Engine


To establish an interface to the scoring engine, you need to create an intermediate DLL that translates communications between Siebel Analytics and your third-party scoring engine software.

During processing, Siebel Analytics loads the customer-created intermediate DLL, passing in input parameters. The intermediate DLL packages (translates) the input parameters, invoking the third-party scoring engine software. When the third-party scoring engine software returns results, the results are packaged (translated) to return to analytics.

Intermediate DLL Code—An Example

This section contains an example of a framework (or skeleton) function. The framework illustrates the type of function that a customer needs to implement and the operations that the function usually performs. For more information, see Siebel Analytics Installation and Configuration Guide. Intermediate DLL code should define the following:

To create an intermediate DLL you need to code the following logical steps:

#ifdef ITERATIVEGATEWAYDLL_EXPORTS

#define ITERATIVEGATEWAYDLL_API __declspec(dllexport)

#else

#define ITERATIVEGATEWAYDLL_API __declspec(dllimport)

#endif

typedef unsigned char uint8;

typedef enum SiebelAnalyticColumnValueType { VarCharData = 0 };

// This structure can currently support string types only

struct SiebelAnalyticColumnMetaInfo

{

wchar_t * columnName;

SiebelAnalyticColumnValueType columnValueType;

int columnWidth; // actual size of the column values in bytes for both in/out

};

extern "C" ITERATIVEGATEWAYDLL_API

int ExecuteIterativeQuery (

/* [in] */ const wchar_t* modelId,

/* [in] */ const int inputColumnCount,

/* [in] */ const SiebelAnalyticColumnMetaInfo* pInputColumnMetaInfoArray,

/* [in] */ const uint8* inputColumnValueBuffer,

/* [in] */ const int outputColumnCount, // actual count of columns returned

/* [in/out] */ SiebelAnalyticColumnMetaInfo* pOutputColumnMetaInfoArray,

/* [out] */ uint8* outputColumnValueBuffer)

{

// Retrieve the input column names, width, and values

// Retrieve the output column names and width

// Call third-party scoring engine DLL functions to retrieve the outputs value

// Set outputs column width

// Package the outputs value into outputColumnValueBuffer

// Return

}

Table 47 describes the meaning of each parameter that is passed for the function that the customer needs to implement.

Table 47.  Function Parameter Definitions
Term
Description
inputColumnCount
The number of input columns.
inputColumnValueBuffer
A buffer of bytes containing the value of the input columns. The actual size of each column value is specified in the columnWidth field of the SiebelAnalyticColumnMetaInfo. The column values are placed in the buffer in the order in which the columns appear in the pInputColumnMetaInfoArray.
modelId
An optional argument that the user may specify in the Search Utility box in the XML tab of the Physical table.
OutputColumnCount
The number of output columns. pOutputColumnMetaInfoArray is an array of meta column information for the output column. SiebelAnalyticColumnMetaInfo is declared in the public header file IterativeGatewayDll.h that we ship with Siebel Analytics. The caller of the API provides the column name and the call recipient sets the data type of the column (currently we only support VarCharData) and the size of the column value.
outputColumnValueBuffer
A buffer of bytes containing the value of the output columns. The actual size of each column value is specified in the columnWidth field of the SiebelAnalyticColumnMetaInfo. The column values must be placed in the buffer in the order in which the columns appear in the pOutputColumnMetaInfoArray.
pInputColumnMetaInfoArray
An array of meta information for the input columns. SiebelAnalyticColumnMetaInfo is declared in the public header file IterativeGatewayDll.h which we ship with Siebel Analytics.


 Siebel Marketing Guide 
 Published: 23 June 2003