Item

This component runs the Item Master (ITM) function.

Methods

BulkUDCCreateOrAmend
Driver Type: DJI
Use this method for the bulk loading of item user defined costs data or bulk amendment of item user defined costs data, where performance is critical.
Closed
Driver Type: SASI
Use this method to change the status of one or more items to Closed.
CreateAsDraft
Driver Type: SASI
Use this method to create one or more draft items.
CreateOrAmend
Driver Type: SASI
Use this method to create or amend one or more items. An item is created if it does not exist and amended if it does. Whereas both the Create and Amend methods require you to know in advance if the item exists, this method can be used if you are unsure.
Note: Ensure all unit conversions are defined before using the Item component to add Unit Label data. If a conversion is required, but not setup, the import payload will fail.
CreateReplaceOrDelete
Driver Type: SASI
Use this method to synchronize items. An item is created if it does not exist already and replaced if it does. If an item does not exist in the originating business unit, it is deleted.
Delete
Driver Type: SASI
Use this method to delete one or more items.
The default is to delete Item Costs (where possible) when Item deletion is requested. If you do not wish the component to attempt the item costs deletion you must set a parameter accordingly. In TPD/TD the 'Allow Item Costs Deletion' should be unchecked if deletion of child records should not take place. Otherwise, include the following in the payload used to prevent the deletion:
<MethodContext>
  <ItemMethodContext>
    <AllowItemCostsDeletion>N</AllowItemCostsDeletion>
  </ItemMethodContext>
</MethodContext>
Note: You cannot delete an Item record if child data, such as Costs, exist. When this occurs, use the DeleteChildData method prior to using the Delete method.
DeleteChildData
Driver Type: SASI
Use this method to delete child data (Item Costs, Assign Conversions, Unit Labels, Alternative Items, Serial Number, Item Characteristics, Storage Characteristics) but retain the parent record (Item).
It is also possible to delete 'grandchild' data. The deletion of child and grandchild data is controlled by a <DeletionFlag> node at child level. If the flag is set to Y, both child and grandchild is deleted. Otherwise, the child data is retained.
For example, the <Characteristics> node contains child data, and the <NumericValues> node contains grandchild data. The <DeletionFlag> node is set to Y, so the <DiscreteValueNumeric> data is deleted first, followed by the <CharacteristicCode> data:
<Item>
  <ItemCode>TEST</ItemCode>
  <Characteristics>
    <DeletionFlag>
      <DeleteCharacteristicAfterDiscreteValue>Y</DeleteCharacteristicAfterDiscreteValue>
    </DeletionFlag>
    <CharacteristicCode>CHILLED</CharacteristicCode>
    <NumericValues>
      <DiscreteValueNumeric>2</DiscreteValueNumeric>
    </NumericValues>
  </Characteristics>
  <Costs>
    <CostAnalysisId>1</CostAnalysisId1>
    <CostTypeCode>MATERIAL</CostTypeCode>
    <CurrencyCode>GBP</CurrencyCode>
    <TransactionCurrency>0</TransactionCurrency>
    <DeletionFlag>
      <DeleteCostAfterUDCostDeletion>Y</DeleteCostAfterUDCostDeletion>
    </DeletionFlag>
    <ItemUserDefinedCost>
      <ItemCostId>REVALUATION</ItemCostId>
    </ItemUserDefinedCost>
  </Costs>
</Item>
Hidden
Driver Type: SASI
Use this method to change the status of one or more items to Hidden.
Open
Driver Type: SASI
Use this method to change the status of one or more items to Open.
Query
Driver Type: Export
Use this method to obtain item details or to extract item data from SunSystems.
SuspendedHeld
Driver Type: SASI
Use this method to change the status of one or more items to Suspended/Held.

Mandatory fields

Note: At runtime the component validates the payload contents to ensure that the values supplied are correct. Various combinations of values may require other elements in the payload to be specified before the payload can be processed successfully.
General
  • When creating or amending an item, a value must be supplied for Item Code - payload element <ItemCode>
  • When creating or amending item accounts, a value must be supplied for:
    • Account Recognition Code - payload element <AccountCode>
    • Account Code - payload element <AccountCode>
  • When creating or amending item analysis, a value must be supplied for Analysis Code - payload element <VItemCatAnalysis_AnlCode>
  • When creating or amending item unit of measure, a value must be supplied for Unit Label Code - payload element <UnitLabelCode>
    Note: Ensure all unit conversions are defined before using the Item component to add Unit Label data. If a conversion is required, but not setup, the import payload will fail.
  • When creating or amending alternative/superseding items, a value must be supplied for Alternative/Superseding Item - payload element <AlternativeSupersedingItem>
  • When creating or amending item serial number formats, a value must be supplied for Serial Number Format Code - payload element <SerialNumberFormatCode>
  • When creating or amending item conversions, a value must be supplied for Conversion Id - payload element <ConversionId>
Characteristics
  • When creating or amending item characteristics, a value must be supplied for Characteristic Code - payload element <CharacteristicCode>
  • When creating or amending item storage characteristics, a value must be supplied for Storage Characteristic Code - payload element <CharacteristicCode>
Cost
  • When creating or amending an item costs, the following must be supplied:
    • Cost Type Code - payload element <CostTypeCode>
    • Cost Analysis Id - payload element <CostAnalysisId>
  • When creating or amending an Item user defined costs, the following must be supplied:
    • Cost Type Code - payload element <CostTypeCode>
    • Cost Analysis Id - payload element <CostAnalysisId>
    • User Defined Cost Definition Code - payload element <UserDefinedCostDefinitionCode>
Prices
  • When creating or amending item purchase prices, a value must be supplied for Sequence - payload element <Sequence>
  • When creating or amending item selling prices, a value must be supplied for Sequence - payload element <Sequence>
DeletingChildData
  • When deleting child data, a value must be supplied for Item Code - payload element <ItemCode>
  • To delete Item Costs data, or establish the key of the User Defined Costs to be deleted, a value must be supplied for:
    • Cost Type Code - payload element <Costs.CostTypeCode>
    • Currency Code - payload element <Costs.CurrencyCode>
  • A blank value defaults to the base currency.
    • Transaction Currency - payload element <Costs.TransactionCurrency>
    • Cost Analysis Id - payload element <Costs.CostAnalysisId>
  • If User Defined Costs is to be deleted, values must also be supplied for:
    • User Defined Cost Definition Code - payload element <Costs.ItemUserDefinedCost.UserDefinedCostDefinitionCode>
    • User Defined Cost Period - payload element <Costs.ItemUserDefinedCost.Period>
  • When deleting Unit Label child data, a value must be supplied for Unit Label Code - payload element <ItemUOM.UnitLabelCode>
  • To delete Item Characteristics data, or establish the key of the Discrete Value to be deleted, a value must be supplied for Characteristic Code - payload element <Characteristics.CharacteristicCode>
  • If Discrete Value is to be deleted, then depending on whether the Characteristic has Numeric or Alphanumeric Discrete Values, a value must also be supplied from one of:
    • Discrete Value Alphanumeric - payload element <Characteristics.AlphaValues.DiscreteValueAlphanumeric>
    • Discrete Value Numeric - payload element <Characteristics.NumericValues.DiscreteValueNumeric>
  • When deleting Alternative Item child data, a value must be supplied for Alternative/Superseding Item - payload element <Alternatives.AlternativeSupersedingItem>
  • To delete Storage Characteristics data, or establish the key of the Discrete Value to be deleted, a value must be supplied for Storage Characteristic Code - payload element <StorageCharacteristics.CharacteristicCode>
  • If Discrete Value is to be deleted, then depending on whether Storage Characteristics has Numeric or Alphanumeric Discrete Values, a value must also be supplied from one of:
    • Discrete Value Alphanumeric - payload element <StorageCharacteristics.AlphaValues.DiscreteValueAlphanumeric>
    • Discrete Value Numeric - payload element <StorageCharacteristics.NumericValues.DiscreteValueNumeric>
  • When deleting Serial Number child data, a value must be supplied for Serial Number Format Code - payload element <SerialNoFormat.SerialNumberFormatCode>
  • When deleting Assign Conversion child data, a value must be supplied for Conversion Id - payload element <AssignConversions.ConversionId>

Related data

  • Alternative Items
  • Characteristics
  • Storage Characteristics
  • Costs (Item User Defined Cost)
  • Serial No. Format
  • Item UOM (Unit of Measure)
  • Item Analysis 1-10
  • Purchase Item Price
  • Selling Item Price
  • Account Recognition Code
  • Assign Conversions
  • Standard Text
  • Standard Text Language.

If the standard text supplied in the payload does not exist then it is created. However, it is not possible to amend existing standard text by this means; existing standard text is attached by key only, and any non-key fields in the SSC payload are ignored. Standard text can be amended using the Standard Text Language Variants function from SunSystems or the SSC component StandardTextLanguageVariants.

The standard text to be attached is language specific and therefore must be included within the StandardTextLang part of the payload in order to be detected by the SSC component, as shown in the following example:

<Item>
  ...
  <StandardText>
    <StandardTextLang>
      <LanguageCode>1</LanguageCode>
      <StandardTextClassCode>STD</StandardTextClassCode>
      <StandardTextCode>DELIV</StandardTextCode>
    </StandardTextLang>
  </StandardText>
</Item>