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-deploy-23description: 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# StoreConnect sync and deploy78Getting a change from a local tree or an agent session onto a StoreConnect store,9in the right order, with a preview a human approved and a verified result on the10live storefront.1112Ordering is the substance of this skill. Most failed deployments are the right13content applied to the wrong target, without a rollback, or reported complete14before preview, approval, synchronization, and live verification finish.1516## Non-negotiable rules1718Read these before any write. They apply on every path.19201. **Never deploy or publish directly to production.** Land the change on a21 non-live theme or a draft, verify it in a preview, and only then apply or22 approve it for the live store.232. **Confirm the target before any push.** Salesforce org and alias, environment24 (development / staging / production), Store name and domain, theme name and Id.25 Resolve each with a read operation and show the operator what you resolved. If26 you cannot state which environment you are about to write to, stop.273. **Human approval is a hard gate before publishing to a live store.** Publishing28 is a separate action from pushing, requested separately and approved29 explicitly. Never infer approval from an earlier "go ahead" that covered the30 edit, and never fabricate or reconstruct approval.314. **Never publish without verifying the preview first.** Open the preview, look32 at the affected pages, check the browser console. A publish with no preview33 verification is the failure this skill exists to prevent.345. **Use the current supported cache-refresh workflow.** If an authorized35 operator cannot provide a documented procedure for the chosen deployment36 path, stop and hand off rather than reproducing a mechanism from an old37 example or another store.386. **Never push test, debug, or placeholder content to production.** Strip39 `{% debug %}` and `{% timer %}` tags, console logging, commented-out40 experiments, and lorem or placeholder copy before a production push. Never41 point a production store at a test payment gateway, a staging endpoint, or a42 development asset host.437. **Destructive cleanup needs an explicit, itemized confirmation.** Never44 auto-delete. Produce the list of records to remove, cap it, and stop if the45 count is larger than expected — a big delete list is nearly always a46 key-mapping bug, not intentional cleanup.478. **Scope every read and write by Store and theme.** One store, one theme. After48 the deploy, confirm no other Store or theme changed.499. **Never put a credential in a command line, a repository file, or chat**, and50 never interpolate Liquid, HTML, CSS, JSON, or translated copy into a shell51 command or a SOQL string — serialize it to a file. Never log customer data.5210. **Do not mix deployment paths in one change.** A staged draft plus a direct53 Salesforce write on the same records race each other, and the direct write is54 invisible to the approver reviewing the draft.5556## Choose the path5758Work down this list and stop at the first row that fits. Lower rows have a larger59blast radius and fewer safety rails.6061| # | Condition | Path |62|---|---|---|63| 1 | Connected StoreConnect tools are present and cover the records you need to change | The supported staged and review-backed workflow. **Default.** |64| 2 | Theme `.liquid` templates, working from a local checkout, no connected StoreConnect tools | The currently documented `storeconnect-cli` (`sc`) theme workflow |65| 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 |66| 4 | Apex, triggers, custom objects, fields, or other Salesforce metadata | `sf project deploy` with an appropriate test level. See `storeconnect-apex-integration` |6768If rows 1 and 2 both fit, take row 1 so related supported changes can stay in one69reviewed change set.7071If you are reaching for row 3, say out loud why rows 1 and 2 cannot carry the72change before you start. "It is faster" is not a reason.7374## Which reference to read7576| Situation | Read |77|---|---|78| 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) |79| 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) |80| 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) |8182## The deploy sequence8384Every step is ordered. Do not reorder, and do not skip a step because the change85is small.86871. **Confirm the target and the environment** with the operator (rule 2).882. **Pull the current state first.** `sc theme pull`, or query the records you are89 about to change. This is your rollback baseline and your evidence that you are90 not overwriting someone else's edit. Pulling after you push is worthless.913. **Build and validate locally.** Compile assets, run the local checks, and read92 the diff against the baseline. Remove debug and placeholder content here93 (rule 6).944. **Check the plan before writing.** Every content item under its live-schema limit; every95 key resolving to exactly one existing record or to none; the orphan list96 itemized and approved (rule 7). On the Salesforce CLI path, do a dry run and97 read it.985. **Upsert by stable key.** Update the existing record for a key, create only99 when there is none. A duplicate logical key gives the storefront two competing100 definitions.1016. **Apply dependencies in the currently documented order.** Do not publish a102 manifest, template, or configuration that references content which has not103 been staged and verified.1047. **Run the supported cache refresh** after the complete change has landed. See105 [Supported cache refresh](#supported-cache-refresh).1068. **Wait for propagation.** StoreConnect and Salesforce synchronize107 asynchronously; wait, re-read and never repeat a write merely because it is108 not visible yet. See `storeconnect-platform` for the propagation rules.1099. **Preview and verify** (see [Verification](#verification)).11010. **Get explicit human approval, then publish** (rules 3 and 4) through the111 current supported workflow. Never construct or replay an approval request.11211. **Verify the live storefront** after the publish, not just the preview.11312. **Clean up orphans last**, with confirmation, once everything above succeeded.114115## Supported cache refresh116117After the complete reviewed change has landed, use the cache-refresh step118provided by the current supported deployment workflow or by the authorized119operator for that environment. Do not name, guess, or write an internal field,120construct a request, or copy a procedure from another store.121122A refresh does not replace verification. Explicit fragment caches may follow123their configured expiry, preview and live behavior can differ, and changed124assets still need supported cache-safe naming. If the required refresh is125unavailable or fails, report the deployment as incomplete and stop.126127## Verification128129Never report a deploy complete on the strength of a success message.1301311. Re-read the changed records, or pull the theme back, and compare **content**132 with what you intended. Record counts match while content is truncated.1332. Fetch the affected storefront paths on the target environment and confirm a134 specific, unique marker from the change is present — a class name, a string, a135 new element. Not "the page loads".1363. Check the browser console for missing-resource errors and 404s. A missing137 chunked part or a stale manifest entry shows up there and nowhere else.1384. If the page is unchanged, allow synchronization to complete, confirm the139 supported cache refresh, re-check the resolved template or asset, and verify140 that the write landed. Do not re-run the write merely because the result is141 not visible yet.1425. Exercise what the change touches: affected navigation, forms, add-to-cart,143 checkout, and asset loading.1446. Confirm no other Store or theme changed.1457. Report partial success, outstanding approvals, and anything you could not146 verify — explicitly, without customer data.147148## When a push partially fails1491501. **Stop.** Do not continue to dependent content, cache refresh, publish, or151 cleanup.1522. Report exactly which keys or records succeeded and which failed, with the error153 text. A batch write that continues past a bad record makes its per-record154 result flags the only record of what landed — read every one.1553. Leave the store in the last consistent state you can reach: previous manifest,156 no deletes.1574. Offer the operator a choice — retry the failed subset, or restore the reviewed158 baseline and use the supported refresh workflow. Do not decide silently.1595. On the staged path, a push that returned success can still fail asynchronously160 inside Salesforce seconds later. Re-read the content change after a pause161 before reporting completion.162163Rollback on every path restores the baseline pulled in step 2 and then follows164the supported refresh and verification workflow. If you did not pull a baseline,165you have no rollback — which is why step 2 is not optional.166167## Deploy-time cost168169- **Batch supported writes.** Keep coherent changes together without widening170 the target or bypassing the reviewed workflow.171- **Do not re-push unchanged files.** Fingerprint each source file locally and172 push only what moved. A one-line snippet edit should be one record write, not a173 full theme sync.174- **Refresh once after the coherent change.** Do not run refresh steps after175 every individual record write.176- **Prefer one draft over several.** A theme change and the content that depends on177 it belong in one draft, one preview, and one approval.178179## Related skills180181- `storeconnect-platform` — connecting to a store, confirming scope, and choosing182 which skill to load. Read it first if the store is not yet connected.183- `storeconnect-theme-development` — what you are deploying: the override model,184 template keys, `theme-supplement.css`, style blocks, and block templates.185- `storeconnect-salesforce-data` — records not covered by the supported staged186 tooling.187- `storeconnect-apex-integration` — Apex and Salesforce metadata deployments.188- `storeconnect-theme-review` — read-only audit to run before a go-live publish.