Context
You can access your functions context trough the SUPERFLOW
object.
return SUPERFLOW
Example output:
{
"app": {
"id": "179b58ac-e56a-487b-8735-97a1f533331",
"name": "My Superapp",
"description": "This is the best app build with Superflow",
"cloud_location": [
"europe"
],
"platform_compatibility": [
"shopify"
],
"data_location": "eu-central-1 (frankfurt)",
"data_location_replication": false,
"is_published": false,
"current_flow": {},
"variables": {}
},
"workspace": {
"id": "3cd1dbac-a6c5-460c-9702-5cf8123a59a8",
"name": "Default workspace"
}
}
In this example, the app
object contains information about the current app, and the workspace
object contains information about the current workspace.
Flow Context
You can also access all data of previous steps of your Flow, when the Function is executed from within a Flow:
return SUPERFLOW.app.current_flow
{
"results": {
"trigger": {
"url": "https://mytestshop.myshopify.com/",
"title": "My Testshop - Home",
"language": "de-DE",
"country": "Austria",
"theme": "Dawn",
"pagetype": "index",
"loggedIn": true,
"userid": "123456789",
"firstname": "John",
"lastname": "Dow",
"email": "[email protected]"
},
"actions": {
"Console Log": {
"message": "Hello World"
}
}
}
}