Arguments for the Add To Cart Method

The arguments for the AddToCart method are shown in the following table.

Name Type Data Type Optional Comments

Action

Input

String

Y

Specifies the action to take.

Action can take the following values:

  • AddToCart

  • Customize
  • QuickAdd
  • AddTrainingItem
  • AddEventItem
  • AddEventSessionItem

AddToCart Quote Fields

Input

String

Y

This argument is used to pass the field values set in the Quote business component. It is a concatenated string of Quote business component field name/value pairs.

The input value is in the following format:

fieldName1=fieldValue1|fieldName2=fieldVal
ue2|...

For example, if you set the Description and Discount Reason fields, then the input user property value is as follows:

Description=Returning customer|Discount 
Reason=Gold member of the loyalty program
Note: This only impacts new quotes, and not existing quotes.

AddToCart deconstructs this string and sets the corresponding fields in the Quote business component.

AddToCart Quote Item Fields

Inputs

String

Y

This argument is used to pass the field values set in the Quote Item business component.

The input value is in the following format:

fieldName1=fieldValue1|fieldName2=fieldVal
ue2|...

For example, if you want to set the Adjust List Price, Base Price, and Quantity Requested fields, then the input user property value is as follows:

Base Price=500|Adjusted List 
Price=450|Quantity Requested=3
Note: If you set a field that triggers a reprice, such as Quantity Requested, then that field must be set at the end of the string.

AddToCart AutoQuote

Input

String

Y

Used to decide whether to create a new quote automatically if there is no current quote.

If empty, AddToCart looks for the server component parameter with the same name.

AddToCart GotoView

Input

String

Y

Used to decide to which view to navigate after adding an item has been completed.

If empty, AddToCart looks for the server component parameter with the same name.

Source Currency Code

Input

String

Y

Specifies the currency code for the price.

If not empty and not equal to the currency code in the quote, AddToCart does the currency conversion and sets the converted Price field in the quote item.

Quote Id

Output

String

Y

Returns the quote ID for the current quote.

Quote Item Id

Output

String

Y

Returns the quote item ID.

ReturnVal

Output

String

Y

Returns Success or Fail. Not used.