Gear Development

Marketing Cloud Personalization Gears are an application extension platform used to add custom business functionality to the Personalization platform. A Personalization administrator at your company can enable and disable Gears in the UI.

Gear development is managed by Personalization. You can file Gear development requests as feature requests on the Salesforce IdeaExchange portal for the Personalization Product team members.

All Gears, template and Web SDK code are in TypeScript, a typed superset of JavaScript that compiles to plain JavaScript.

For more information, refer to the TypeScript Documentation.

Each TypeScript source file within a gear is an ES module, which allows the developer and consumer the benefits of encapsulation, namespacing, and flexibility to avoid naming conflicts by renaming/aliasing namespaces.

A module has its own scope and has to explicitly export what needs to be accessible to others. Similarly, it must import from other modules as desired.

Typically, you'll export a class or function you wish to be available for use outside of that file. Imports do not include file extensions like .ts, as shown in the following examples.

For more information, refer to the TypeScript Modules documentation.

Example Imports/Exports

Gear ID gear-one file Utils.ts:

Another gear-one file GearOne.ts importing from its own Utils with a relative path of ./:

A different gear, id gear-two file GearTwo.ts has to be imported from the absolute path gear-one (the gear id):

TypeDescriptionNetworkFilesystemSystem Services
Campaign ServiceExposes services to Server-Side Campaign Sources𐄂𐄂
Event ComponentExecutes𐄂𐄂
Event TransformUpdate events at the front of the pipeline𐄂𐄂
Visit Start ListenerExecutes at the start of a visit𐄂𐄂
Visit End ListenerExecutes at the end of a visit (typically 30 minutes after last activity)𐄂𐄂
Order ListenerExecutes on a conversion event𐄂𐄂
Deferred TaskAn asynchronous task that can be fired from pipeline gears to do expensive work
Beacon ResourceResources to be included with and shipped with the beacon𐄂𐄂
API ServiceExpose a custom API on a custom endpoint𐄂𐄂
Segment RuleA custom segment rule𐄂𐄂
Segment ExportProvides segment membership deltas that can be exported to a file or an external service.
Pipeline TransformUpdate users in the pipeline𐄂𐄂
Workflow TriggerDecides in the pipeline on whether to trigger a workflow𐄂𐄂
Workflow ActionA custom action that can be executed as part of a workflow𐄂
Email SenderCustom sending of triggered and batch emails𐄂
Campaign Server-Side CodeThe server-side portion of custom campaign code𐄂𐄂
ETL JobExecutes file loading and output
User UpdaterUpdate user during nightly, for example, custom scoring and targeting𐄂𐄂
Identity ResolverResolves identity conflicts and merges user profiles𐄂𐄂
Audit NotifierAudits important system configuration events𐄂
Data Sync UpdaterAfter visit, sync data to a data warehouse
Client-Side JS BundleAdd JavaScript to the beacon
Custom ReportA report with customized output based on selected metrics and data
Batch JobFetches objects in iterative batches that can be staged and committed.𐄂
Entity JobIterates over Personalization Users, Accounts, or Catalog Items to perform updates or export data.
OAuthConfigures authentication with external services via OAuth.𐄂𐄂𐄂
HTTP Basic AuthConfigures authentication with external services via HTTP basic authentication.𐄂𐄂
Custom AuthConfigures authentication with external services via a custom authentication scheme.𐄂𐄂
System ServicesDescription
Pipeline CatalogAccess to the catalog in pipeline component types (real-time)
CatalogProvides access to Items within the Personalization Platform's catalog
DeferDefers tasks to be run at a later point in time
FilesystemProvides a virtualized filesystem
CSVProvides a virtualized filesystem for parsing CSV files
XMLProvides a virtualized filesystem for parsing XML files
S3 FilesystemProvides a virtualized filesystem backed by AWS S3
HTTPUsed for accessing HTTP resources
AuthorizationProvides access to the authorization and authentication state of the gear to external systems.
ProfileAccess to the Unified Customer Profile of a user within the Personalization platform.
RecommendationsAccess to the Personalization Platform's recommendation engine.
Campaign Statistics
GearA bundled feature that extends the Personalization platform.
Gear ComponentEach Component of a Gear provides source code that implements a Component Type.
Component TypeA specific integration hook into the Personalization platform. Abstract class to be implemented by a Gear Component.
System ServiceThese services are exposed to the Gears environments and provide access to the fundamental features of the Personalization platform.
Gears ContextGears contexts are the environments exposed to the executing Gears code. The shape of these contexts depends on the component type.
Core GearsThese gears deliver core features of the Personalization platform. You can override core gears and customize them per environment.
Private GearsThese gears are specific to your environment and are not visible to other environments.
Shared GearsShared gears are available in the gears marketplace and can be installed, according to licensing agreements in each environment.