#AddAccessJSON: { "call": [ { "name": "Group", "connection": "HOSDEVAuth", "url": "${connection.hosBaseUrl}/api_get_user_by_username", "httpMethod": "POST", "httpParams": "{\"username\": \"${arstasksObj?.accountName}\"}", "httpHeaders": { "Authorization": "${access_token}", "accessToken": "${connection.hosSecret}" }, "httpContentType": "application/json", "successResponses": { "statusCode": [ 200 ] }, "unsuccessResponses": { "statusCode": [ 400, 401, 403, 404, 409, 415, 416, 429, 500, 502, 503, 504 ] } }, { "name": "Group", "connection": "HOSDEVAuth", "url": "${connection.hosBaseUrl}/api_edit_user", "httpMethod": "POST", "httpParams": "{\"username\": \"${arstasksObj?.accountName}\", \"first_name\": \"${response.Group1.message.status?.data[0].first_name}\", \"last_name\": \"${response.Group1.message.status?.data[0].last_name}\", \"email\": \"${response.Group1.message.status?.data[0].email}\", \"pin\": \"${users?.username?.trim().replaceAll('[^0-9]','')}\", \"type\": \"${response.Group1.message.status?.data[0].type.trim() == 'Signal' ? 'Singal Crew':response.Group1.message.status?.data[0].type.trim()}\", \"role\": \"${response.Group1.message.status?.data[0].role}\", \"auto_assign\": \"${response.Group1.message.status?.data[0].auto_assign}\", \"timezone\": \"${response.Group1.message.status?.data[0].timezone}\", \"location\": \"${response.Group1.message.status?.data[0].location}\", \"departments\": [${if(response.Group1.message.status?.data[0].departments?.size() > 0){'\"' + response.Group1.message.status?.data[0].departments?.toString().replace('[','').replace(']','').replace(',','\",\"') +'\"'}}], \"password\": \"${password}\"}", "httpHeaders": { "Authorization": "${access_token}", "accessToken": "${connection.hosSecret}" }, "httpContentType": "application/json", "successResponses": { "statusCode": [ 200 ] }, "unsuccessResponses": { "statusCode": [ 400, 401, 403, 404, 409, 415, 416, 429, 500, 502, 503, 504 ] } } ] }