首页 > 解决方案 > 如何从 jitterbit 向 Salesforce 进行 Web 服务调用

问题描述

我是 Jitterbit 的新手,我想根据条件更新 salesforce 中的记录,但需要使用 Web 服务执行此操作。

使用 Web 服务,我想从 salesforce 获取记录的 id 作为响应,然后该响应将用作其他操作的源。

但我不知道如何使用 Jitterbit 向销售人员发出请求调用。

请帮助我。

标签: web-servicessalesforcejitterbit

解决方案


我不知道你是否还需要这个,但我会怎么做。您可能想要创建一个脚本并将操作运行到 SF。

任何操作(即成功)都会返回一个ID,如果你分析响应对象(双击Web Service Response对象),然后在目标面板上展开TARGET:NameOfResponse -> flat -> response。如果您打开响应,Jitterbit 将使用公式生成器打开,您将在此处找到一个脚本:

<trans>
// This mapping is part of a Salesforce wizard.
// Modifying it may cause the wizard to malfunction.
If(root$transaction.response$body$createResponse$result.success$ == false,
    WriteToOperationLog(SumString(root$transaction.response$body$createResponse$result.errors#.message$, ". ", false)))
</trans>

由于这只是另一个脚本,您可以添加一个全局变量并检索 ID ($MyGlobalVariable):

<trans>
// This mapping is part of a Salesforce wizard.
// Modifying it may cause the wizard to malfunction.
If(root$transaction.response$body$createResponse$result.success$ == false,
    WriteToOperationLog(SumString(root$transaction.response$body$createResponse$result.errors#.message$, ". ", false))
    ,
    $MyGlobalVariable = root$transaction.response$body$createResponse$result.id$)
</trans>

因此,在脚本中,您在运行操作后引用 ID:

<trans>
      RunOperation("<TAG>Operations/TheOperation</TAG>");
      WriteToOperationLog($MyGlobalVariable);
</trans>

推荐阅读