# How to temporarily store a record

**URL:** <https://community.synatic.com/t/how-to-temporarily-store-a-record/229>\
**Category:** Flows\
**Tags:** flows, helper-functions\
**Created:** [May 16, 2022, 4:30pm UTC](https://community.synatic.com/t/how-to-temporarily-store-a-record/229 "2022-05-16T16:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![navessa](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.synatic.com/navessa/32/58_2.png) [@navessa](https://community.synatic.com/u/navessa)\
**Post date:** [May 16, 2022, 4:30pm UTC](https://community.synatic.com/t/how-to-temporarily-store-a-record/229/1 "2022-05-16T16:30:10Z")

</div>

A buffer helps to store records but if you require to store a record temporarily, the **Cache destination step** and the **Cache Lookup step** are used.

Illustrated below is an example of a flow where the Cache destination step and the Cache Lookup step are used.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/deff5718af13218e4b0fcd2063ba8ce145202174.png)

In the below image, the Record Generator step is used as a source step and it is populated with 2 fields.

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/e7b7fdfb94efd5a575053dc837b6e692c2803980.png)

The below image is the **Cache destination step**. In the **Scope field** , you can select where you want your cache record to be stored from the drop down list. It can either be stored in a Global solution, the solution or in the flow. The **Key field** is the name you want to give the record, so you can reference it in your Cache Lookup step. The **Expiry field** is how long you want to store your cache record which is measured in seconds. The Path field is not required but it can be used if you want to store records in a path.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/51e5facd0a6ea7ad847e88e832a4bb2fc569ecc8.png)

In the sub-flow, the Salesforce source step is being used to pull records out of Salesforce and the output is in the below image.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/3391a0b28a3f16d23b9a95b5406fe2c7ad3337a7.png)

A **Cache Lookup step** is then used to **reference the the record** that was **temporarily stored** earlier using the **Cache destination step**. Illustrated in the below image is the Cache Lookup step. The Scope field is used to reference where the record was stored in. In the Key field, it is populated with the name that was used in the Cache destination step. For the **record to be in the results** , you have to **map** the source field to a new field. This can be done under the **Mappings** section by clicking on the highlighted icon in the below image to add a mapping field.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/305c606e2a8c155046ad2e51de9c3d3fe9a1823f.png)

The below image is the output results after the Cache Lookup step. As highlighted in the below image, the new field “Dept” is added with the record value that was stored in the Cache destination step.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/714e14b197c97f9cdc95e5cc2e77aef66a2b87ee.png)
