Parse response of attachment creation

Because the endpoint system (Service Anywhere) needs an additional REST request to update attachment information after the creation of the attachment, the function below parses the endpoint response to the outbound attachment creation request.

Out-of-box function:

CaseExchange_SAWUtil.parseSAWCreateAttachResponse

The function has the following parameters:

  • response: The HTTP body of the REST response from the end point.
  • action: Action type to process attachment. Currently this parameter has only two values: FETCH_ATTACHMENT and CREATE_ATTACHMENT.

  • param: All parameters defined in SMIS configuration. You can get a specific parameter value by using the param['object'] syntax.

The function returns the following result:

CEAttachmentInfo: An instance of CEAttachmentInfo parsed from the response