The DevXP engineering team hosts office hours every Thursday at 11 a.m.
Pacific Time where we answer your questions live and help you get up and
running with Flatfile. Join
us!
Use cases
The use cases for dynamic configuration are endless, here are just a few ideas:- Perhaps the user who is creating the Space informs how you want that Space to look for them
- Or maybe someone’s location defines a different type of currency in your Sheet configuration
- Or say you need data from an external API in a precise moment in time to determine how you want your Workbook to look
Configuring a new Space
From the dashboard
When the “Create New Space” button is clicked on the platform, it triggers a jobevent
within the space domain
that initiates a configure operation
. This operation is analogous to performing a POST request to the endpoint /api/v1/spaces with the parameter autoconfigure
set to true.
- Filter on the
domain
(space) and theoperation
(configure). - Listen for a
job:ready
event. - Build your Space, at minimum including one Workbook.
- Complete the job.
- Optionally, listen for new events that are spawned from within your
space:configure
job.
Usage
In the following example, we build a Workbook and our getting started guide. You can also follow along in the flatfile-docs-kitchen-sink Github sandbox.Be sure to complete the job when it’s complete. This tells the platform that
you’re finished and ready to display the Space to the end user.
From an embedded button
When embedding Flatfile in your application, two things can happen:- A new Space is created every time the Flatfile platform is called to open
- Or an existing Space can be passed in.