> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/shopify/shopify-native/integration/shipping-address-update.md).

# Shipping Address Update

Capture post-purchase shipping address changes in Shopify and sync them to ESW.

Sync shipping address changes between Shopify and ESW.

Use Shopify order update webhooks to detect changes.

Then push the new address to ESW for the same order.

### Prerequisites

* You have an integration service that can receive Shopify webhooks.
* You can call the Shopify Admin API (REST/GraphQL).
* You can call the ESW order update endpoint for contact details.
* You’ve defined when address changes are allowed.
  * Example: only before fulfillment is created.

{% hint style="info" %}
Treat Shopify webhooks as at-least-once delivery.
{% endhint %}

### Webhook-driven address update flow

{% stepper %}
{% step %}

### Subscribe to `orders/updated`

Use `orders/updated` to catch post-purchase changes.

#### Shopify docs <i class="fa-webhook" style="color:$primary;">:webhook:</i> [orders/updated](https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook#event-topics-orders-updated).

{% endstep %}

{% step %}

### Receive and validate the webhook

When the webhook fires:

* Validate the Shopify HMAC signature.
* Deduplicate on webhook id / event id.
* Re-fetch the order if you need full, current data.
  {% endstep %}

{% step %}

### Detect a shipping address change

`orders/updated` fires for many order edits.

Filter for shipping address deltas.

Compare these fields at minimum:

* Name
* Address lines
* City
* Region / state
* Postal code
* Country code
* Phone (if you sync it to ESW)
  {% endstep %}

{% step %}

### Map to ESW contact details

Transform the Shopify shipping address into the ESW format.

Send the order identifier ESW expects.

Keep a stable mapping between:

* Shopify order id / name
* ESW order reference
  {% endstep %}

{% step %}

### Update ESW

Call the ESW **Update Contact Details** API for the order.

Recommended behavior:

* Retry transient failures.
* Stop retrying once the order is no longer editable in ESW.
* Log ESW responses for traceability.
  {% endstep %}

{% step %}

### Monitor and reconcile

Alert on failures and repeated retries.

Add a daily job to reconcile recent orders if needed.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/shopify/shopify-native/integration/shipping-address-update.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
