Servicenow integration: can the payload be changed?

In servicenow, service desk SDIM integration, when configuring the payload, ISC modifies the configured payload:

My Configuration payload in SDIM Module:

{

    "attribute_a": "value_a",
    "attribute_b": "value_b",
    "attribute_c": "value_c",
    "attribute_d": "value_d" 

}

Payload sent by ISC.

ISC injects the sysparm_id at the root of the object request and places my configuration inside variables attribute.

{
  "sysparm_id": "abdbe1c91bb4f0d0b73285dde54bcb51",
  "variables": {
    "attribute_a": "value_a",
    "attribute_b": "value_b",
    "attribute_c": "value_c",
   "attribute_d": "value_d"
  }
}

Payload expected by the servicenow API:

It expects sysparm_quantity at the root and I can’t seem to modify the root of the object, also can’t remove the sysparm_id.

{
   "sysparm_quantity": 1,
    "variables": {
       "attribute_a": "value_a",
       "attribute_b": "value_b",
       "attribute_c": "value_c",
      "attribute_d": "value_d"
   }
}

Error I am getting due to missing quantity attribute:

image

Question: Is there any way to change ALL the payload sent by Service Request Ticket type in SDIM module when it fires to the API?

Before Provisioning Rule: I don’t think this rule can change the payload, just the provisioning plan (like access new attributes and make them available to the payload, such as identity email) not sure. If anyone knows about that.

I don’t think you can modify the payload.

Have you looked at the scripted rest endpoint on the servicenow side to see if it’s been modified?

It basically just uses the CartJS scripting API to order the catalog item. I can’t remember if it sets the quantity on the servicenow side or not before ordering

The payload has not been modified by cartJS API but by ISC if I got what you meant.

I launched a va + vm with wireshark to capture the raw payload ISC is sending as I don’t have direct access to the snow instance.

Also, if cartJS were to add the quantity, I wouldn’t get the missing quantity error.

The API the client provided for creating ticket does not include any CartJs in its name, but it works locally via Postman.