Once a job has been submitted, the next step is to determine when this job has been completed and whether it was successful or not. We recommend the use of JobSummaryRequest, a few minutes after the JobSubmit. If the job has not yet completed, you will get a JobSummaryResult as in JobSummaryResult(T2).xml, attached below.
You should first check the two status codes of the JobSummaryResult, as shown above. Then you should check the JobState, which will be Delivering until the job is completed. You will also see a tally of the JobSummaryCounts that shows the job as pending. In our example there is only one destination for this job. If there were several, you get different statistics.
<JobState state="Delivering">
<JobSummaryCounts>
<Total>1</Total>
<Pending>1</Pending>
<Sent>0</Sent>
<Error>0</Error>
<Cancelled>0</Cancelled>
</JobSummaryCounts>
</JobState>
Once a job has completed and is successful, the JobSummaryResponse will look like the file in JobSummaryResult(T4).xml attached below.
The JobState element will now show "Complete" and the count of "Sent" will be set to 1, which indicates the document was successfully transmitted to the destination number.
Note that there is also a state of "Posted", which indicates the message was transmitted to the carrier (not necessarily delivered, as you will see below).
An example of an unsuccessful Job is now shown. The JobSummary after complete will now be similar to file JobSummaryResultBad(T6).xml attached below.
The JobState will again indicate "Complete", but you see there is an error count of 1. There is also a 1 in the NoAnswer tally, which was the cause of the error. Note also that the JobState of "Posted" also appears even though the delivery failed. That indicates the document was successfully sent to the carrier, but they were unable to deliver it.
<JobState state="Complete">
<JobSummaryCounts>
<Total>1</Total>
<Pending>0</Pending>
<Sent>0</Sent>
<Error>1</Error>
<Cancelled>0</Cancelled>
<NoAnswer>1</NoAnswer>
</JobSummaryCounts>
</JobState>
<JobState state="Posted"></JobState>
For customers that have just one destination per job, the JobSummaryResult often gives sufficient information. For multiple destinations, however, JobSummary will only give the totals for each element, so JobDeliveryStatus must be used to determine each destination's result. An example of a JobDeliveryStatusResult xml is in JobDeliveryStatusResultBad(T7).xml attached below. This result is much more detailed than the JobSummary, and gives complete information for each destination.
Note that the error specified for this destination is gammacode 3935, which is defined as "NOAN" or no answer, the same result as in the JobSummary.
<Destination type="fax">555-555-5555</Destination>
<State gammacode="3935" code="4">Error</State>
I hope this makes working with Fax status reporting a little easier.
<JobState state="Complete">
<JobSummaryCounts>
<Total>1</Total>
<Pending>0</Pending>
<Sent>1</Sent>
<Error>0</Error>
<Cancelled>0</Cancelled>
<TotalCompletedDeliveryTime>66</TotalCompletedDeliveryTime>
</JobSummaryCounts>
</JobState>
<JobState state="Posted"></JobState>
One of the most common questions we receive here at API Support is how to determine if a given document was properly delivered. Since the answer depends a great deal on the delivery method, this will be the first in a series of articles that will hopefully answer these questions, this time for Fax jobs.
As soon as a JobSubmitRequest is processed by our Web Service, a JobSubmitResponse is returned as shown in JobSubmitResult (T0).xml attached.
Specifically, there are two StatusCode elements that must be tested. See the attached JobSubmitResultStatus.GIF.
Attachment | Size |
---|---|
JobSubmitResultStatus.GIF | 20.07 KB |
JobSummaryResult(T4).xml | 2.26 KB |
JobSummaryResultBad(T6).xml | 2.23 KB |
JobDeliveryStatusResultBad(T7).xml | 2.69 KB |
JobSummaryResult(T2).xml | 2.03 KB |
JobSubmitResult (T0).xml | 1.25 KB |