Fix a rule that failed to sync with Shopify
If a ShipWith Shopify sync fails, your stored shipping rules are not deleted. Saving a rule stores it in ShipWith, then synchronizes the active rules for that Function input with Shopify.
Until synchronization succeeds, checkout keeps using the last configuration that Shopify received for that Function input. If that input has never synchronized successfully, ShipWith does not change checkout behavior for it.
Check the sync status
Open the rule and find Shopify sync. The status applies to all active rules that use the same Function input.
- Pending: ShipWith is preparing or sending the configuration. Wait before testing checkout.
- Synced: Shopify received the current configuration. The Last synced time shows when the latest successful sync finished.
- Failed: Shopify did not receive the current configuration. Read the error shown in the Shopify sync section before retrying.
- Not synced: There is no active Shopify delivery customization for this Function input. This is expected when the input has no active rules, but an active rule with this status is not ready to test.
Read the last error and retry
The critical banner in Shopify sync shows the last sync error. Use its message to identify what must change. The errors below are known causes, but they are not every possible cause of a failed sync.
After fixing the reported problem:
- Select Save.
- Find Shopify sync.
- If the status is still Failed or Not synced, select Retry sync.
- Wait for Status to become Synced before testing checkout.
Retry sync synchronizes all active rules for the store, grouped by Function input. It does not discard the rule or its settings.
Fix a configuration larger than 10,000 bytes
Shopify Functions cannot use a configuration or input variables metafield larger than 10,000 bytes. ShipWith checks both values and stops the sync instead of sending a configuration that Shopify would ignore.
To reduce the size:
- Look for rules with long City, Province code, or ZIP/postal code lists.
- Remove duplicate or unnecessary values.
- Where the same condition has many alternatives, use one is one of condition with one value per line instead of many separate conditions or rules.
- If the conditions are available on another Function input, you can split independent rules across inputs. Do this only when each input supports every condition used by its rule.
Do not move rules between Function inputs merely to reduce size. Different inputs support different conditions, and Shopify does not guarantee priority order across inputs.
Fix multiple attribute keys in one Function input
For each Function input, Shopify's Function query can read:
- one cart attribute key; and
- one cart-line attribute key.
Sync fails when active rules in the same Function input require more than one cart attribute key or more than one cart-line attribute key. Cart attributes and cart-line attributes have separate one-key limits.
Open the active rules that use the affected Function input and compare their attribute conditions. Then either:
- change those conditions to use one shared key;
- make rules that use the extra key inactive; or
- move an independent rule to another Function input only if that input supports all of the rule's conditions.
What happens at checkout after a failure
The saved rule remains in ShipWith, including the changes that could not sync. Checkout does not use those changes yet.
- If this Function input synced before, checkout keeps its previously synced behavior.
- If this Function input has never synced, checkout keeps the behavior it had without that ShipWith Function input.
- Checkout starts using the corrected configuration only after Shopify sync shows Synced.
After a successful retry, test both a matching and non-matching checkout. Check every delivery group that the rule could affect.
For the complete procedure, see Test your shipping rules at checkout.
