# Set custom order referer

This method allows you to dynamically declare the `ec.order.referer_id` variable through the JavaScript code to set the order referer.

Code example:

```javascript
ec.order = ec.order || {};
ec.order.referer_id = 'Amazon'
```

The field appears in exported order CSVs, invoices, email notifications, and REST API as `refererId` field.


---

# Agent Instructions: 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:

```
GET https://docs.ecwid.com/storefronts/manage-cart-and-checkout/set-custom-order-referer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
