RunAJobCli utility returns status code after execution of the command. In the script set the status code based on the below table and you can mark your job in third party tool based on the return code or capture the error response.
Problem here is %errorlevel% variable not able to capture RunAJobCli utility returns status code. As a workaround, I modified my script like below to read the RunAJobCli utility log and capture the return code from there to resolve my issue.
cd.>nul | cli.bat runAJobCli -t %TaskType% -un %TaskName% -w true >> %LOGFILE% 2>&1
FOR /F "delims=" %%A IN (%LOGFILE%) DO (