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

How to convert JSON Format REST API Payload (Request Body) into Groovy format for the below Payload

in Sales 1 comment

Summary:

The below Payload is working fine with the POSTMAN (The attachment element with multiple IDs with comma separated values in the Body Request)

{"to" : "to_email@email.com",
"cc" : "cc_email@email.com",
"subject" : "TEST OIC Email",
"body" : "TEST BODY",
"attachments" : ["DB3385C3B4B8B3C1B18A2A22D674F6E6A8F2","D6CF25B2101BB20BFD32AD7E9283D8A513BCDE"],
"additionInfo":
{
"opportunityNumber": "32110",
"idPDF": "2023-0000000235541-PdF-P2R1",
"template": "test_template",
"type": "abcdef"
}
}

But when we create the corresponding REST Webservice in Application Composer, provide the Sample Request body code as above, and convert the sample code, it does not work. The attachment element with multiple IDs with comma-separated values does not work. Please suggest how to use the attachment element with comma-separated values in Groovy format. We have tried the below two Groovy formats, and both are not working.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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