Commerce Foundation BasketGroup

The Commerce Foundation BasketGroup entity is exposed to provide the option to implement a BasketGroup that can contain multiple basket instances. Each basket instance within a BasketGroup maps to a distinct OrderForm.

Note

The use of a BasketGroup entity is optional. The Microsoft SharePoint 2010 Solution Storefront does not make use of the BasketGroup entity. For convenience, however, prepackaged code samples and configuration files contain all metadata and configuration data required to implement related options.

Model

The Commerce Foundation BasketGroup entity can be modified, as required. The following model is provided as an example.

<CommerceEntity name="BasketGroup">
  <EntityMappings>
    <EntityMapping csType="Microsoft.CommerceServer.Runtime.Orders.Basket" csAssembly="Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <PropertyMappings>
      <PropertyMapping property="Id" csProperty="OrderGroupId" />
      <PropertyMapping property="Name" csProperty="Name" />
      <PropertyMapping property="DateCreated" csProperty="Created" />
      <PropertyMapping property="DateModified" csProperty="LastModified" />
      <PropertyMapping property="BillingCurrency" csProperty="BillingCurrency"/>
      <PropertyMapping property="OrderNumber" csProperty="TrackingNumber"/>
      <PropertyMapping property="UserId" csProperty="SoldToId"/>
      <PropertyMapping property="BasketType" csProperty="BasketType"/> 
    </PropertyMappings>
  </EntityMapping>
</EntityMappings>

<Relationships>
    <Relationship name="Baskets" type="Relationship" modelName="Basket" isMultipleItems="true" />
    <Relationship name="Addresses" type="Relationship" modelName="Address" isMultipleItems="true" csArea="Orders" />
</Relationships>

<Properties>
   <Property name="BasketType" dataType="Integer">
       <EnumeratedValues >
     <EnumerationEntry value="0">
<DisplayName value="Cart" />
</EnumerationEntry>
<EnumerationEntry value="1">
<DisplayName value="Order" />
</EnumerationEntry>
</EnumeratedValues>
</Property>
</Properties>
</CommerceEntity>

Properties

Property

Type

Description

Id

String

Unique identifier of the commerce entity.

Name

String

Gets or sets the name of the BasketGroup.

BasketType

String

Type of basket specified as follows:

0 - Cart

1 - Order

UserId

String

User identifier of the shopper associated with the BasketGroup.

HandlingTotal

Decimal

The total handling charge for the BasketGroup.

ShippingTotal

Decimal

The total shipping charges associated to the BasketGroup instance, after all the applicable shipping discounts have been applied.

Subtotal

Decimal

Total amount for the BasketGroup instance, after line item totals and line item discounts have been applied, but before shipping, shipping discounts, handling and taxes have been applied.

TaxTotal

Decimal

The sum total of sub total, shipping, handling and taxes for the current BasketGroup instance.

Total

Decimal

The sum of all line items, handling, shipping and tax totals for the current BasketGroup instance.

OrderNumber

String

A string value that uniquely identifies a placed order.

Created

DateTime

Date the commerce entity was created.

LastModified

DateTime

Date the commerce entity was last modified.

Status

String

Gets or sets the status of the baskets within a BasketGroup. This value may be user-defined, but known values include:

InProcess - The basket is still being built. Totals are not ready for review.

ReadyForcheckout - The basket totals are ready to be reviewed.

Ordered - The basket is ready to be converted to an order.

Relationships

Property

Description

Baskets

List of basket entities within a BasketGroup.

Addresses

List of addresses for the current basket.

Supported Operations

The Commerce Foundation BasketGroup entity supports the following operations:

Commerce Foundation BasketGroup QueryOperation

Commerce Foundation BasketGroup UpdateOperation

Commerce Foundation BasketGroup DeleteOperation

The BasketGroup entity does not support a Commerce CreateOperation. In the absence of a BasketGroup instance, the CommerceUpdate<BasketGroup> operation creates a BasketGroup instance.

See Also

Other Resources

Commerce Foundation Basket