Add a custom field in admin order

Solved
EmiliaSC
Shopify Partner
6 1 2

Hello world!

I am trying to add a custom field in the admin order page which will hold an external url.

Here's a screenshot where a shop has this kind of field installed through an application (Additional details -> xconnector-invoice-url).

WhatsApp Image 2021-10-18 at 11.18.45.jpeg

 

 

 

 

 

 

 

 

 

 

 

 

I need to do the same for a shop using my custom app.

While researching i found that a metafield would be what i need, so i created the metafield for an order, i can see the meta if i access /admin/orders/{order_id}/metafields.xml, however there is no actual field showing in the order page on admin.

What i need is to see the field in the order admin page like in the screenshot, but i can't find a way to modify the admin theme.

Is that possible? Maybe is not a metafield what i need?

Accepted Solution (1)
EmiliaSC
Shopify Partner
6 1 2

This is an accepted solution.

The Order resource has a field called note_attributes

i pushed into the Order resource something like

 

"note_attributes": [
{
"name": "invoice-url",
"value": "https://myinvoiceurl"
}

 

View solution in original post

Replies 5 (5)
EmiliaSC
Shopify Partner
6 1 2

Can someone provide assistance?

Thanks!

EmiliaSC
Shopify Partner
6 1 2

Nevermind, i figured it out.

Thank you, community...

Msimons
Shopify Partner
3 0 0

Were you able to get the metafield to show in the admin orders, and if so how?

I'm looking to record which sales channel each order came into our shopify store from, then pass this along to NetSuite (retail, wholesale, etc.)

Thanks!

EddieLuong
Shopify Partner
39 1 16

Hi @EmiliaSC 

I see you resolved your problem.

I'm new in Shopify development, I also need to customize the Admin order page with adding some fields. Could you help to share how did you add and show a custom field in admin order?

Thanks

EmiliaSC
Shopify Partner
6 1 2

This is an accepted solution.

The Order resource has a field called note_attributes

i pushed into the Order resource something like

 

"note_attributes": [
{
"name": "invoice-url",
"value": "https://myinvoiceurl"
}