Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cassettes

The cassette integration pattern: code you write that runs inside a third-party platform's own runtime, such as a Magento module, NetSuite SuiteScript, or Salesforce Apex, backed by a Pandium-hosted s

"Cassette" is our name for the pattern where the platform runs code you wrote inside its own runtime, rather than Pandium running it inside ours, the way a tape deck runs whatever is on the cassette you hand it. A Magento module, a NetSuite SuiteScript, a Salesforce Apex component, a Shopify Function: each one is code that lives and executes on the third party's infrastructure, not on Pandium's.

A platform event inside the third party's runtime invokes your cassette, which calls a Pandium-hosted service that holds the real logic and talks to your API

Why this pattern exists

Some hooks are only available from inside the platform. Intercepting a record before it saves, or reading data where it already lives without a network hop, is not possible from an external job or webhook. The platform has to be the one running your code.

Cassettes are also often the route to an app store listing. Some marketplaces, NetSuite's among them, expect a native component installed in the customer's account rather than an integration that only talks to the API from outside. See Listing in External Marketplaces for the marketplaces Pandium supports directly.

How it works on Pandium

Keep the cassette thin. The code that ships into the platform should do the minimum the platform requires, then hand off over HTTPS to a service hosted on Pandium that holds the real business logic and talks to your API. That keeps one copy of the logic in a place you control, and keeps the in-platform artifact small enough to version and upgrade without pain.

The trade-off

You are building in the platform's language, inside its sandbox limits, on its release cycle. Every customer install becomes a deployed artifact you have to version, upgrade, and support out in the wild, rather than something running centrally on Pandium's infrastructure. That is why, outside of app store requirements, most of the NetSuite integrations we build use the batch pattern against the NetSuite API instead.

Where this shows up

  • A Magento module that surfaces your app inside the merchant's admin and intercepts cart or order events

  • A NetSuite SuiteScript bundle built to qualify for the SuiteApp marketplace

  • A Salesforce Apex component running your logic inside a customer's org

When to use it

Reach for a cassette when the platform gives no other way in, or the integration needs to live inside its UI. Like provider APIs, this is usually the platform's requirement rather than a genuine choice between patterns.

Last updated

Was this helpful?