What Shopify Customer Data Does Admin Shortcuts Send With Button Clicks?
A reference for the Shopify customer data payload Admin Shortcuts sends to your webhook with each button click.
The Admin Shortcuts app sends a webhook every time a button is clicked from one of your admin pages in Shopify. For buttons configured to show up on customer detail pages, the app will send the full JSON object for the customer, in addition to some extra information about the button and any key-value pairs added in the button configuration.
When testing your webhook, the app will send sample customer data from a Shopify test store. When triggering a button from an actual customer page in your app, we'll send the customer order data.
Here's what the sample data looks like:
{ "admin_button_context": { "button_id": "9", "button_name": "Send to #issues Slack Channel", "admin_page_type": "Customer Detail" }, "admin_button_custom_attributes": { "issue_type": "customer" }, "shopify_customer": { "admin_button_context": { "button_id": "9", "button_name": "Send to #issues Slack Channel", "admin_page_type": "Customer Detail" }, "admin_button_custom_attributes": { "issue_type": "order" }, "shopify_customer": { "id": xxxxxxxxxxxxx, "email": "ayumu.hirano-jones@example.com", "created_at": "2024-02-21T18:10:31-05:00", "updated_at": "2024-05-22T17:02:03-04:00", "first_name": "Ayumu", "last_name": "Hirano-Jones", "orders_count": 1, "state": "disabled", "total_spent": "99.78", "last_order_id": 5081642565676, "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "tags": "", "last_order_name": "#1002", "currency": "USD", "phone": "+17085551212", "addresses": [ { "id": xxxxxxxxxxxxx, "customer_id": xxxxxxxxxxxxx, "first_name": "Ayumu", "last_name": "Hirano-Jones", "company": null, "address1": "1000 Main Street", "address2": "", "city": "Evanston", "province": "Illinois", "country": "United States", "zip": "60202", "phone": "+17085551212", "name": "Ayumu Hirano-Jones", "province_code": "IL", "country_code": "US", "country_name": "United States", "default": true } ], "accepts_marketing": false, "accepts_marketing_updated_at": null, "marketing_opt_in_level": "single_opt_in", "tax_exemptions": [], "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": "single_opt_in", "consent_updated_at": null }, "sms_marketing_consent": { "state": "not_subscribed", "opt_in_level": "single_opt_in", "consent_updated_at": null, "consent_collected_from": "SHOPIFY" }, "admin_graphql_api_id": "gid://shopify/Customer/xxxxxxxxxxxxx", "default_address": { "id": xxxxxxxxxxxxx, "customer_id": xxxxxxxxxxxxx, "first_name": "Ayumu", "last_name": "Hirano-Jones", "company": null, "address1": "1000 Main Street", "address2": "", "city": "Evanston", "province": "Illinois", "country": "United States", "zip": "60202", "phone": "+17085551212", "name": "Ayumu Hirano-Jones", "province_code": "IL", "country_code": "US", "country_name": "United States", "default": true } } }}