JDBC Driver for Salesforce Marketing Cloud

Build 22.0.8462

Journeys

Create, update, delete and query journeys.

Table Specific Information

Select

Retrieve journeys with the most recent version:

SELECT * FROM Journeys

Retrieve a journey version:

SELECT * FROM Journeys WHERE ID='1cb643b5-3144-4d17-80fa-a1f0035e78e2' AND Version=1

Retrieve all journey versions:

SELECT * FROM Journeys WHERE MostRecentVersionOnly=false

Retrieve journeys with a specific tag:

SELECT * FROM Journeys WHERE Tag='First_Tag'

Retrieve journeys which have the specified search string inside the name or description:

SELECT * FROM Journeys WHERE NameOrDescription='Journey'

Retrieve journeys with specific work flow API version:

SELECT * FROM Journeys WHERE workFlowApiVersion=1

Retrieve journeys with specific version:

SELECT * FROM Journeys WHERE Version=1

Retrieve journeys with specific status:

SELECT * FROM Journeys WHERE Status='Draft'

Sort Journeys according to modifiedDate or name column:

SELECT * FROM Journeys Order BY ModifiedDate DESC
SELECT * FROM Journeys Order BY Name DESC

Insert

To create a new journey, you will need to specify at least the Name column.

INSERT INTO Journeys(Name) VALUES('API-Created journey')

To create a new journey version, you will need to specify an existing journey key.

INSERT INTO Journeys(Name,Key) VALUES('API-Created journey Version 3','53bf5ea2-ff59-4c00-a23a-b1e9e333b80c')

Update

Journeys may be modified by providing the Id, Version of the journey and issuing an UPDATE statement.

UPDATE Journeys SET Name='API-Updated journey' WHERE Id='257c51df-d6ed-4fb6-8fbc-70e63ed52b12' AND Version=5

Delete

Journeys may be deleted by providing the Id of the journey and issuing a DELETE statement.

DELETE FROM Journeys WHERE Id='53bf5ea2-ff59-4c00-a23a-b1e9e333b80c'

Journey versions may be deleted by providing the Id, Version of the journey and issuing a DELETE statement.

DELETE FROM Journeys WHERE Id='257c51df-d6ed-4fb6-8fbc-70e63ed52b12' AND Version=5

Columns

Name Type ReadOnly References Filters Description
Id [KEY] String True =

A unique identifier for this journey that is generated and assigned by the journey API during creation.

Version Integer True =

This number denotes the iteration of this particular journey.

Key String False

The customer key (also a unique identifier within the MID) for this journey.

Name String False

The display name used in the Journey Builder UI for this journey, this will be visible to everyone who logs into your Marketing Cloud account.

Status String False =

A status description upon which to filter journeys.

The allowed values are Draft, Published, ScheduledToPublish, Stopped, Unpublished, Deleted.

CreatedDate Datetime True

The datetime when the journey was created.

ModifiedDate Datetime True

The datetime when the journey was updated.

LastPublishedDate Datetime True

The datetime when the journey was last published.

Description String False

The human readable description of this journey that informs others of purpose.

WorkFlowApiVersion Integer False =

The version of work flow API.

The default value is 1.

Tags String False

Assigned tags to the journey.

Goals String False

This is an array of goals containing a single object.

Triggers String False

This is an array of triggers containing a single object.

Defaults String False

This object contains an ordered list of email expressions used to determine which email address to use as the default, starting with the first expression.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
MostRecentVersionOnly Boolean

A flag to indicate whether to fetch only the most recent version of matching journeys.

The default value is true.

Tag String

Specify a single tag to filter results to only include journeys associated with that tag.

NameOrDescription String

A search string inside the journey's name or description properties upon which to match for filtering.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462