Skip to content

Workflow source data API

Warning

This section may be updated soon!

This endpoint provides a set of detailed object source data that is not directly related to any step of the workflow.

Note

Currently this endpoint only supports fetching outer goal events for interaction workflows

To check how to download source data, check this page

Endpoint

1
POST https://api.giosg.com/api/reporting/workflow/v1/orgs/<organization_id>/workflows/<workflow_id>/source_data

URL attributes

Attribute Type Required Description
organization_id String (UUID) Required ID of the organization for which the data is requested
workflow_id String (UUID) Required ID of the workflow for which the data is requested

Payload

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
    "filters":[
        {
            "property": "label", 
            "values": [ "<goal uuid>" ]
        }
    ],
    "step_data": [
        {},
        {
            "actions": [
                "<view uid>",
                "<view uid>"
            ]
        },
        {
            "actions": [
                "<view uid>"
            ]
        }
    ],
    "interval": {
        "start": "<start_time_ISO8601>",
        "end": "<end_time_ISO8601>",
    },
    "limit": 1000,
    "target": "affected_goal",
    "basic": false | true
}

Payload attributes

Attribute Type Required Description
filters Array of filters Required An array of filter objects used to filter the response. For example you can use action property in filters to get the data for the particular action. Follow this link for more information about filtering
step_data Array of objects Optional An array of objects that describe the step. If this attribute is omitted for the payload of web navigation and interaction workflows, the API will return all events regardless of the data shown on the chart. For voice & video, chat and user-generated workflows this attribute is ignored and events returned by the API always correspond to data on the chart
interval Interval Required Time interval of the query, with start and end being in ISO8601 time format
limit Positive integer Optional A number of rows to return in the response. Must be greater than 0. If this attribute is ommitted, the API will return all relevant data
target String Optional String describing the target that is fetched. Currently accepts only affected_goal and affected_goal_total. Default value is affected_goal if omitted from payload.
basic Boolean Optional Boolean value that describes if response gives basic or advanced data. Basic is more human readable and advanced is "raw" data from database. Default value is false if omitted from payload.

Payload step_data objects explanation

Each object in the step_data array represents a corresponding step. For example: step_data[0] - corresponds to source step, step_data[1] - corresponds to step 1 and so on. An empty object can be passed for the source step(step_data[0]), as source step data is not used in processing

step_data objects can contain the following attribute:

Attribute Type Required Description
actions Array of strings Optional An array of action identifiers. For different types of workflows this array can contain different types of identifiers. For a web navigation workflow, this array contains page_url values for actions, for interaction workflow this array contains view_uid values for actions

Payload target accepted values

Value Description
affected_goal Fetch affected goal trigger events related to the workflow. This is the default if target attribute is omitted
affected_goal_total Fetch all affected goal trigger events (related to the workflow and not realted to the workflow)

Response

Response from the API is an object which contains fields and data elements.

Attribute Type Description
fields Array An array of objects that describe the schema for the data elements
data Array An array of objects, each representing data for a single event
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "fields": [
        {
            "name": "timestamp",
            "type": "datetime",
            "tz": "UTC"
        },
        {
            "name": "source",
            "type": "string"
        },
        {
            "name": "event_version",
            "type": "integer"
        },
        ...
    ],
    "data": [
        {
            "timestamp": "2022-11-03T10:45:54.000Z",
            "source": "",
            "event_version": 1,
            ...
        },
        ...
}  

Response HTTP status codes

Warning

This section should be fact-checked before going live!

Endpoint returns the following HTTP status codes:

  • 200 if the request was successful
  • 401 if you are not authenticated
  • 403 if you do not have active subscription
  • 403 if you do not have access to the organization
  • 403 if you do not have reporting permission
  • 404 if data was not found
  • 406 if filtering with something that is not yet implemented
  • 500 if an unexpected error occurred with the query

Example Requests / Responses

Example Request (basic)

Fetch outer goal data for interaction workflow

1
POST https://api.giosg.com/api/reporting/workflow/v1/orgs/e40bcb66-8c63-4aa7-8d81-68d8e8cef907/workflows/d3f3323f-9787-4abd-850d-9b9b3a5cc6f9/source_data'

Request Payload

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
    "filters":[
        {
            "property": "label", 
            "values": [ "dd863932-9ac0-4a22-80a1-76a3c8ad001c" ]
        }
    ],
    "step_data": [
        {},
        {
            "actions": [
                "a3f3323f-9787-4abd-850d-9b9b3a5cc6f9",
                "b3f3323f-9787-4abd-850d-9b9b3a5cc6f9"
            ]
        },
        {
            "actions": [
                "c3f3323f-9787-4abd-850d-9b9b3a5cc6f9"
            ]
        }
    ],
    "interval": {
        "start": "2023-05-01T00:00:00+00:00",
        "end": "2023-05-09T00:00:00+00:00"
    },
    "target": "affected_goal",
    "limit": "2",
    "basic": true
}

Response

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
{
    "fields": [
        {
            "name": "Date & Time",
            "type": "datetime",
            "tz": "UTC"
        },
        {
            "name": "Goal ID",
            "type": "string"
        },
        {
            "name": "View title",
            "type": "string"
        },
        {
            "name": "Page title",
            "type": "string"
        },
        {
            "name": "Page URL",
            "type": "string"
        },
        {
            "name": "Browser",
            "type": "string"
        },
        {
            "name": "Device",
            "type": "string"
        },
        {
            "name": "City",
            "type": "string"
        },
        {
            "name": "Country",
            "type": "string"
        },
        {
            "name": "ISP or organisation",
            "type": "string"
        },
        {
            "name": "OS (operating system)",
            "type": "string"
        },
        {
            "name": "Interaction ID",
            "type": "string"
        },
        {
            "name": "Visitor ID",
            "type": "string"
        },
        {
            "name": "Session ID",
            "type": "string"
        }
    ],
    "data": [
        {
            "Date & Time": "2023-05-04T12:36:49.086Z",
            "Goal ID": "dd863932-9ac0-4a22-80a1-76a3c8ad001c",
            "Interaction ID / Room IDs": [
                "room_id=58023aa1-b667-4f79-8194-c9c1447fc987",
                "room_id=1e91a115-663c-479f-b6f5-674b46613290"
            ],
            "Page URL": "https://example.com/login",
            "Page title": "Log in",
            "View title": null,
            "Visitor ID": "648b3skad231dalsdd8e65e74119efe",
            "Session ID": "fc7b6cb7-d16d-430d-848e-d3ed9f24daff",
            "Browser": null,
            "Device": null,
            "City": null,
            "Country": null,
            "ISP or organisation": null,
            "OS (operating system)": null
        },
        {
            "Date & Time": "2023-05-04T12:40:30.976Z",
            "Goal ID": "dd863932-9ac0-4a22-80a1-76a3c8ad001c",
            "Interaction ID / Room IDs": [
                "room_id=9f37ff01-a4e3-4028-95ba-e4c25a878228",
                "room_id=932937d1-0c3e-466e-9f96-8e6c5d46ce97"
            ],
            "Page URL": "https://example.com/pricing",
            "Page title": "Pricing",
            "View title": null,
            "Visitor ID": "aksjdh1921jr912jp91j32d1j21edj09j",
            "Session ID": "f047fd40-ce17-479a-bffd-4c3e3223ae23",
            "Browser": null,
            "Device": null,
            "City": null,
            "Country": null,
            "ISP or organisation": null,
            "OS (operating system)": null
        }
    ]
}

Example Request (advanced)

Fetch outer goal data for interaction workflow

1
POST https://api.giosg.com/api/reporting/workflow/v1/orgs/e40bcb66-8c63-4aa7-8d81-68d8e8cef907/workflows/d3f3323f-9787-4abd-850d-9b9b3a5cc6f9/source_data'

Request Payload

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
    "filters":[
        {
            "property": "label", 
            "values": [ "dd863932-9ac0-4a22-80a1-76a3c8ad001c" ]
        }
    ],
    "step_data": [
        {},
        {
            "actions": [
                "a3f3323f-9787-4abd-850d-9b9b3a5cc6f9",
                "b3f3323f-9787-4abd-850d-9b9b3a5cc6f9"
            ]
        },
        {
            "actions": [
                "c3f3323f-9787-4abd-850d-9b9b3a5cc6f9"
            ]
        }
    ],
    "interval": {
        "start": "2023-05-01T00:00:00+00:00",
        "end": "2023-05-09T00:00:00+00:00"
    },
    "target": "affected_goal",
    "limit": "2",
    "basic": false
}

Response

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
    "fields": [
        {
            "name": "timestamp",
            "type": "datetime",
            "tz": "UTC"
        },
        {
            "name": "source",
            "type": "string"
        },
        {
            "name": "event_version",
            "type": "integer"
        },
        {
            "name": "organization_id",
            "type": "string"
        },
        {
            "name": "organization_name",
            "type": "string"
        },
        {
            "name": "category",
            "type": "string"
        },
        {
            "name": "action",
            "type": "string"
        },
        {
            "name": "label",
            "type": "string"
        },
        {
            "name": "vendor",
            "type": "string"
        },
        {
            "name": "properties",
            "type": "string"
        },
        {
            "name": "dim1",
            "type": "string"
        },
        {
            "name": "dim2",
            "type": "string"
        },
        {
            "name": "dim3",
            "type": "string"
        },
        {
            "name": "dim4",
            "type": "string"
        },
        {
            "name": "dim5",
            "type": "string"
        },
        {
            "name": "visitor_id",
            "type": "string"
        },
        {
            "name": "session_id",
            "type": "string"
        },
        {
            "name": "user_id",
            "type": "string"
        },
        {
            "name": "partner_organization_ids",
            "type": "string"
        },
        {
            "name": "browser_name",
            "type": "string"
        },
        {
            "name": "browser_version",
            "type": "string"
        },
        {
            "name": "device_screen_height",
            "type": "string"
        },
        {
            "name": "device_screen_width",
            "type": "string"
        },
        {
            "name": "device_type",
            "type": "string"
        },
        {
            "name": "geo_city",
            "type": "string"
        },
        {
            "name": "geo_country",
            "type": "string"
        },
        {
            "name": "ip_organization",
            "type": "string"
        },
        {
            "name": "os_name",
            "type": "string"
        },
        {
            "name": "os_version",
            "type": "string"
        },
        {
            "name": "value",
            "type": "number"
        }
    ],
    "data": [
        {
            "timestamp": "2023-05-04T12:36:49.086Z",
            "source": "trusted",
            "event_version": 1,
            "organization_id": "e40bcb66-8c63-4aa7-8d81-68d8e8cef907",
            "organization_name": "example.com",
            "category": "goal",
            "action": "trigger",
            "label": "dd863932-9ac0-4a22-80a1-76a3c8ad001c",
            "vendor": "com.giosg.chat",
            "properties": [
                "room_id=58023aa1-b667-4f79-8194-c9c1447fc987",
                "room_id=1e91a115-663c-479f-b6f5-674b46613290"
            ],
            "dim1": "https://example.com/login",
            "dim2": "Log in",
            "dim3": null,
            "dim4": null,
            "dim5": null,
            "visitor_id": "648b3skad231dalsdd8e65e74119efe",
            "session_id": "fc7b6cb7-d16d-430d-848e-d3ed9f24daff",
            "user_id": null,
            "partner_organization_ids": [],
            "browser_name": null,
            "browser_version": null,
            "device_screen_height": null,
            "device_screen_width": null,
            "device_type": null,
            "geo_city": null,
            "geo_country": null,
            "ip_organization": null,
            "os_name": null,
            "os_version": null,
            "value": 1.0
        },
        {
            "timestamp": "2023-05-04T12:40:30.976Z",
            "source": "trusted",
            "event_version": 1,
            "organization_id": "e40bcb66-8c63-4aa7-8d81-68d8e8cef907",
            "organization_name": "example.com",
            "category": "goal",
            "action": "trigger",
            "label": "dd863932-9ac0-4a22-80a1-76a3c8ad001c",
            "vendor": "com.giosg.chat",
            "properties": [
                "room_id=9f37ff01-a4e3-4028-95ba-e4c25a878228",
                "room_id=932937d1-0c3e-466e-9f96-8e6c5d46ce97"
            ],
            "dim1": "https://www.giosg.com/en/pricing",
            "dim2": "Pricing | giosg",
            "dim3": null,
            "dim4": null,
            "dim5": null,
            "visitor_id": "aksjdh1921jr912jp91j32d1j21edj09j",
            "session_id": "f047fd40-ce17-479a-bffd-4c3e3223ae23",
            "user_id": null,
            "partner_organization_ids": [],
            "browser_name": null,
            "browser_version": null,
            "device_screen_height": null,
            "device_screen_width": null,
            "device_type": null,
            "geo_city": null,
            "geo_country": null,
            "ip_organization": null,
            "os_name": null,
            "os_version": null,
            "value": 1.0
        }
    ]
}