You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Sending file content using urlmultipartbypost method in Oracle CPQ

Received Response
33
Views
4
Comments
edited Aug 3, 2021 6:34AM in Configure Price Quote 4 comments

Content

I am working on integration in which I have to send proposal document from CPQ to external system. It accepts Content Type: multipart/form-data. 

How do I send the file content from CPQ to a system that accepts Content Type: multipart/form-data. 

I am getting below error when tried sending the document using the script mentioned below: 

{"type":"validation_error","detail":"There is no field: \"file\"."},

Code Snippet

	ret = "";
         d = dict("dict<anytype>");
         put(d, PDFDocument_t, getattachmentdata(PDFDocument_t, true));
         params =  "{\"name\": \"Sample Document\"}";
         headers = dict("string");
         put(headers, "Content-Type", "multipart/form-data");
         put(headers,"Authorization", authdetails);
         soapResponse =urlmultipartbypost(url, params, headers,d);
         print soapResponse;
return ret;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!