Update Account calls in Web Services where multiple lines are sent per attribute

Hi all,

I am trying to format an Update Account call for a web services connector I am creating, but I am having issues in how IDN sends these calls due to the complexity of the JSON body that the source is expecting.

I am trying to send the following:

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
         "op": "replace",
        "path": "urn:ietf:params:scim:schemas:extension:spend:2.0:User:customData[id eq \"orgUnit3\"].value",
        "value": "<PLACE DEPARTMENT CODE HERE>"
         },
        {
        "op": "replace",
        "path": "other path",
        "value": "other value"
        }
        etc.
    ]
}

Is there a means of sending over items within the “operations” array only if the value for that item has been updated? Otherwise, IDN sends over items with only “op” and “path” key-value pairs when there is no update for that attribute, which make the call fail on the endpoint as it is missing a “value” key-value pair.

To get around this, I am trying to use a transform in the Update Account portion of the provisioning policy for the source to produce this multi-line body.

I can create a transform in IDN that evaluates to

\"orgUnit\"

but when this is sent to webhook.site to test, the \ is removed as it is treated as an escape character. Changing this to

\\\"orgUnit3\\\"

oddly results in this section being evaluated as

\\"orgUnit3\\"

Sending these calls to the actual source results in JSON parsing errors, making me believe that what I see received in the webhook site is correct.

Thanks