@Mark Jongeling the scenario. Customer integration with Klippa.
In the demo we used the HTTP connector. Where I generate the request body from a documents table with documents I need to scan.
select crd.document_data as [data]
,crd.document_upload as [filename]
,crd.document_page_ranges as [page_ranges]
from credit_request_document crd
where crd.credit_request_id = @credit_request_id
and crd.credit_request_document_id = @credit_request_document_id
for json path, root('documents')
With the HTTP connector the result of the query is the request_body towards the klippa API.
Now I want to have this API as a web connector so I can differentiate API keys per environment.
I put everything in place and we end up setting up the body. Type JSON.
option 1) I put variable in Body {request_body} results in non parsable body (whilst with HTTP connector this works. There I also put the variable as body.
option 2) I put in the json structure and fill every element with data from the table. Fails with unparsable content. I tried all options to also have input parameters pre processed.. (although I find it very unclear what it does exactly)
{ documents: [
{ data : {document_data},
filename : {document_upload},
page_ranges : {document_page_ranges}
)
]
}
option 3) this one finally worked.. I put the body request JSON root element and just made the array a variable. I really have not idea why only this one worked and did not result in a non-parsable document.
{
"documents": {document_array}
}
When I read the documentation, I can read it, but don't understand it. On the pre-processing part: "so that Indicium can use it"… ??? It really doesn't help me to understand when to use it or not to use it.
https://docs.thinkwisesoftware.com/docs/sf/web_connections#web-connection-for-a-branch