Plug your third party services through integrations

Forest Admin is able to leverage data from third party services by reconciling it with your application’s data and providing it directly to your back office. All your actions can be performed at the same place, bringing additional intelligence to your back office and ensuring consistency.

For example, we're plugging our Stripe demo account used to compute our MRR example in the Track your KPIS at a record level chapter.

Lumber
Rails
Express/Sequelize
Express/Mongoose

Enabling an integration only requires a few lines of configuration on your back office server.

app.js
// ...
app.use(require('forest-express-sequelize').init({
modelsDir: __dirname + '/models',
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
sequelize: require('./models').sequelize,
integrations: {
stripe: {
apiKey: process.env.STRIPE_SECRET_KEY,
mapping: 'customers.stripe_id',
stripe: require('stripe')
}
}
}));
module.exports = app;

Enabling an integration only requires a few lines of configuration on your back office server.

/config/initializers/forest_liana.rb
ForestLiana.env_secret = Rails.application.secrets.forest_env_secret
ForestLiana.auth_secret = Rails.application.secrets.forest_auth_secret
ForestLiana.integrations = {
stripe: {
api_key: ENV['STRIPE_SECRET_KEY'],
mapping: 'Customer.stripe_id'
}
}

Enabling an integration only requires a few lines of configuration on your back office server.

app.js
// ...
app.use(require('forest-express-sequelize').init({
modelsDir: __dirname + '/models',
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
sequelize: require('./models').sequelize,
integrations: {
stripe: {
apiKey: process.env.STRIPE_SECRET_KEY,
mapping: 'customers.stripe_id',
stripe: require('stripe')
}
}
}));
module.exports = app;

Enabling an integration only requires a few lines of configuration on your back office server.

app.js
// ...
app.use(require('forest-express-mongoose').init({
modelsDir: __dirname + '/models',
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
mongoose: require('mongoose'),
integrations: {
stripe: {
apiKey: process.env.STRIPE_SECRET_KEY,
mapping: 'customers.stripe_id',
stripe: require('stripe')
}
}
}));
module.exports = app;

Name

Type

Description

apiKey

string

The API Secret key of your Stripe account. Should normally starts with sk_.

mapping

string

Indicates how to reconcile your Customer data from your Stripe account and your collection/field from your database. Format must be <model_name>.<stripe_customer_id_field>

A stripe option is also available (except for Rails) to use the official Node.js Stripe library NPM package.

Then, we need to restart our back office server and we will see a notification that a new version of our back office is available.

Finally, after refreshing the back office interface, we will be able to access your Stripe's data reconciled with your Application's data.

Congratulations! We've fully completed the Setup Guide together! 🎉