CyberStore Ecommerce 2023 Documentation
AddLineDetail

Adds a new line detail to the current Shopping Cart for the logged-in user. If the Item does not exist in SYSPRO, the request can either fail or optionally create the stock code in SYSPRO. When the request creates the stock code, it adds it as a new Item and then adds the line detail.

 

 

AddLineDetail Post Parameters

The AddLineDetail operation has the following supported properties for posting queries:

Note:

Parameters surrounded by square brackets (e.g., [TemplateStockCode] ) are optional and do not have to be sent with the request.

 

Parameter

Description

ClientCode

A unique value assigned to your application after it is registered within the CyberStore Console > CyberStore Connect maintenance screen. You must include this value in your request.

SessionToken

A unique value assigned by the CyberStore application to a user’s unique session. It is created after a successful login to the website via the CyberStore login screen. You must include this value in your request. Information about how to receive and capture the SessionToken is described in more detail later in this document.

ClientSession_ID

A unique identifier created by the application that runs on your registered client application. You need to capture it and send it with your request. CyberStore Connect utilizes this value, combined with the SessionToken and ClientCode, to validate the authenticity of the request.

StockCode

The stock code of the Item to add to the Cart

[Quantity]

The quantity to add to the Cart. If blank, 1 will be used as the default.

[UOM]

The unit of measure to add to the Cart. If blank, the CyberStore preferred unit of measure will be used.

[UnitPrice]

The unit price to add to the Cart. This overrides the price returned through normal processing for the Customer.

AddLineDetail Query Results

When you submit a request to the AddLineDetail operation, the response message is returned as an XML string. A query posted with the required, authenticated parameters returns results similar to the XML string below:

   
Example AddLineDetail Query Results
Copy Code
<?xml version="1.0" encoding="utf-8"?>
<CyberStoreConnect>
  <Profile>
    <FirstName><![CDATA[Susan]]></FirstName>
    <LastName><![CDATA[Brown]]></LastName>
    <FullName><![CDATA[Susan Brown]]></FullName>
    <Username><![CDATA[sbrown@bikesblades.com]]></Username>
    <EmailAddress><![CDATA[sbrown@bikesblades.com]]></EmailAddress>
    <CustomerClass><![CDATA[Wholesaler]]></CustomerClass>
    <Customer><![CDATA[000002]]></Customer>
    <CustomerName><![CDATA[Bikes & Blades – North]]></CustomerName>
    <ViewList><![CDATA[Wholesaler View]]></ViewList>
  </Profile>
     <StockCode><![CDATA[A100]]></StockCode>
     <Quantity><![CDATA[1]]></Quantity>
     <UOM><![CDATA[EA]]></UOM>
     <UnitPrice><![CDATA[560.00]]><UnitPrice>
     <LineDetails>
       <LineDetail>
          <StockCode><![CDATA[A100]]></StockCode>
          <ItemName><![CDATA[15 Speed Mountain Bike Boys]]></ItemName>
          <ItemType><![CDATA[B]]></ItemType>
          <Quantity><![CDATA[1]]></Quantity>
          <UOM><![CDATA[EA]]></UOM>
          <UnitPrice><![CDATA[560.00]]></UnitPrice>
          <TotalPrice><![CDATA[560.00]]></TotalPrice>
          <UnitMass><![CDATA[10.000000]]></UnitMass>
          <TotalMass><![CDATA[10.000000]]></TotalMass>
          <UnitVolume><![CDATA[0.300000]]></UnitVolume>
          <TotalVolume><![CDATA[0.300000]]></TotalVolume>
          <ShipDays><![CDATA[0]]></ShipDays>
    </LineDetail>
    <LineDetail>
          <StockCode><![CDATA[A101]]></StockCode>
          <ItemName><![CDATA[15 Speed Mountain Bike Girls]]></ItemName>
          <ItemType><![CDATA[B]]></ItemType>
          <Quantity><![CDATA[2]]></Quantity>
          <UOM><![CDATA[EA]]></UOM>
          <UnitPrice><![CDATA[560.00]]></UnitPrice>
          <TotalPrice><![CDATA[1120.00]]></TotalPrice>
          <UnitMass><![CDATA[10.000000]]></UnitMass>
          <TotalMass><![CDATA[20.000000]]></TotalMass>
          <UnitVolume><![CDATA[0.300000]]></UnitVolume>
          <TotalVolume><![CDATA[0.600000]]></TotalVolume>
          <ShipDays><![CDATA[0]]></ShipDays>
    </LineDetail>
  </LineDetails>
  <SubTotal><![CDATA[1680.00]]></SubTotal>
  <EventResponse>
    <Module>API</Module>
    <Severity>0</Severity>
    <Number>000</Number>
    <Message>Success!</Message>
   </EventResponse>
</CyberStoreConnect>

 

The XML string above contains the following elements:

Element

Description

Profile

The information about the logged-in user’s session profile. See GetProfile for the complete definition of the Profile Results.

StockCode

The stock code that is requested to be added to the Shopping Cart.

Quantity

The quantity that is sent with the request to add the Item to the Shopping Cart. If one is not sent, it will return a blank value.

UOM

The unit of measure that is sent with the request to add the Item to the Shopping Cart. If one is not sent, it will return a blank value.

UnitPrice

The unit price that is sent with the request to add the Item to the Shopping Cart. If one is not sent, it will return a blank value.

LineDetails

All detail lines in the Shopping Cart.

LineDetail

A single detail line in the Shopping Cart.

LineDetails/LineDetail/StockCode

The stock code for the detail line.

LineDetails/LineDetail/ItemName

The Item name for the detail line.

LineDetails/LineDetail/Quantity

The quantity of Items in the detail line.

LineDetails/LineDetail/UOM

The unit of measure for the detail line.

LineDetails/LineDetail/UnitPrice

The price per single Item in the detail line.

LineDetails/LineDetail/TotalPrice

The total price of all Items in the detail line (i.e., Quantity x Unit Price).

LineDetails/LineDetail/UnitMass

The weight of a single unit of the Item in the detail line.

LineDetails/LineDetail/TotalMass

The total weight of the detail line (i.e., Quantity x Unit Mass).

LineDetails/LineDetail/UnitVolume

The volume of a single unit of the Item in the detail line.

LineDetails/LineDetail/TotalVolume

The total volume of the detail line (i.e., Quantity x Unit Volume).

LineDetails/LineDetail/ShipDays

The Ship Days for the Item in the detail line.

SubTotal

The total price for all detail lines (i.e., line 1 TotalPrice + line 2 TotalPrice + …. + line z TotalPrice).

EventResponse

The details about the success or failure of the request including a module, severity, response number and message. A response number of ‘000’ with a message of “Success!” indicates that the request has been completed successfully.

EventResponse/Module

The CyberStore module that is responsible for the response, typically “API” is returned.

EventResponse/Severity

The severity of the response.

Values = 0 to 9

EventResponse/Number

The value that uniquely identifies the specific response.

 

EventResponse/Message

The message returned by CyberStore that describes what occurred.

See Also

CyberStore Connect Response Number Codes