Classes and Properties

The following “shared” classes are used in both SXI and SINI calls.

ApprovalEventEntry

Since version 7.5

The ApprovalEventEntry class is used in SINI by the GetApprovalEvents method.

ApprovalEventEntry {

   String ApprovalStepID; //id of the approval step associated with the event, if any

   String OrderId; // internal order id associated with the event

   String DocumentId; // internal document id associated with the event, if any

   DateTime EventTime; // when the event happened

   String MessageType; // (I) Info, (A) ApprovalAction, or (C) Comment

   String Message; // Description of what happened during event

   String ApprovalEventEntryID; // id of the ApprovalEventEntry object, u

}

ApprovalStep

Since version 7.5

The ApprovalStep class is used by both SINI and SXI to represent a single step in a multistep approval process.

ApprovalStep {

   List<string> UserIds; //user specifically assigned to review

   List<string> GroupNames; //groups assigned to review

   List<string> DocumentIds; //documents to be approved by the users/      

                         groups

   bool CanLookAhead; //can step’s reviewers see order before action is required

   int StepNumber; //the step’s order number within order’s steps.

   string ApprovalStepId; //should be left blank when creating new objects

   string OrderId; // internal order id associated with the step

}

CustomStep

Since version 9.3

The CustomStep class represents a custom workflow step on the product customization page.

CustomStep {

   string StepTitle; // The string that appears in the step title bar

   int StepIndex; // Where the step is placed in the hierarchy. Steps are

                numbered starting with 1.

   string StepID; // a string you can use to identify this step to your

                JavaScript

   string StepContents; // The HTML to be used as the step contents. Could

                      just be a placeholder for front end code.

}

FieldValue

Since version 2.0

The FieldValue structure is used in SXI in the SelfRegister_Before, UserFieldsUpdate_Before, and UserFieldsUpdate_After calls, and SINI in the GetValues, SetValues, and GetAllValues calls, where it is necessary to transfer information about a number of fields all at once. It’s a flat structure for getting or setting values in Storefront. The objectId is one of a user id, doc id, order id, or null, depending on the fieldType.

public class FieldValue {

public string fieldType;

public string fieldName;

public string objectId;

public string fieldValue;

}

For example, you can use an array of FieldValue structures within the SINI GetValues or SetValues calls to perform multiple operations with a single call.

InventoryItem

Since version 9.1

Supports tighter integration between inventory extensions and the Storefront UI. It is the responsibility of the extension to create these objects by using the QueryInventoryModule2 SXI event provided for that purpose. (The QueryInventoryModule event will still work but will not take advantage of all the UI features available beginning with version 9.)

public class InventoryItem

   {

      public string ProductID { get; set; }

         //the ID of the Storefront product

      public string SKU { get; set; }

         //taken from the PRODUCT_SKU metadata field

      public long QuantityOnHand { get; set; }

         //number of unreserved items in physical inventory

      public long AvailableQuantity { get; set; }

         //number of items on hand minus any that have been reserved

      public bool isTracked { get; set; }

         //does inventory extension keep track of this item

      public string Behavior { get; set; }

         //set to ”allow” if item may be backordered; otherwise “block”

      public string BackOrderMessage { get; set; }

         //message to display when available quantity is less than what

         //has been requested but backordering is allowed

      public string CantOrderMessage { get; set; }

         //message to display when available quantity is less than what

         //has been requested and backordering is blocked

   }

KeyValuePair

Since version 2.0

An array of these is sometimes used to transmit the contents of an HTML form or a Hashtable.

public class KeyValuePair

{

public string Name;

public string Value;

}

NotificationContext

Since version 9.6

This structure is used in the SendNotification SINI method to supply information on which notification to send and supply relevant data.

public class NotificationContext

    {

        public string notificationName;

        public string format;  // "HTML" or "PLAIN"

        public string orderID;

        public string documentID;

        public string userID;

        public string approvalStepID;

    }

OptionFieldSpec

Since version 3.0

Used to transmit the specifications for an option field. Used by GetQueryOptionFieldSpecifications to construct fields for the Data Acquisition page.

public class OptionFieldSpec

{

public string fieldName;       // internal name of the field

public string displayName;       // user-visible field name

public PickListItem[] options; // field item choices

public string controlType;      // type of control, e.g. TXT_ONE

public string condField;      // field depended on if any

public string condValue;      // condition for display

public string condCondition;   // value for conditional display

public string cssStyle;      // CSS style of the control

public string validationRegExp;   // reg. expression for validation

public string invalidValueError;   // string to display when invalid

public string defaultValue;      // default value of field

public string defaultProfileField; // user field for initial value

public int minChoices; // multi-valued control: minimum number

public int maxChoices; // multi-valued control: maximum number

public int nColumns; // number of columns for control display

public int widthPixels; // width of control in pixels

public int heightLines; // height of control in lines

}

PaymentRequest

Since version 2.5

The PaymentRequest has the standard information from the Payment page and is used in the AuthorizeTransaction() call.

public class PaymentRequest

{

public string storefrontName;   // name of Storefront deployment

public string externalOrderID;   // external group identifier

public double amount;         // amount

public string isoCurrencyCode;   // ISO 4217 code of currency

public string methodOfPayment;   // e.g. “CreditCard”

public string purchaseOrder;   // PO Number field

public string creditCardProvider;   // Credit Card provider

public string creditCardNumber;   // Credit Card number

public string creditCardExpiration; // Expiration date

public string creditCardSecurityCode; // Security code from card

public string orderID;      // Internal Order identifier

public string billingName;      // Name as it appears on card

public string billingAddress;   // Street address

public string billingCity;      // City

public string billingState;      // State or Province

public string billingZip;      // ZIP or Postal Code

public string billingCountry;   // 2-letter Country code

}

PaymentResponse

Since version 2.5

The PaymentResponse contains information returned from an Authorize or DelayedCapture2 transaction.

public class PaymentResponse

{

public string TransactionID;   // sequence code of transaction

public string CollectionToken;   // collection token from Authorize

public int result;         // result of transaction

public int cvvOK;         // result of Security Code check

public int addrOK;         // result of address check

public int zipOK;         // result of ZIP code check

public string message;      // message for log, if error

}

The result field contains one of the following values:

public const int ccSUCCESS = 10; // the answer is Yes

public const int ccDECLINE = 11; // the answer is No

public const int ccUNAVAILABLE = 12; // no answer temporarily

public const int ccINVALID = 13; // some inputs were invalid

public const int ccUNIMPLEMENTED = 14; // some option is unsupported

public const int ccINTERNALERROR = 15; // something else went wrong

public const int ccNOTAPPLICABLE = 16; // no answer required

public const int ccDECLINE_MSG = 17; // same as 11 (with message)

public const int ccUNAVAIL_MSG = 18; // same as 12 (with message)

Codes ccDECLINE_MSG and ccUNAVAIL_MSG have a special meaning in that they intend the first part of the message to be displayed to the user, after being looked up in the Storefront’s string resources file.

PickListItem

Since version 2.5

Used to transmit the values of a pick list field (see GetPickListData). The “name” is the string displayed to the user for this value, e.g. “Massachusetts”. The “value” is the internal value which will actually be stored in the database, e.g. “MA”. If the form field is set to take its default value from the data source, then the first item whose “selected” field is true will be used as the default.

public class PickListItem

{

public string Name;

public string Value;

public bool IsSelected;

public string GetName();

public string GetValue();

public void SetName(string n);

public void SetValue(string v);

}

ReviewAction

Since version 7.5

The ReviewAction class is used in SINI with the AdvanceApproval method. It must had a Document ID and Approve value assigned.

ApprovalAction {

   String DocId; //internal document ID

   String comment; //reviewer’s comment to attach to the document

   Bool Approve; //true to approve the document, false to reject it.

}

SiniCategoryData

Since version 8.5

The SiniCategoryData structure has data describing a Storefront category.

public class SiniCategoryData

   {

      public string Name { get; set; }

      public string ToolTip { get; set; }

      public string Description { get; set; }

      public string ThumbnailUrl { get; set; }

      public string CategoryID { get; set; }

   }

SINILedgerEntry

Since version 2.5

The SINILedgerEntry structure has data from the Ledger of financial transactions.

public class SINILedgerEntry

   {

      public string sequenceID;   // serial number of the ledger event

      public string dateTime;   // time stamp of the ledger event   

      public string orderGroupID;   // order ID to which this refers

      public string operatorID;   // logged-on user or admin

      public double reserveDelta;   // change in amount authorized

      public double balanceDelta;   // change in amount due

      public string collectionToken; // string to provide to the

// DelayedCapture2() event

      public string isoCurrencyCode; // 3-letter ISO code of currency

      public char opCode;      // a code for what type of ledger event

      public string description;   // natural-language description of event

   }

The opCode is a single Unicode character which is interpreted as follows:

^

Created order

N

Initial nontaxable balance

T

Initial taxable balance

R

Funds reserved

+

Balance adjustment (nontaxable)

*

Balance adjustment (taxable)

%

Tax adjustment

X

Funds relinquished (abandon authorization)

$

Funds collected

!

Failed to collect (temporarily)

F

Failed to collect (permanent)

SINILogEntry

Since version 2.5

The SINILogEntry is a structure with data from the log.

public class SINILogEntry

   {

      public string eventID;    // serial number of the log event

      public string sessionID; // Storefront session in progress

      public string orderID; // order ID in process (currently unused)

      public string documentID;    // document ID in process

      public string machine;    // machine name of the event

      public string source;       // who generated (3=user side, 4=admin)

      public string category;    // what kind of event

      public string eventClass;    // class of event (1=ordinary, 2=error)

      public string eventLevel;    // importance (1 = low, ..., 3 = high)

      public string eventCode;    // error number (currently 0)

      public string message;    // message for error (currently null)

      public string dateTime;    // date and time of event

      public string sourceFile;    // source file where generated

      public string sourceData;    // source line where generated

      public string msgExtra;    // text message for admin

   }

SiniMessageFormat

Since version 9.1

Used with the DisplayMessage2 SINI method.

An enumeration indicating the format of the message:

Text—ordinary plain text

HTML—marked-up text

SiniMessageSeverity

Since version 9.1

Used with the DisplayMessage2 SINI method.

An enumeration indicating the semantic type of message:

Info—informational or affirmative message, typically displayed on a green background

Warning—warning message (yellow background)

Error—error message (red background)

SiniProductData

Since version 8.5

The SiniProductData structure has data describing a Storefront product.

public class SiniProductData

   {

      public string Name { get; set; }

      public string ToolTip { get; set; }

      public string Description { get; set; }

      public string ThumbnailUrl { get; set; }

      public string ProductID { get; set; }

      public string UrlEdit { get; set; } // URL for entering the editing

                                     steps for the product

      public string UrlPermalink { get; set; }

   }

SINITaxData

Since version 8.0

The SINITaxData structure has data about a tax location, as specified in the Storefront tax tables.

public class SINITaxData

   {

      public string ID;            

            // internal tax locale ID

      public string Name;   

            // admin-defined name of the tax locale

      public string CountryCode;

            // ISO-3166 country code of the tax locale

      public string StateProvinceCode;

            // USPS or Canada Post abbreviation of the state or province

      public string PostalCodeMin;

            // minimum postal code to which the locale applies

      public string PostalCodeMax;

            // maximum postal code to which the locale applies

      public string[] RateCategories;

            // list of relevant tax categories for the locale

      public double[] RateValues;

            // tax rate for each of the tax categories in that locale

}

If PostalCodeMin == PostalCodeMax, then the locale applies to a single postal code. If both are null then the locale covers the entire state or province, or the entire country (if StateProvinceCode is null).

TaxLocation

Since version 6.0

This is a container which is used to transmit tax location information.

public interface TaxLocation

{

string DisplayName { get; }

bool shippingIsTaxed { get; }

bool downloadsAreTaxed { get; }

bool dataListsAreTaxed { get; }

bool handlingIsTaxed { get; }

}

If the tax location is indeterminate then the DisplayName will return the string “(None)” and all properties will be false.

TaxValue

Since version 6.1

This is a structure with tax value information.

public class TaxValue

{

public double amount;   // the amount of tax

public double prevAmount;   // the amount that would be assigned by

                            the system tax tables

public string currency;   // the ISO currency code, such as USD or GBP

public string taxLocaleName;   // the tax locale, such as "MA" or "US"

                               (if there were a federal sales tax)

}