SNOW Plugin Failing To Fill Some Fields

I discovered that reading a CI record in JSON shows the “value” field for fields in the ticket and I have been plugging those into the additional_fields object in the input.

It actually works for some, but the one that remains is the assigned_to field, the description field(when it is anything other than “test”) no matter what it never works correctly.

Any suggestions on how to move forward?

I’m looking at the plugin, and I’m not that familiar with it, but it looks like “assigned_to” is a core field and not a part of the “value” field. Are you calling for it at the wrong level?

What I mean by that…are you doing something like this…

{
 "value": {"assigned_to": "bob"}
}

instead of something like

{
 "value": {}, 
 "assigned_to":"bob"
}

:cowboy_hat_face: doing this

{
“assigned_to”:“bob”
}

but I ahve tried a combination of using that with, without putting Bob in the assigned to field that is already present in the input form of the plugin.

Instead of “bob” have you tried the user ID?

I’m getting that from:

      assigned_to:
        title: Assigned To
        description: User ID of person assigned to the incident
        type: string
        required: false

What I mean there, I’m not sure what IDs look like, is it an email address or is it some UID or integer type thing?

I actually tried that just now, no dice. It is something like a hexadecimal string.

Hmmm…So I reread the original problem. It looks like this DOES work if you use a value of “Test”. So that indicates to me that the structure of your object is OK, and you’re doing the right things, we just need to figure out what value it needs there.

So, what I’d try next, maybe pass in a user name, then maybe try their real name or something like that maybe?

So:
“bob”
bob@example.com
“Bob Smith”
“Robert Smith II”

still no dice xD

It looks like SNOW silently drops updates if the account doesn’t have permissions to update the field.
https://community.servicenow.com/community?id=community_question&sys_id=683ec17fdb894c10d82ffb24399619b4

It does look like it’s expecting the internal SNOW userid.

2 Likes

UPDATE**
I can fill all the fields using the json data from the tickets I search for EXCEPT assigned_to and description. These will not cooperate for anything.

Did you try the permissions trick above? We talked about this internally and we think that’s likely the problem.

spoke with the SNOW people, the account has the perms to assign incidents they say.

the account has ITIL role

From the link:

I ended up poking around in the table acl and seen that assigned_to required sn_incident_write role. Added that to the service account and it’s now working

Can you verify specifically that the account has required sn_incident_write?

If it does indeed have that permission, then probably needs to be converted into a support ticket. We’ll have to zoom in to find out what’s going on.

yea we are asking that now, thanks.