# Data Store

Data Store is a built-in data storage system. With Data Store, you can easily add, delete, update, check up your data either manually or in Action steps.

#### Setup Data Store <a href="#setup-data-store" id="setup-data-store"></a>

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FqbejmHyCr6eK56qlrE8c%2Ftempsnip.png?alt=media&#x26;token=bd3f30ea-ae7e-4847-9e5a-bf0ef09d0772" alt=""><figcaption></figcaption></figure>

1. 1.name the Data Store
2. 2.click "+ Add Field", the following window will pop up.
3. 3.when finished, click "Save".

​

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FpyDQfBRiF5QMqPdAbAjW%2Fdata_store2.1569a8a5.png?alt=media&#x26;token=e6386ef0-de62-4815-95f8-e315d4092ec1" alt=""><figcaption></figcaption></figure>

1. 1.name the field (used in the system, no space allowed)
2. 2.choose a value type (an Array can have several values like JSON variable)
3. 3.give a label if needed (for prettier display)
4. 4.give a default value if needed
5. 5.once finish, "Save"

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FdByFN8CbLSwvyXMyL4mH%2Fdata_store3.6866f6bf.png?alt=media&#x26;token=e7995dc5-9734-4149-919c-bafd6a1181eb" alt=""><figcaption></figcaption></figure>

1. 1.click "Browse" for viewing and editing records
2. 2.click the pencil for editing fields of Data Store

​You can add/edit/delete records in the data store in 2 ways:

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2F4Gt3ZIE8g1qz4JrOMKXS%2Fdata_store4.c1d9e661.png?alt=media&#x26;token=69e33f6c-1e97-4cbc-967d-f88bf5b6dce3" alt=""><figcaption></figcaption></figure>

* Do it manually in the "Browse" window in the following picture
* Put it in the Action step and the flow will automate the process

**Please note that**When you add a new record, the system will assign a unique "Record Id" to it automatically. You can access this value by using the field name "\_id".

#### Manage Records Manually <a href="#manage-records-manually" id="manage-records-manually"></a>

​

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FsIIgezyTQIywZEgnfqu5%2Fdata_store5.133fb2ee.png?alt=media&#x26;token=b105b3c7-7dcf-43dc-9ec5-8d1f3b19de68" alt=""><figcaption></figcaption></figure>

1. 1.add new records, see picture below
2. 2.edit/delete records
3. 3.search records

A new record requires values for the fields you set in the data store (value can be blank). There will be a "Delete" button in the editing window and the rest look the same as above.

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FQWR9FYkl6YmG69KwQaYE%2Fdata_store6.a66d738d.png?alt=media&#x26;token=57ed12b4-0c6e-42cd-9978-ac3127028d83" alt=""><figcaption></figcaption></figure>

#### Manage Records in Action Step <a href="#manage-records-in-action-step" id="manage-records-in-action-step"></a>

In an Action step, follow steps 1 to 3 in the above picture. Then you will see a list of functions.\\

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2FzcCTdxQP61zleWJOZKwi%2Fdata_store8.41d56032.png?alt=media&#x26;token=284087e7-97ee-4815-acfb-e1694c6a7abb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://289455019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRaLazqQDW4JMiGe2iyKg%2Fuploads%2Fzz6lv8mbXf7P5DjEqjSo%2Fdata_store7.32c9f004.png?alt=media&#x26;token=8a9a4d54-b5dd-4b6d-ad5c-54f042c7876a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The functions work via API calls. This means that, by giving some inputs, you get your outputs from the data store. The outputs are saved in custom fields for future uses.
{% endhint %}

{% hint style="warning" %}
You might need to know how to build flow and use variables before you read the following functions. See links below for guidance.
{% endhint %}

[flow-builder](https://konversation-io.gitbook.io/konversation/flow-builder "mention")

[variable-operation](https://konversation-io.gitbook.io/konversation/flow-builder/steps/variable-operation "mention")
