You are here:
Create a Cache Block Example
In this example, an Integration Procedure accepts a list of first or last names and retrieves Contacts having those names. A Cache Block improves Contact retrieval performance.
In this example, the Integration Procedure has these components:
-
A Cache Block, named CacheBlock1
-
A Loop Block within the Cache Block, named LoopBlock1
-
An Omnistudio Data Mapper Extract Action within the Loop Block, named ExtractContact
-
A Response Action, named ResponseAction
To build this Integration Procedure:
- Create an Integration Procedure.
- Add a Cache Block component:
- Configure the Cache Block component with these settings:
- Add a Loop Block inside the Cache Block and configure it with these settings:
-
Create a Data Mapper Extract that the Data Mapper Extract Action calls, and
configure it with these settings:
Tab
Settings
Extract
A Contact extract step set to
Contact Name LIKE nameOutput
A mapping from
Contact:IdtoContact:IdA mapping from
Contact:NametoContact:NameTo create a Data Mapper Extract, see the examples in Omnistudio Data Mapper Extract Examples.
-
Add a Data Mapper Extract Action inside the Loop Block, and configure it with these
settings:
Property
Value
Element Name
ExtractContact
Data Mapper Interface
ExtractContactName
Data Source
names:name
Filter Value
name
-
Add a Response Action below the Loop Block, and configure it with these
settings:
Property
Value
Send JSON Path
CacheBlock1
- Click Edit as JSON. If you’re using the designer on a managed package, click Preview, and then click Edit as JSON.
-
Copy this JSON data and paste it into the Input Parameters panel:
{ "names": [ { "name": "Miller" }, { "name": "Torres" } ] }To demonstrate performance most effectively, specify common and/or many names.
- Click Execute and note the resulting Browser, Server, and Apex CPU values.
-
Open the Options pane and change the
ignoreCachevalue tofalse. - Click Execute. This step populates the cache, so the resulting Browser, Server, and Apex CPU values should be similar to the previous values.
- Click Execute. This step uses the cached values, so the resulting Browser, Server, and Apex CPU values should be noticeably less than the previous values.
-
To see the
vlcCacheKeyandvlcCacheResultnodes, open the Debug Log and scroll to theCacheBlock1Infonode.


