Acumatica Web API应用折扣

时间:2016-05-17 01:43:54

标签: acumatica

我试图找到一种从Web服务API获取折扣代码的方法,即是否有可以告诉我应用哪个折扣代码的函数调用?

我正在尝试检索折扣代码,但它们可以是按项目或按项目价格等级和客户等等,这使得代码比预期更长。

希望有一个" GetBestDiscount" API可以帮助我吗?

谢谢, ģ

3 个答案:

答案 0 :(得分:2)

目前,对于任何Web服务呼叫,Acumatica Discount Engine均已停用。由于这个原因,输入没有任何折扣的订单行将不会填充折扣代码。

但是,在Acumatica大学,有一个GetSalesPrice.zip自定义包专门用于检索客户项目的价格(附加到I200基于屏幕的Web服务5.3和I210基于合同的Web服务5.3源)

基于屏幕的API的示例调用:

Content getSalesPriceSchema = context.GetSchema();
var commands = new Command[]
{
    new Value
    {
        Value = customer,
        LinkedCommand =getSalesPriceSchema.RequiredInputParameters.Customer
    },
    new Value
    {
        Value = inventoryID,
        LinkedCommand =getSalesPriceSchema.RequiredInputParameters.InventoryID
    },
    getSalesPriceSchema.OutputPrice.Price
};
Content price = context.Submit(commands)[0];

基于合同的API的示例调用:

GetSalesPriceInquiry priceToBeGet = new GetSalesPriceInquiry
{
    Customer = new StringValue { Value = customer },
    InventoryID = new StringValue { Value = inventoryID }
};
GetSalesPriceInquiry stockItemPrice = (GetSalesPriceInquiry)soapClient.Put(priceToBeGet);

答案 1 :(得分:1)

我尝试通过API订单输入屏幕创建临时销售订单行,而不将其保存为Gabriel建议。 我可以检索设定价格没有问题,但不会返回折扣百分比和折扣代码。 返回的折扣百分比为零,折扣代码为空。

这是因为Acumatica折扣引擎因我猜的任何Web服务调用而被停用。

为任何Web服务呼叫停用Acumatica折扣引擎的原因是什么?

答案 2 :(得分:0)

没有此类API,但您可以使用销售订单输入屏幕API创建临时销售订单,向其添加一行并检索设定价格或折扣而不保存订单。这将是最准确的信息,因为折扣和价格也可能取决于日期,数量以及同时订购的其他产品。

相关问题