Class: ExternalMasterdata

ExternalMasterdata

App Enablement class for all functionalities related to external masterdata like searching, registering external items and to grab the image url from external webshops.

new ExternalMasterdata()

Since:
  • 2.0.0
Author:
  • mluzius

Methods


<static> createGetExternalImageUrlRequest(sItemID, oContext)

This function will create a request object for the function 'getImageUrl'.

Parameters:
Name Type Description
sItemID string The string that is used to search external items.
oContext string Provides the session context. For example currency, language. Data type is string but internal data type is Object. The internally used object should look like the following example: { businessUnitGroupID: "100000000000000001", businessUnitID: "9090", // Equivalent to store ID isoCurrencyCode: "USD", storeLanguage: "en_US", tenantID: "004", userLanguage: "zh_CN", workstationID: "107" }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)
Returns:
(String) Returns a stringified Object for the getImageUrl request.

<static> createGetItemByCriteriaRequest(sItemID, oContext)

This function will create a request object for the function 'getItemByCriteria'.

Parameters:
Name Type Description
sItemID string Item ID to get the item information for external items.
oContext string Provides the session context. For example currency, language. Data type is string but internal data type is Object. The internally used object should look like the following example: { businessUnitGroupID: "100000000000000001", businessUnitID: "9090", // Equivalent to store ID isoCurrencyCode: "USD", storeLanguage: "en_US", tenantID: "004", userLanguage: "zh_CN", workstationID: "107" }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)
Returns:
(String) Returns a stringified Object for the getItemByCriteria request.

<static> createGetItemByCriteriaRequest(sSearchQuery, iRecordCount, oContext)

This function will create a request object for the function 'getItemListBySearchCriteria'.

Parameters:
Name Type Description
sSearchQuery string The string that is used to search external items.
iRecordCount number Determines the maximum count of items that should be displayed per page.
oContext string Provides the session context. For example currency, language. Data type is string but internal data type is Object. The internally used object should look like the following example: { businessUnitGroupID: "100000000000000001", businessUnitID: "9090", // Equivalent to store ID isoCurrencyCode: "USD", storeLanguage: "en_US", tenantID: "004", userLanguage: "zh_CN", workstationID: "107" }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)
Returns:
(String) Returns a stringified Object for the getItemListBySearchCriteria request.

<static> getImageUrl(sResultFunction, sErrorFunction, oGetExternalImageUrlRequest)

This function will provide an image URL for external items.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oGetExternalImageUrlRequest string Stringified Object from the createGetExternalImageUrlRequest. Data type is string but internal data type is Object. The internally used object should look like the following example: { itemID: "030039", type: "item", language: "en_US", isoCurrencyCode: "USD" }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)

<static> getItemByCriteria(sResultFunction, sErrorFunction, oGetItemByCriteriaRequest)

This function will provide external item information for a given item ID.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oGetItemByCriteriaRequest string Stringified Object from the createGetItemByCriteriaRequest. Data type is string but internal data type is Object. The internally used object should look like the following example: { itemID: "030039", language: "en_US", isoCurrencyCode: "USD" }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)

<static> getItemListBySearchCriteria(sResultFunction, sErrorFunction, oGetItemListBySearchCriteriaRequest)

This function will provide a list of external items that you searched for.

Parameters:
Name Type Description
sResultFunction string Name of the success callback function. Data type is string but internal data type is function.
sErrorFunction string Name of the error callback function. Data type is string but internal data type is function.
oGetItemListBySearchCriteriaRequest string Stringified Object from the createGetItemListBySearchCriteriaRequest. Data type is string but internal data type is Object. The internally used object should look like the following example: { query: "camera", language: "en_US", isoCurrencyCode: "USD", recordCount: 60 }
Since:
  • 2.0.0
Author:
  • mluzius (Last modified by: mluzius)