StoreConnect sync and deploy
Getting a change from a local tree or an agent session onto a StoreConnect store,
in the right order, with a preview a human approved and a verified result on the
live storefront.
Ordering is the substance of this skill. Most failed deployments are the right
content applied to the wrong target, without a rollback, or reported complete
before preview, approval, synchronization, and live verification finish.
Non-negotiable rules
Read these before any write. They apply on every path.
- Never deploy or publish directly to production. Land the change on a
non-live theme or a draft, verify it in a preview, and only then apply or
approve it for the live store.
- Confirm the target before any push. Salesforce org and alias, environment
(development / staging / production), Store name and domain, theme name and Id.
Resolve each with a read operation and show the operator what you resolved. If
you cannot state which environment you are about to write to, stop.
- Human approval is a hard gate before publishing to a live store. Publishing
is a separate action from pushing, requested separately and approved
explicitly. Never infer approval from an earlier "go ahead" that covered the
edit, and never fabricate or reconstruct approval.
- Never publish without verifying the preview first. Open the preview, look
at the affected pages, check the browser console. A publish with no preview
verification is the failure this skill exists to prevent.
- Use the current supported cache-refresh workflow. If an authorized
operator cannot provide a documented procedure for the chosen deployment
path, stop and hand off rather than reproducing a mechanism from an old
example or another store.
- Never push test, debug, or placeholder content to production. Strip
{% debug %} and {% timer %} tags, console logging, commented-out
experiments, and lorem or placeholder copy before a production push. Never
point a production store at a test payment gateway, a staging endpoint, or a
development asset host.
- Destructive cleanup needs an explicit, itemized confirmation. Never
auto-delete. Produce the list of records to remove, cap it, and stop if the
count is larger than expected — a big delete list is nearly always a
key-mapping bug, not intentional cleanup.
- Scope every read and write by Store and theme. One store, one theme. After
the deploy, confirm no other Store or theme changed.
- Never put a credential in a command line, a repository file, or chat, and
never interpolate Liquid, HTML, CSS, JSON, or translated copy into a shell
command or a SOQL string — serialize it to a file. Never log customer data.
- Do not mix deployment paths in one change. A staged draft plus a direct
Salesforce write on the same records race each other, and the direct write is
invisible to the approver reviewing the draft.
Choose the path
Work down this list and stop at the first row that fits. Lower rows have a larger
blast radius and fewer safety rails.
| # |
Condition |
Path |
| 1 |
Connected StoreConnect tools are present and cover the records you need to change |
The supported staged and review-backed workflow. Default. |
| 2 |
Theme .liquid templates, working from a local checkout, no connected StoreConnect tools |
The currently documented storeconnect-cli (sc) theme workflow |
| 3 |
The supported staged paths do not cover the required change |
A current, documented Salesforce workflow supplied by an authorized operator. Treat it as immediate-write and require a reviewed plan, dry-run where available, preview procedure, and explicit approval |
| 4 |
Apex, triggers, custom objects, fields, or other Salesforce metadata |
sf project deploy with an appropriate test level. See storeconnect-apex-integration |
If rows 1 and 2 both fit, take row 1 so related supported changes can stay in one
reviewed change set.
If you are reaching for row 3, say out loud why rows 1 and 2 cannot carry the
change before you start. "It is faster" is not a reason.
Which reference to read
| Situation |
Read |
Pushing theme files through sc, or driving the staged draft → preview → publish pipeline directly. Also read this before your first publish on any store: "publish" does not mean live, and knowing that changes what you tell the operator |
references/cli-and-staged-pipeline.md |
| Considering a direct Salesforce theme write because the staged workflows do not cover the change — approval boundary, rollback, live-schema planning, safe apply/delete behavior, supported cache refresh, and partial-failure handling |
references/theme-pull-push.md |
| A domain cutover, or the first production publish of a new or replaced storefront. Work through it before the publish so the redirect and metadata gaps are known in advance, then confirm each item after |
references/go-live-marketing-checklist.md |
The deploy sequence
Every step is ordered. Do not reorder, and do not skip a step because the change
is small.
- Confirm the target and the environment with the operator (rule 2).
- Pull the current state first.
sc theme pull, or query the records you are
about to change. This is your rollback baseline and your evidence that you are
not overwriting someone else's edit. Pulling after you push is worthless.
- Build and validate locally. Compile assets, run the local checks, and read
the diff against the baseline. Remove debug and placeholder content here
(rule 6).
- Check the plan before writing. Every content item under its live-schema limit; every
key resolving to exactly one existing record or to none; the orphan list
itemized and approved (rule 7). On the Salesforce CLI path, do a dry run and
read it.
- Upsert by stable key. Update the existing record for a key, create only
when there is none. A duplicate logical key gives the storefront two competing
definitions.
- Apply dependencies in the currently documented order. Do not publish a
manifest, template, or configuration that references content which has not
been staged and verified.
- Run the supported cache refresh after the complete change has landed. See
Supported cache refresh.
- Wait for propagation. StoreConnect and Salesforce synchronize
asynchronously; wait, re-read and never repeat a write merely because it is
not visible yet. See
storeconnect-platform for the propagation rules.
- Preview and verify (see Verification).
- Get explicit human approval, then publish (rules 3 and 4) through the
current supported workflow. Never construct or replay an approval request.
- Verify the live storefront after the publish, not just the preview.
- Clean up orphans last, with confirmation, once everything above succeeded.
Supported cache refresh
After the complete reviewed change has landed, use the cache-refresh step
provided by the current supported deployment workflow or by the authorized
operator for that environment. Do not name, guess, or write an internal field,
construct a request, or copy a procedure from another store.
A refresh does not replace verification. Explicit fragment caches may follow
their configured expiry, preview and live behavior can differ, and changed
assets still need supported cache-safe naming. If the required refresh is
unavailable or fails, report the deployment as incomplete and stop.
Verification
Never report a deploy complete on the strength of a success message.
- Re-read the changed records, or pull the theme back, and compare content
with what you intended. Record counts match while content is truncated.
- Fetch the affected storefront paths on the target environment and confirm a
specific, unique marker from the change is present — a class name, a string, a
new element. Not "the page loads".
- Check the browser console for missing-resource errors and 404s. A missing
chunked part or a stale manifest entry shows up there and nowhere else.
- If the page is unchanged, allow synchronization to complete, confirm the
supported cache refresh, re-check the resolved template or asset, and verify
that the write landed. Do not re-run the write merely because the result is
not visible yet.
- Exercise what the change touches: affected navigation, forms, add-to-cart,
checkout, and asset loading.
- Confirm no other Store or theme changed.
- Report partial success, outstanding approvals, and anything you could not
verify — explicitly, without customer data.
When a push partially fails
- Stop. Do not continue to dependent content, cache refresh, publish, or
cleanup.
- Report exactly which keys or records succeeded and which failed, with the error
text. A batch write that continues past a bad record makes its per-record
result flags the only record of what landed — read every one.
- Leave the store in the last consistent state you can reach: previous manifest,
no deletes.
- Offer the operator a choice — retry the failed subset, or restore the reviewed
baseline and use the supported refresh workflow. Do not decide silently.
- On the staged path, a push that returned success can still fail asynchronously
inside Salesforce seconds later. Re-read the content change after a pause
before reporting completion.
Rollback on every path restores the baseline pulled in step 2 and then follows
the supported refresh and verification workflow. If you did not pull a baseline,
you have no rollback — which is why step 2 is not optional.
Deploy-time cost
- Batch supported writes. Keep coherent changes together without widening
the target or bypassing the reviewed workflow.
- Do not re-push unchanged files. Fingerprint each source file locally and
push only what moved. A one-line snippet edit should be one record write, not a
full theme sync.
- Refresh once after the coherent change. Do not run refresh steps after
every individual record write.
- Prefer one draft over several. A theme change and the content that depends on
it belong in one draft, one preview, and one approval.
Related skills
storeconnect-platform — connecting to a store, confirming scope, and choosing
which skill to load. Read it first if the store is not yet connected.
storeconnect-theme-development — what you are deploying: the override model,
template keys, theme-supplement.css, style blocks, and block templates.
storeconnect-salesforce-data — records not covered by the supported staged
tooling.
storeconnect-apex-integration — Apex and Salesforce metadata deployments.
storeconnect-theme-review — read-only audit to run before a go-live publish.
1---2name: storeconnect-sync-deploy3description: Safely deploy changes to a StoreConnect store with connected StoreConnect tools, storeconnect-cli, or an explicitly approved Salesforce workflow. Covers target confirmation, rollback baselines, validation, preview, human approval, supported cache refresh, verification, and cleanup. Load before pushing or publishing any theme file, CSS, content block, translation, or store configuration, and before taking a store live.4---56<!-- Generated from shared/skills. Do not edit this copy. -->78# StoreConnect sync and deploy910Getting a change from a local tree or an agent session onto a StoreConnect store,11in the right order, with a preview a human approved and a verified result on the12live storefront.1314Ordering is the substance of this skill. Most failed deployments are the right15content applied to the wrong target, without a rollback, or reported complete16before preview, approval, synchronization, and live verification finish.1718## Non-negotiable rules1920Read these before any write. They apply on every path.21221. **Never deploy or publish directly to production.** Land the change on a23 non-live theme or a draft, verify it in a preview, and only then apply or24 approve it for the live store.252. **Confirm the target before any push.** Salesforce org and alias, environment26 (development / staging / production), Store name and domain, theme name and Id.27 Resolve each with a read operation and show the operator what you resolved. If28 you cannot state which environment you are about to write to, stop.293. **Human approval is a hard gate before publishing to a live store.** Publishing30 is a separate action from pushing, requested separately and approved31 explicitly. Never infer approval from an earlier "go ahead" that covered the32 edit, and never fabricate or reconstruct approval.334. **Never publish without verifying the preview first.** Open the preview, look34 at the affected pages, check the browser console. A publish with no preview35 verification is the failure this skill exists to prevent.365. **Use the current supported cache-refresh workflow.** If an authorized37 operator cannot provide a documented procedure for the chosen deployment38 path, stop and hand off rather than reproducing a mechanism from an old39 example or another store.406. **Never push test, debug, or placeholder content to production.** Strip41 `{% debug %}` and `{% timer %}` tags, console logging, commented-out42 experiments, and lorem or placeholder copy before a production push. Never43 point a production store at a test payment gateway, a staging endpoint, or a44 development asset host.457. **Destructive cleanup needs an explicit, itemized confirmation.** Never46 auto-delete. Produce the list of records to remove, cap it, and stop if the47 count is larger than expected — a big delete list is nearly always a48 key-mapping bug, not intentional cleanup.498. **Scope every read and write by Store and theme.** One store, one theme. After50 the deploy, confirm no other Store or theme changed.519. **Never put a credential in a command line, a repository file, or chat**, and52 never interpolate Liquid, HTML, CSS, JSON, or translated copy into a shell53 command or a SOQL string — serialize it to a file. Never log customer data.5410. **Do not mix deployment paths in one change.** A staged draft plus a direct55 Salesforce write on the same records race each other, and the direct write is56 invisible to the approver reviewing the draft.5758## Choose the path5960Work down this list and stop at the first row that fits. Lower rows have a larger61blast radius and fewer safety rails.6263| # | Condition | Path |64|---|---|---|65| 1 | Connected StoreConnect tools are present and cover the records you need to change | The supported staged and review-backed workflow. **Default.** |66| 2 | Theme `.liquid` templates, working from a local checkout, no connected StoreConnect tools | The currently documented `storeconnect-cli` (`sc`) theme workflow |67| 3 | The supported staged paths do not cover the required change | A current, documented Salesforce workflow supplied by an authorized operator. Treat it as immediate-write and require a reviewed plan, dry-run where available, preview procedure, and explicit approval |68| 4 | Apex, triggers, custom objects, fields, or other Salesforce metadata | `sf project deploy` with an appropriate test level. See `storeconnect-apex-integration` |6970If rows 1 and 2 both fit, take row 1 so related supported changes can stay in one71reviewed change set.7273If you are reaching for row 3, say out loud why rows 1 and 2 cannot carry the74change before you start. "It is faster" is not a reason.7576## Which reference to read7778| Situation | Read |79|---|---|80| Pushing theme files through `sc`, or driving the staged draft → preview → publish pipeline directly. Also read this before your **first** publish on any store: "publish" does not mean live, and knowing that changes what you tell the operator | [references/cli-and-staged-pipeline.md](references/cli-and-staged-pipeline.md) |81| Considering a direct Salesforce theme write because the staged workflows do not cover the change — approval boundary, rollback, live-schema planning, safe apply/delete behavior, supported cache refresh, and partial-failure handling | [references/theme-pull-push.md](references/theme-pull-push.md) |82| A domain cutover, or the first production publish of a new or replaced storefront. Work through it **before** the publish so the redirect and metadata gaps are known in advance, then confirm each item after | [references/go-live-marketing-checklist.md](references/go-live-marketing-checklist.md) |8384## The deploy sequence8586Every step is ordered. Do not reorder, and do not skip a step because the change87is small.88891. **Confirm the target and the environment** with the operator (rule 2).902. **Pull the current state first.** `sc theme pull`, or query the records you are91 about to change. This is your rollback baseline and your evidence that you are92 not overwriting someone else's edit. Pulling after you push is worthless.933. **Build and validate locally.** Compile assets, run the local checks, and read94 the diff against the baseline. Remove debug and placeholder content here95 (rule 6).964. **Check the plan before writing.** Every content item under its live-schema limit; every97 key resolving to exactly one existing record or to none; the orphan list98 itemized and approved (rule 7). On the Salesforce CLI path, do a dry run and99 read it.1005. **Upsert by stable key.** Update the existing record for a key, create only101 when there is none. A duplicate logical key gives the storefront two competing102 definitions.1036. **Apply dependencies in the currently documented order.** Do not publish a104 manifest, template, or configuration that references content which has not105 been staged and verified.1067. **Run the supported cache refresh** after the complete change has landed. See107 [Supported cache refresh](#supported-cache-refresh).1088. **Wait for propagation.** StoreConnect and Salesforce synchronize109 asynchronously; wait, re-read and never repeat a write merely because it is110 not visible yet. See `storeconnect-platform` for the propagation rules.1119. **Preview and verify** (see [Verification](#verification)).11210. **Get explicit human approval, then publish** (rules 3 and 4) through the113 current supported workflow. Never construct or replay an approval request.11411. **Verify the live storefront** after the publish, not just the preview.11512. **Clean up orphans last**, with confirmation, once everything above succeeded.116117## Supported cache refresh118119After the complete reviewed change has landed, use the cache-refresh step120provided by the current supported deployment workflow or by the authorized121operator for that environment. Do not name, guess, or write an internal field,122construct a request, or copy a procedure from another store.123124A refresh does not replace verification. Explicit fragment caches may follow125their configured expiry, preview and live behavior can differ, and changed126assets still need supported cache-safe naming. If the required refresh is127unavailable or fails, report the deployment as incomplete and stop.128129## Verification130131Never report a deploy complete on the strength of a success message.1321331. Re-read the changed records, or pull the theme back, and compare **content**134 with what you intended. Record counts match while content is truncated.1352. Fetch the affected storefront paths on the target environment and confirm a136 specific, unique marker from the change is present — a class name, a string, a137 new element. Not "the page loads".1383. Check the browser console for missing-resource errors and 404s. A missing139 chunked part or a stale manifest entry shows up there and nowhere else.1404. If the page is unchanged, allow synchronization to complete, confirm the141 supported cache refresh, re-check the resolved template or asset, and verify142 that the write landed. Do not re-run the write merely because the result is143 not visible yet.1445. Exercise what the change touches: affected navigation, forms, add-to-cart,145 checkout, and asset loading.1466. Confirm no other Store or theme changed.1477. Report partial success, outstanding approvals, and anything you could not148 verify — explicitly, without customer data.149150## When a push partially fails1511521. **Stop.** Do not continue to dependent content, cache refresh, publish, or153 cleanup.1542. Report exactly which keys or records succeeded and which failed, with the error155 text. A batch write that continues past a bad record makes its per-record156 result flags the only record of what landed — read every one.1573. Leave the store in the last consistent state you can reach: previous manifest,158 no deletes.1594. Offer the operator a choice — retry the failed subset, or restore the reviewed160 baseline and use the supported refresh workflow. Do not decide silently.1615. On the staged path, a push that returned success can still fail asynchronously162 inside Salesforce seconds later. Re-read the content change after a pause163 before reporting completion.164165Rollback on every path restores the baseline pulled in step 2 and then follows166the supported refresh and verification workflow. If you did not pull a baseline,167you have no rollback — which is why step 2 is not optional.168169## Deploy-time cost170171- **Batch supported writes.** Keep coherent changes together without widening172 the target or bypassing the reviewed workflow.173- **Do not re-push unchanged files.** Fingerprint each source file locally and174 push only what moved. A one-line snippet edit should be one record write, not a175 full theme sync.176- **Refresh once after the coherent change.** Do not run refresh steps after177 every individual record write.178- **Prefer one draft over several.** A theme change and the content that depends on179 it belong in one draft, one preview, and one approval.180181## Related skills182183- `storeconnect-platform` — connecting to a store, confirming scope, and choosing184 which skill to load. Read it first if the store is not yet connected.185- `storeconnect-theme-development` — what you are deploying: the override model,186 template keys, `theme-supplement.css`, style blocks, and block templates.187- `storeconnect-salesforce-data` — records not covered by the supported staged188 tooling.189- `storeconnect-apex-integration` — Apex and Salesforce metadata deployments.190- `storeconnect-theme-review` — read-only audit to run before a go-live publish.