Postman collection
Returns Read

pixiGetStandardReturnReasons

Returns the list of standard return reasons in German or English, combined from the standard reasons table, a setting and the return reason code table.

Builds one list of return reasons from three sources and returns it as a single result set.

Language selection. LanguageID = 1 selects German; any other value, including NULL, selects English. Internally the procedure switches to Pixi's table convention, where 1 = English and 2 = German, and uses that value to filter the tables.

Sources

  1. RET_STANDARD_REASONS rows of the selected language. They return RET_REASON_ID and REASON_TEXT. RET_REASON_CODE and LANGUAGEID are NULL.
  2. The setting CSD_ReturnWizardReasons_Deutsch (German) or CSD_ReturnWizardReasons_English (other languages). Its value is a semicolon-separated list. Each entry becomes one row with trimmed text (max. 100 characters) and RET_REASON_ID = NULL. This part is combined with source 1 using UNION, so identical rows from sources 1 and 2 appear only once.
  3. Entries of pixi.CodeTableValue with CodeTableTypeId = 2 (return reasons), joined to their Translation entry (DBObjectName = CodeTableValue) in the selected language. These rows return the code table ID, the translated text and the Code. LANGUAGEID is converted back to the caller's convention (1 = German). These rows are appended with UNION ALL, so duplicates are not removed here.

Filter. With OnlyReturnReasonsFromPixiWeb = 1, only rows with a RET_REASON_ID are returned. This removes the setting-based reasons from source 2.

Sort order. Rows are sorted by RET_REASON_CODE. Rows without a code (NULL) come first, and their order among each other is not defined.

Notes

  • The language convention of the parameter (1 = German) is the reverse of the convention used in the tables (1 = English, 2 = German). Only the LANGUAGEID column of code table rows is reported in the caller's convention; all other rows return NULL.
  • If the setting does not exist or is empty, source 2 returns no rows.
  • A trailing or doubled semicolon in the setting value produces rows with an empty REASON_TEXT.
  • Characters such as & or < in the setting value can make the conversion of the list to XML fail, and the call then returns an SQL error.
  • Settings, RET_STANDARD_REASONS and CodeTableValue are read with NOLOCK; Translation is read without a locking hint.
  • The setting name is matched with LIKE, where _ is a single-character wildcard. In practice the match is exact.
  • Read-only; only a temporary table is used.

Tables used

Settings · Read RET_STANDARD_REASONS · Read CodeTableValue · Read Translation · Read
SQL object:
dbo.pipiGetStandardReturnReasons
Updated at 2026-10-30