Discussions

Ask a Question
Back to All

created_by_staff_uuid

Job 648 in account NSWtest@fujitsugeneral.com.au
When I fetch this job the created_by_staff_uuid Value comes back as being set to “ecd1b563-6fc2-415e-88b0-d1167f16f17b" Against the expectation that it should be “e9915a23-5cc9-4800-a62d-688408832a4b" (for the user “nswtest@fujitsugeneral.com.au”).
When I fetch the user for ecd1b563-6fc2-415e-88b0-d1167f16f17b To see by whom the job was created it returns “Register Webhook”.
That user is not a user we have a logon for. So that’s weird!

So I must assume that when I make multiple JSON calls simultaneously and possibly a webhook registration happening the same time as a job creation i.e. via two requests at the same time, that on your end SM8 code uses the current user variable static in some manner and sets it to “Register Webhook” user for the webhook creation call, but if a job is being created at the same time , the job ending up with created by “Register Webhook”? Looks like a thread safety/timing issue to me.
Strange enough if the job wasn’t created by our account then it still showing visible in the job list? So it’s like in the account but not created by the account?

Can you have a look at the job, possibly find another explanation why the job is marked as created_by_staff_uuid with the uuid of the “Register Webhook” user and fix it to not do that again?

It matters to us because when we process updates coming back i.e. receiving webhook, then JSON request the data, we look at the data and integrate respectively whom it was created by.
i.e. if it was created by NSW test then we do x, if it was created by QLDtest then we do y…
if it was not created by any of our integration accounts we dismiss the data assuming it was created manually and no record would be found on our end that would match it anyway.
However there is no way for us to create a job for the “Register Webhook” user.