# Can I display external data?

**URL:** <https://community.forestadmin.com/t/can-i-display-external-data/941>\
**Category:** Help me!\
**Created:** [September 10, 2020, 7:12am UTC](https://community.forestadmin.com/t/can-i-display-external-data/941 "2020-09-10T07:12:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isadora\_Rebelo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/isadora_rebelo/32/715_2.png) [@Isadora\_Rebelo](https://community.forestadmin.com/u/Isadora_Rebelo)\
**Post date:** [September 10, 2020, 7:12am UTC](https://community.forestadmin.com/t/can-i-display-external-data/941/1 "2020-09-10T07:12:09Z")

</div>

Hello,

Using the smart view could I make a call to another API (not the forest models, or routes), to display this data on the admin side?

For example, using useEffect.

Thanks in advance,  
Isadora

---

<div class="post-metadata">

**Author:** ![louis](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louis/32/4_2.png) [@louis](https://community.forestadmin.com/u/louis)\
**Post date:** [September 10, 2020, 7:18am UTC](https://community.forestadmin.com/t/can-i-display-external-data/941/2 "2020-09-10T07:18:20Z")

</div>

Hi @Isadora_Rebelo 👋,and welcome to our community!

After installation, Forest Admin will “only” display the data present on your database (the one you have specified during the set up).

Then, you can totally fetch external data to reconciliate different datasources into your Forest Admin (not coming from your database) such as Stripe payments, Hubspot companies, External doc from AWS.

For this, you can use [smart collections](https://docs.forestadmin.com/documentation/reference-guide/collections/create-a-smart-collection).

Here are a few examples:

- [Create a Smart Collection with Amazon S3](https://docs.forestadmin.com/documentation/reference-guide/collections/amazon-s3-integration-example)
- [Display Hubspot companies](https://docs.forestadmin.com/woodshop/how-tos/hubspot/create-a-smart-collection-of-hubspot-companies)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Isadora\_Rebelo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/isadora_rebelo/32/715_2.png) [@Isadora\_Rebelo](https://community.forestadmin.com/u/Isadora_Rebelo)\
**Post date:** [September 11, 2020, 12:43pm UTC](https://community.forestadmin.com/t/can-i-display-external-data/941/3 "2020-09-11T12:43:52Z")

</div>

Hi @louis!

First, thank you for the fast reply, I was trying to apply it but I don’t feel like it’s what I’m looking for. I have Treezor cards that I want to display on my users, so not a different collection, but just call it in a collum at Forest Admin. Like, implement in on the module?

I’m not sure if I’m making myself clear but basic I want to call Treezor specific information on my already existing collections. That’s why I thought first on the smart view.

---

<div class="post-metadata">

**Author:** ![anon20071947](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@anon20071947](https://community.forestadmin.com/u/anon20071947)\
**Post date:** [September 11, 2020, 2:16pm UTC](https://community.forestadmin.com/t/can-i-display-external-data/941/4 "2020-09-11T14:16:10Z")

</div>

Hi @Isadora_Rebelo 👋🏼

Thanks for the details, I think I have a better understanding of your need now. No **Smart Views** are required here.

You can consume the Treezor API to fetch and display data directly in your existing **users** collection. This can be done through the use of [Smart Fields](https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields). It will basically add a new (virtual) column in your UI.

```javascript
const { collection } = require('forest-express-sequelize');

// This file allows you to add to your Forest UI:
// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions
// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields
// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship
// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments
collection('orders', {
  actions: [],
  fields: [{
    field: 'user treezor card',
    type: 'String',
    get: (user) => ({
      // API call here
    }),
  }],
  segments: [],
});

```

Keep in mind this will create one API call per record in your collection. If you are displaying 100 records per page, it could degrade performance a bit 🙂

**Bonus:** If you are on `forest-express-sequelize`, I suggest you use `afterFind` Sequelize hooks to create one single API call for all records per page and load the Smart Fields all at once. Here’s a step-by-step [how-to guide](https://docs.forestadmin.com/woodshop/how-tos/load-smart-fields-using-sequelizes-afterfind-hook) on that.

Cheers,

---

<div class="post-metadata">

**Author:** ![Isadora\_Rebelo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/isadora_rebelo/32/715_2.png) [@Isadora\_Rebelo](https://community.forestadmin.com/u/Isadora_Rebelo)\
**Post date:** [September 16, 2020, 8:07am UTC](https://community.forestadmin.com/t/can-i-display-external-data/941/5 "2020-09-16T08:07:36Z")

</div>

Hi @anon20071947!

Yes! This makes the magic, thanks a lot 😄

Cheers,
