> 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

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
