Skip to content

Query fax status

The "Query fax status" service task retrieves the current status of a fax job created by Send fax. A job can thus be checked later, e.g. after a timer or a user task. Once the job has reached a final status, the service additionally returns the result per recipient.

Technical name prio_fax_status · Category in the "Select service task" dialog: Communication & dispatch

Activation required

Sending faxes is a paid add-on and has to be set up for the Pantarey account. Without setup the step fails with "Fax ist fuer Mandant … nicht eingerichtet … Bitte an info@pantarey.io wenden." If needed, contact Pantarey.


When is this service used?

  • Sending without waiting: Musterfirma GmbH faxes order confirmations with waitForResult: false and checks the status ten minutes later instead of holding the process in the send step for up to twelve minutes.
  • Escalation: If a fax has not been delivered after a deadline, a user task goes to sales.
  • Proof of delivery: The result per recipient is stored on the record.

Input

Field Type Required Meaning
jobId text Yes Identifier of the fax job from the return value of Send fax; if missing: "Missing required field: jobId."
test boolean No Default false. Must match the mode of the job: sandbox jobs can only be queried with true, live jobs only with false (separate endpoint and token)
{
  "jobId": $.fax.jobId,
  "test": false
}

Output

{
  "jobId": "0d139d2c-4a10-11f1-b04d-001851328a39",
  "status": "finished",
  "errorCode": null,
  "statistics": {
    "pages": 2,
    "recipientCount": 1,
    "recipientCountSuccessful": 1,
    "recipientCountError": 0
  },
  "recipients": [
    { "faxNumber": "0049821000000", "resultCode": 0, "resultText": "OK" }
  ]
}
Field Meaning
jobId Identifier as in the input
status scheduling, scheduled, processing (in progress), halted, locked (paused), finished, error, canceled (final status, does not change anymore); unknown if the service returns no status
errorCode null on success, otherwise an error code of the fax service
statistics pages, recipientCount, recipientCountSuccessful, recipientCountError; each null as long as the service has not delivered the value
recipients only for a final status: per recipient faxNumber, resultCode (0 = delivered), resultText and further details of the service. If fetching the details fails, the field is missing and the step still succeeds

With the result path faxStatus the status is afterwards found under faxStatus.status, see Result path. For a final status the reporting table prio_fax_jobs is updated as well; an error there does not affect the step.


Errors and behavior

  • Errors end the step with an exception: an error boundary event catches them, otherwise the instance fails, see Errors. There is no status/message return value for errors; status is always the fax status.
  • An unknown job, including a sandbox job queried in live mode or vice versa, leads to "fax-api GET /jobs/ failed: HTTP 404 …" – no value is returned.
  • Further messages: "Missing required field: jobId.", "Fax ist fuer Mandant … nicht eingerichtet …".
  • Transient errors of the fax service (timeout, 5xx) are retried up to three times. Time limit: 900 seconds.
  • In a dry run the service is not called; a sample output is inserted, see Dry run.

Example

Musterfirma GmbH faxes an order confirmation and checks the delivery later.

  1. Send fax with "waitForResult": false, result path fax; the return value contains fax.jobId.
  2. Timer of 10 minutes.
  3. Query fax status with the input expression { "jobId": $.fax.jobId, "test": false }, result path faxStatus.
  4. Gateway: condition $.faxStatus.status in ["finished", "error", "canceled"]. If it is not met, the flow leads back to the timer; if it is met, a second condition $.faxStatus.statistics.recipientCountError = 0 is checked, otherwise sales receives a user task "Fax not delivered".

Frequently asked questions

Why does the step fail with HTTP 404?

The job is unknown in this mode: either the jobId is wrong, or test does not match the mode in which the job was created. An error boundary event catches this case.

Status finished, but one recipient received nothing?

finished only means the job has been processed. The decisive values are statistics.recipientCountError and recipients[*].resultCode; 0 means delivered.

How long does 'Send fax' itself wait?

With waitForResult: true up to about twelve minutes (24 polls at 30-second intervals). If that is not enough, the last known status is returned and the job is checked later with this service.


Next step

Send fax: create the fax job whose status is queried here.