lmsdt
v1.0.0
Published
LMS data Transfer tool to ensure data consistency between salesforce LMS environments.
Maintainers
Readme
lmsdt — Loyalty Management Data Transfer
A Salesforce CLI plugin that keeps Loyalty Management (LMS) configuration data consistent between Salesforce orgs — e.g. from production into refreshed sandboxes.
Loyalty Cloud data seeding is hard for two reasons this plugin solves:
- Ordering & state — records must load in a strict dependency sequence, and Promotions must be inserted deactivated and only activated afterwards.
- External identity — idempotent upserts need stable external-id (deployment key) fields that are not uniformly available across the LMS objects.
Installation
sf plugins install lmsdtCommands
| Command | Purpose |
| --- | --- |
| sf verify externalIds | Report every LMS record whose external-id field is empty. |
| sf fill missing ids | Backfill blank deployment keys with the record's own id (safe, consent-gated handling of active joint promotions). |
| sf compare orgs lmsdata | Field-level diff of LMS configuration between two orgs, keyed by deployment key. |
| sf seed orgs lmsdata | Copy every added/modified record from a source org into a target org in dependency order, with cross-org lookup remapping, promotion configuration sync, and activation. Never deletes target records. |
Typical flow
# 1. Ensure the source org has external ids everywhere
sf verify externalIds --target-org SOURCE --external-id-field LMS_Deployment_Key__c
sf fill missing ids --target-org SOURCE
# 2. Preview, then seed the delta into the target
sf seed orgs lmsdata -s SOURCE -t TARGET --dry-run
sf seed orgs lmsdata -s SOURCE -t TARGET
# 3. Confirm parity
sf compare orgs lmsdata -s SOURCE -t TARGETEvery command supports --json for programmatic use. Run any command with --help for full flag documentation.
Notes
- Promotions are always inserted deactivated and re-activated in a dedicated final pass; promotions activated via the API may require a manual deactivate/reactivate in the UI before they process Transaction Journals (Salesforce Loyalty Known Issue).
- Records that exist only in the target are reported but never deleted.
License
BSD-3-Clause
