Use a hook script to create, read, and update lookup cache data programmatically, for example to reduce API calls or run operations faster. This article is for developers who write hook scripts for exports and imports.
Prerequisites:
- The lookup cache is part of an integration through mapping or lookups, and it's registered with that integration. You can't reference or edit its data from a script otherwise. See Register lookup caches with an integration.
- A hook script for an export or import. See Create hook scripts for exports and imports.
Reference a lookup cache in a script
integrator.io creates an alias when you register a lookup cache. Copy that alias into your hook script by following Reference an alias in hook scripts, and then call the lookup cache functions you need. For the list of operations, see the lookup cache runtime objects in integrator.io API and JavaScript runtime objects.