API Recipe: Extract All Journey Statuses

Overview

Journeys are single-thread tests performed on your website. As element attributes on the page configure them, they can sometimes “break” and not complete. They can also complete but have errors in the conditions set by rules within the Journey. 

Example result of visualizing Journey statuses over time

Collecting Journey statuses over time can help determine issues with Journey configurations, tagging implementations, journey testing improvements, and much more.

Implementation

Make a GET request to the following URL:

The following is an example array of Journeys that will be returned:

[

{

"name": "Sample Journey",

"lastCheck": "2033-01-01T00:00:00.000-07:00",

"queued": false,

"folderId": 1234,

"options": {

"location": "mountain",

"nextRun": "2033-01-01T00:00:00.000-07:00",

"browserWidth": 1366,

"remoteFileMapConfig": [],

"userAgent": "Chrome - Linux",

"flashLiveVideoEnabled": false,

"customProxy": null,

"monitoredByScriptServices": false,

"loadFlash": true,

"blackoutPeriod": null,

"userAgentDescription": "Chrome - Linux",

"frequency": "paused",

"alerts": true,

"vpnEnabled": false,

"webHookUrl": null

},

"webJourneyRunning": false,

"id": 123,

"status": "Ok",

"screenshot": "",

"createdAt": "2033-01-01T00:00:00.000-07:00",

"domainId": 1234,

"actions": [],

"nextCheck": "2033-01-01T00:00:00.000-07:00",

"userId": 123,

"emails": [

"support@observepoint.com"

]

},

...

Step 2: (Optional) Filter for desired Journeys

Filter the results based on folderId or domainId to focus on specific Journeys that are in a "prod" state. This ensures that only relevant Journeys are included.

If this is the case, you can filter the results of the returned Journeys above by the folderId or domainId attribute(s). domainId is the subfolder ID.

Step 3: Map Journey statuses

The status attribute in the returned Journey object above will indicate the status of the Journey at the time the endpoint is called. The following is definitions for possible results:

Status Value Description
Ok The Journey was successful
ActionFailure The Journey encountered an error when performing an action
RulesFailure The Journey successfully completed but encountered failures in its rule conditions
NotChecked The Journey has never been run

Conclusion

By following these steps, you can leverage the extracted Journey statuses to gain valuable insights, improve Journey testing, identify areas for optimization, and ensure a smooth and error-free user Journey on your website.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us