Customer Service schemas

The Customers namespace is concerned with Customer and Company management.

Accounts

Account

An Account is related to a Customer. Each Account can belong to only one Application. When creating Customers you need to define a Customer.Account if you want the customer to be able to login. This is useful when the application supports My page with order history and such.

Id
integer or null <int32>

The internal Id of the Account. This value should be used as updatedBy/createdBy in API-Methods. When creating a new Account on a Customer leave this blank as Storm will generate the Id.

Key
string <guid>

The system wide unique Key for the Account.

LoginName
string

This is the login name used when logging in. Normally this is the email address. Care must be taken when user updates their emailAddress. Normally this update is just for Customer.Email. It is up to the Application to keep Customer.Email in sync with Account.LoginName if they are the same. MaxLength: 255

Name
string

This is the full name of the connected Customer's first and last name. MaxLength: 100

Roles
Array of integers <int32>

This is an integer list of Role.Ids. See Application.Roles for available roles for the Application. This can be used to authorize roles to different parts of an Application.

Array of objects <IdValue> (IdValue)

This is an IdValue list of Authorizations. See Application.Authorizations for available values for the Application. This can be used to authorize users to different parts of an Application.

IsActive
boolean

Indicates if the Account is Active or not. Use UpdateAccountStatus to change this value.

AgreementAccount

An AgreementAccount is a special account connected to a priceList. Users can login to an AgreementAccount if the priceList is setup with a code. Note that when using AgreementAccounts any agreement code must be unique amongst all priceLists.

PricelistId
integer <int32>

The PriceListId of the PriceList logged in to.

Name
string

The Name of the AgreementAccount/PriceList. MaxLength: 50

StartDate
string or null <date-time>

The StartDate of the AgreementAccount/PriceList.

EndDate
string or null <date-time>

The EndDate of the AgreementAccount/PriceList.

ImageKey
string or null <guid>

A unique id for the image at our image server. Url for images are formed like http://[client specific CDN]/{ImageKey}. Preset, height and width can be sent as parameters.

ShowPricesIncVat
boolean or null

Indicates if prices should be shown inc or ex VAT.

Address

Information about an address. Addresses appear as InvoiceAddress or DeliveryAddresses or when ever an Address is needed

Id
integer or null <int32>

The internal Id of the Address. When creating a new Address leave this blank as Storm will generate the Id.

CareOf
string

The CareOf of the Address. MaxLength: 100

Line1
string

The first address line of the Address. MaxLength: 255

Line2
string

The second address line of the Address. MaxLength: 255

Zip
string

The zip code of the Address. MaxLength: 50

City
string

The City of the Address. MaxLength: 50

CountryId
integer <int32>

The internal Id for the country associated to the Address. When creating or updating Country on an Address either specify the CountryId or just the Country string. If Id is specified it will be used to resolve the Name. If none is specified the default for the Application will be used.

Country
string

The country name of the Address. When creating or updating Country on an Address either specify the CountryId or just the Country string. If Name is specified it will be used to resolve the Name and Id. Name should then be specified as Country.Code since Names are culture specific. If none is specified the default for the Application will be used. MaxLength: 50

Region
string

The Region of the Address. MaxLength: 50

IsValidated
boolean

Indicates if the address had been validated. It is up to the Application to validate addresses. Use normal address-methods to update this value.

GlobalLocationNo
string

The Global Location Number (GLN) is part of the GS1 systems of standards. It is a simple tool used to identify a location and can identify locations uniquely where required. This is only used for invoice addresses. MaxLength: 50

ShippingPhoneNumber
string

Phone number for shipping address. Only applicable in shipping addresses. MaxLength: 50

Companies

Company

Information about a Company.

Id
integer or null <int32>

The internal Storm Id for the Company. When creating a new Company leave this blank as Storm will generate the Id.

Key
string <guid>

The system wide unique Key of the Company.

Code
string

The external code. Usually the id in the erp system. MaxLength: 50

Name
string

The Name of the Company. MaxLength: 100

OrgNo
string

The organizational number of the Company. Used to identify the Company for some payment methods. The combination of OrgNo and Name must be unique. MaxLength: 50

Phone
string

The Phone number of the Company. MaxLength: 50

ReferId
integer or null <int32>

Used to tag a Company with some external id.

ReferUrl
string

Used to tag a Company with an incoming URL. MaxLength: 255

Array of objects <Address> (Address)

A list of delivery Addresses for the Company. When needed the first address in the list will be used. So it is vital in the checkout process to either sort them or just supply one delivery address. Company addresses will override Customer addresses if both exists in the Checkout process.

object <Address> (Address)
UseInvoiceAddressAsDeliveryAddress
boolean

Can be used when updating or inserting addresses on Company. If set to true the invoice address will be used as a delivery address as well. Then just an invoice address needs to be passed in. The deliveryAddress will be ignored. If set to false both invoice address and delivery address must be specified.

Array of objects <IdValue> (IdValue)

Contains a list of id-value pairs specific to the client for this company. Use ApplicationService.ListCompanyInfoTypes for id lookup.

PricelistIds
Array of integers <int32>

Contains a list of priceList ids valid for this company. It will be empty if no priceLists exist. It can be used to check products lists if they are from a company specific priceList. No need to pass this into List-methods since they are considered any way in the methods. This property should be considered as ReadOnly as priceLists are maintained else where.

ParentId
integer or null <int32>

Points to an optional parent company. Used when companies are connected some how.

DeliveryMethodIds
Array of integers <int32>

Contains a list of delivery method ids valid for this company. It will be empty if no delivery methods exist.

PaymentMethodIds
Array of integers <int32>

Contains a list of payment method ids valid for this company. It will be empty if no payment methods exist.

Email
string

The Email address of the Company. MaxLength: 255

Array of objects <Flag> (Flag)

A list of Flags of the Company. See Flag for information about flags. Flags can be used in Promotions or otherwise to provide custom handling of specific Companies.

VatNo
string

This is the VAT registration number for the company. MaxLength: 50

CompanyDiscount

Company discounts are specific discounts that are not based on priceLists and applied on product prices before display. Best price will be taken. Discounts are not stackable.

TypeId
integer <int32>

The TypeId defines the rule for how Value is interpreted. 1 = Category discount, 2 = DiscountCode on product. Cannot be changed.

Value
string

The value to check for on products. If TypeID = 1 then discounts are valid for all products belonging to Category with Category.Code = Value. If TypeId = 2 then the product's discount code is checked. Cannot be changed. MaxLength: 50

Discount
number <decimal>

The actual discount percentage. Ex: 15.00 equals 15% discount.

PriceListTypeSeed
string

An optional comma-separated list of priceList type-ids for which the discount is valid. MaxLength: 50

CompanyPaymentMethod

Defined payment method for a Company.

CompanyCode
string

The external code of the company. MaxLength: 50

PaymentMethodCode
string

The external code of the payment method. MaxLength: 50

InvoiceCaptureSettingsCode
string

The invoice capture settings code (if any is set). MaxLength: 50

IsActive
boolean

Whether or not the company payment method is active.

Contact

Obsolete, will be removed in a coming version. Information about a Contact. Contacts are people not acting ac Customers in an Application. Contacts are created in the Admin UI.

Id
integer or null <int32>

The internal Id of the Contact.

Key
string <guid>

The system wide unique Key for the Contact.

Code
string

The external code. Usually the id in the erp system. MaxLength: 50

ResponsibilityId
integer <int32>

The ResponsibilityId of the Contact.

Email
string

The Email of the Contact. MaxLength: 255

FirstName
string

The FirstName of the Contact. MaxLength: 50

LastName
string

The LastName of the Contact. MaxLength: 50

Phone
string

The Phone number of the Contact. MaxLength: 50

CellPhone
string

The CellPhone number of the Contact. MaxLength: 50

ImagePath
string

MaxLength: 255

ImageKey
string or null <guid>

A unique id for the image at our image server. Url for images are formed like http://[client specific CDN]/{ImageKey}. Preset, height and width can be sent as parameters.

Customers

Customer

Information about a Customer.

Id
integer or null <int32>

The internal Storm Id of the Customer. When creating a new Customer leave this blank as Storm will generate the Id.

Key
string <guid>

The system wide unique Key of the Customer.

Code
string

The external code. Usually the id in the erp system. MaxLength: 50

Email
string

The Email address of the Customer. MaxLength: 255

SSN
string

The social security number of the Customer. Used to identify the Customer for some payment methods. MaxLength: 50

FirstName
string

The FirstName of the Customer. MaxLength: 50

LastName
string

The LastName of the Customer. MaxLength: 50

Phone
string

The PhoneNumber of the Customer. MaxLength: 50

CellPhone
string

The CellPhone number of the Customer. MaxLength: 50

ReferId
integer or null <int32>

Used to tag a Customer with some external id.

ReferUrl
string

Used to tag a Customer with an incoming URL. MaxLength: 255

object <Account> (Account)
Array of objects <Company> (Company)

A list of Companies. A Customer can have many Companies. The first will be used as default. In the Checkout process just pass in one Company if any is to be used or the first will be used as default.

Array of objects <Address> (Address)

A list of delivery Addresses for the Customer. When needed the first address in the list will be used. So it is vital in the checkout process to either sort them or just supply one delivery address. Company addresses will override Customer addresses if both exists in the Checkout process.

object <Address> (Address)
Array of objects <Flag> (Flag)

A list of Flags for the Customer. See Flag for information about flags. Flags can be used in Promotions or otherwise to provide custom handling of specific Customers.

UseInvoiceAddressAsDeliveryAddress
boolean

Can be use when updating or inserting addresses on Customer. If set to true the invoice address will be used as a delivery address as well. Then just an invoice address needs to be passed in. The deliveryAddress will be ignored. If set to false both invoice address and delivery address must be specified.

Array of objects <IdValue> (IdValue)

Contains a list of id-value pairs specific to the client for this customer. Use ApplicationService.ListCustomerInfoTypes for id lookup.

PricelistIds
Array of integers <int32>

Contains a list of priceList ids valid for this customer. It will be empty if no priceLists exist. It can be used to check products lists if they are from a customer specific priceList. No need to pass this into List-methods since they are considered any way in the methods. This property should be considered as ReadOnly as priceLists are maintained else where.

CrmId
string

Used to save the Customers external id from a crm-system MaxLength: 50

IsActive
boolean or null

Specifies if the Customer is active or not.

Created
string or null <date-time>

When the customer was created.

Updated
string or null <date-time>

When the customer was last updated.

## Flags

CustomerFlag

Information about all available flags for Customer or Company.

Id
integer <int32>

The internal Id of the CustomerFlag.

Name
string

The name of the CustomerFlag. MaxLength: 50

Description
string

The description of the CustomerFlag. MaxLength: max

SortOrder
integer <int32>

The sort order of the CustomerFlag.

object <IdNameDescription> (IdNameDescription)

Flag

Information about a flag set on Customer or Company. See CustomerFlags for information about available flags.

Id
integer <int32>

The internal Id of the Flag.

Name
string

The Name of the Flag. MaxLength: 50

Group
integer <int32>

The GroupId of the Flag.

IsSelected
boolean

Indicates if the Flag is selected or not.

InfoTypes

No entities. See IdValues

PriceLists

Pricelist

Defines a pricelist in this namespace. This is used when setting up Company specific priceLists for resellers. Insert and Update methods are provided. In order to delete a priceList just use DeleteCompanyPricelist.

Id
integer or null <int32>

The internal pricelist id. Set to null when creating a new pricelist.

ParentId
integer or null <int32>

The parent internal pricelist id. If any.

Name
string

The name of the pricelist. MaxLength: 50

Description
string

The description of the pricelist. MaxLength: max

Agreement
string

The agreement code of the pricelist. Can be an external id of the priceList. MaxLength: 50

Type
integer <int32>

The type of the pricelist. 0 is default. Other values are application specific.

IsActive
boolean

Specifies if the pricelist is active or not. Set this to false before update if you want to delete the pricelist.

object <PricelistPriceRule> (PricelistPriceRule)
Array of objects <PricelistPopulationRule> (PricelistPopulationRule)

A list of population rules for this pricelist.

CurrencyId
integer <int32>

The currencyId for this pricelist.

IsExclusive
boolean

Indicates if the pricelist should be used exclusively for this Company, or not. Exclusive pricelists are not used with any standard pricelists and only exclusive pricelists will be in scope if the Company has any.

PricelistItem

Defines a pricelist item in this namespace.

PartNo
string

PartNo of the SKU for this price item. MaxLength: 50

PricelistId
integer <int32>

The internal pricelist id.

Price
number <decimal>

The price. Read only. Currency is from the pricelist.

PriceRecommended
number or null <decimal>

The price from inherited pricelist, if any.

IsActive
boolean

Specifies if the pricelist item is active or not. Ignored when inserting new pricelist items.

object <PricelistPriceRule> (PricelistPriceRule)

PricelistPopulationRule

Defines a price rule for a pricelist in this namespace.

RuleId
integer or null <int32>

An internal id for a specific rule. Set to null when creating a rule.

ManufacturerId
integer or null <int32>

An optional internal manufacturer id. Used if the priceList is restricted to a specific manufacturer.

CategoryId
integer or null <int32>

An optional internal category id. Used if the priceList is restricted to a specific category.

IsSupplierRequired
boolean

Specifies if the populations is from a supplier.

IsInclusive
boolean

Specifies if the population rule is inclusive or exclusive.

PricelistPriceRule

Defines a price rule for a priceList in this namespace.

RuleId
integer or null <int32>

An internal id for a specific rule. Consult Norce for a list of valid ids and what they mean.

Value
number or null <decimal>

The value associated with the rule. The ruleId specifies how this value is used.