How to make a web service call to Salesforce from jitterbit

184 Views Asked by At

I am new to Jitterbit and i want to update records in salesforce based on a condition but need to do this using a web service.

Using web service i want to get the id of the record from salesforce as a response then that response will be used as a source to other operations.

But i dont know how to make a request call to salesforce using Jitterbit.

Please help me on this.

1

There are 1 best solutions below

0
On

I don't know if you still need this but here it goes how I'd do it. You might want to create a script and run the operation to SF.

Any operation (that is successful) will be able to return an ID, if you analyze the response object (double click on the Web Service Response object), then on the target panel, expand TARGET:NameOfResponse -> flat -> response. If you open the response, Jitterbit will open using formula builder and here you will find a script:

<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>

Since this is just another script, you can add a global variable and retrieve the 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>

So in script, you reference the ID after running the operation:

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