Forum Discussion

Cory_Blankenshi's avatar
Cory_Blankenshi
Icon for Altostratus rankAltostratus
Nov 06, 2017

Salesforce Parameter Exception Question

We are rolling out a Salesforce application and we have a request that is being blocked due to a parameter in the following format:

 

{"ORDER_HEADER":{"INVOICE_HEADER":{"APPLICATION":"Some Application Name","APPLICATION_USER":"Some User ID","INVOICE_NBR":"some invoice number"}}}

 

I've never created a parameter exception to handle a parameter in that format. I thought creating a parameter using a regular expression would be the way to go, but I'm not sure if that's the right approach.

 

Any advice you have on how to handle parameters like this would be greatly appreciated as I think we may see this again in the future.

 

Thanks!

 

  • So the solution I used that worked was to create a wildcard JSON-type parameter and referenced the JSON profile to it. That fixed the issue.

     

    Thanks for your help!

     

  • I'd need to see the request/response and violation details before I'd start thinking about backup plans.

     

    I'm pretty sure a JSON profile suitably applied will resolve it, but finding the right place to do so might be the trick.

     

  • That's a pretty close version of what the parameter names are, so they'll probably tell me about the same as what I can glean from the error. In the event that JSON profile isn't the path forward, what would your back up plan be?

     

  • I'm not entirely sure either, but it is where I would start.

     

    Or push back on the developer/implemention team and get them to explain what the parameter contains ;-)

     

  • Thanks S Blakely,

     

    I've never created a JSON profile so I'll give the documentation a read and see if I can figure it out. I wasn't sure if a JSON profile was the right way to go considering that the parameter format was close to nested JSON formatting but it didn't look quite right.

     

    Thanks!

     

  • That looks like a JSON value:

     

    You can create an explicit Parameter, set the Parameter Value Type to JSON and apply a JSON profile