I am trying to determine the status of the Job submitted to Easylink. In the JobSummaryResult we have multiple JobState fields. Which one should be considered to determine the status of the job?
The first StatusCode under JobDeliveryStatusResult is the status for the Request itself.
Under JobData you will see the JobState, which shows the overall status of the entire job.
For individual recipients you want to look inder DeliveryDetail, there will be one of these for each recipient. The State code will give what happened with each one. If there was an error or there is additional information you will see a gammacode there too, on the same line
Tom
Oh, I wish it was that easy.
Tom is right - there are two places to look: JobState under JobData for the overall status and State under DeliveryDetail for each recipient.
... but ...
Be aware that there can be multiple JobState tags under JobData and the results differ for each destination type (Email, FAX, SMS, ...). See https://apiforums.easylink.com/emapidocs/25/JobDeliveryStatus/JobDeliveryStatusResult.html#LN48"Note that a job may be in more than one of these states simultaneously - the states Cancelled, Error, Posted, Reporting, Held, Preview, Paused, and AwaitingCompliance may occur in combination with other states."
From my testing, successful Email messages will have Delivered and Posted JobStates under JobData. FAXes get a JobState of Complete (and Posted?). SMSes are very tricky as having a State of SENT just means that the message has been past to the Telco - you need to check for an ArrivalEvent to determine if the SMS was really sent or failed.
I hope this helps.
I thought I would ask here first.. before I opened a new thread.
I understand that the JobState Complete means that the job is complete and that we have reporting for that job..
I would like to know how to access that data.. I have a job id of 95894378 jobtype Fax and when I look at the fax2mail portal, for this job it has a status of COMPLETE but with a red !. So I click on the report tab for this job and under that status I see a NOFN. I have also seen BLOC, PVOC and SENT.. all of them but sent relates to an error.
Is there a call that will give me either a gamma code back or the text:
For example :
https://apiforums.easylink.com/system/files/Gamma_Codes.pdf
My goal is to get either to get a gamma code of 0 or Sent if it is not one of those, I error and do some other logic to handle the error.
The request being discussed above is the JobDeliveryStatusRequest. That and the JobSummarryRequest will return the Job State/s. A State of "0" is good. If there is an error the gamma code for the error and a text description will be returned.
The JobSummaryRequest generates less overhead on both sides, your subnit and our result, you may want to take that into consideration. In the top rignt corner of the page is a click for the API documentation.
This URL points to the C# sample for the JobDeliveryStatusRequest.
https://apiforums.easylink.com/content/c-sample-jobdeliverystatus
And for the JobSummarryRequest.
https://apiforums.easylink.com/content/c-c-sharp-sample-jobsummary-call
For other C# samples search C# sample.