SalesTypes

This component runs the Sales Type (STS) function.

Note: You must define Sales Types for your Business Unit before you can enter sales transactions.

Methods

Closed
Driver Type: SASI
Use this method to change the status of one or more sales types to Closed.
Create
Driver Type: SASI
Use this method to create one or more sales types. This method only creates a sales type. If the sales type already exists, an error message is produced and the payload is rejected.
CreateAsDraft
Driver Type: SASI
Use this method to create one or more draft sales types.
CreateOrAmend
Driver Type: SASI
Use this method to create or amend one or more sales types. A sales type is created if it does not exist and amended if it does. The Create method requires you to know in advance if the analysis dimension exists, whereas this method can be used if you are unsure.
Note: Do not include Stage data in the payload for this method if there are existing Stage records for the transaction type. The update/insert of Stage records is prevented if any Stage data already exists. In this case, Stage records must be created/amended via SunSystems.
Delete
Driver Type: SASI
Use this method to delete sales types.
Note: You cannot delete a SalesTypes record if child data, such as Stage or Value data, exists. If this occurs, use the DeleteChildData method prior to using the Delete method.
DeleteChildData
Driver Type: SASI
This method deletes child data (SO Assign Preset, SO Analysis, Value, Stage) but retains the parent record (Sales Type).
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 <Stage> node contains child data, and the <LedgerIFReversal> node contains grandchild data. The <DeletionFlag> node is set to Y, so the <LedgerInterfaceDefinitionCode> data is deleted first, followed by the <Stage> data:
Note: 
  • Stage data must be deleted in reverse order, i.e. you must not delete a stage that is defined as a Sequence on another record.
  • A SalesTypes payload deleting Sales Quantity is invalid and will return the error message "One Sales Quantity must be set per Sales Transaction Type". This is because all Order Fulfilment transaction types must have one value label that is flagged as the Quantity.
Hidden
Driver Type: SASI
Use this method to change the status of one or more sales types to Hidden.
Open
Driver Type: SASI
Use this method to change the status of one or more sales types to Open.
Query
Driver Type: Export
Use this method to obtain sales type details or to extract sales types data from SunSystems.
Suspended/Held
Driver Type: SASI
Use this method to change the status of one or more sales types to Suspended/Held.

Mandatory fields

General
  • When creating, amending or deleting a sales type, a value must be supplied for the Sales Transaction Type - payload element <SalesTransactionType>
  • When creating or amending sales type accounts, a value must be supplied for:
    • Account Recognition Code - payload element <AccountRecognitionCode>

    • Account Code - payload element <AccountCode>

  • When creating or amending sales type presets, a value must be supplied for the Preset Code - payload element <PresetCode>.
  • When creating or amending sales type stage, a value must be supplied for the Stage - payload element <Stage>
  • When creating or amending sales type stage ledger interface reversal, a value must be supplied for the Ledger Interface Type - payload element <LedgerInterfaceType>
  • When creating or amending sales type value entries, a value must be supplied for the Value Label Short Heading - payload element <ShortHeading>
Deleting Child Data
  • When deleting child data, a value must be supplied for the Sales Definition Code - payload element <SalesDefinitionCode>.
  • When deleting SO Assign Preset child data, a value must be supplied for SO Assign Preset Code - payload element <SOLPreset.PresetCode>
  • When deleting SO Analysis child data, a value must be supplied for Analysis Category ID - payload element <SOAnalysis.AnalysisCategoryID.AnlCat_Shead>
  • When deleting Value child data, a value must be supplied for:
    • Value Category ID - payload element <Value.ValueCategoryID.ShortHeading>
    • Value Label Type - payload element <Value.ValueLabelValueType>
  • To delete Stage data, or establish the key of the Ledger IF Reversal data to be deleted, a value must be supplied for Stage - payload element <Stage.Stage>
  • If Ledger IF Reversal data are to be deleted, a value must also be supplied for the Ledger Interface Definition Code - payload element <Stage.LedgerIFReversal.LedgerInterfaceDefinitionCode>
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.

Related data

  • Account Recognition Code
  • Sales Order Analysis
  • Sales Order Preset
  • Stage including Ledger IF Reversal
  • Value Label.