Servigistics InService 自訂 > 自訂系統整合 > 購物參數自訂 > 定義購物參數
  
定義購物參數
com.ptc.sc.services.plugins.CommerceDelegate 介面上的 API getShoppingParameters() 可用來為定義購物參數提供自訂實行。購物參數使用 SCField 概念模型定義。例如,欲定義名為「客戶」的購物參數,可使用下列方式建構 SCField
SCFieldList resultList = new SCFieldList();
//Define all the options for “customer” field
Map<String,String> customerValuesMap = new HashMap<String,String>();
customerValuesMap.put("customer1","Star Logistics");
customerValuesMap.put("customer2","PowerPlus Industries");
//Create the “customer” SCField
//SCField(<displayName>,<type>,<initialValue>,<internalName>,<aOptions>)
SCField customerField = new SCField("Customer", "combo", null, "customer",
customerValuesMap);
//Add it to the SCFieldList
resultList.addItem(customerField);
其他參數可使用相同方式定義。如需有關 SCFieldSCFieldList 的詳細資訊,請參閱 JavaDoc。
如需註冊定價委派的詳細資訊,請參閱定價與供貨狀況系統整合