In this section, we will talk about the “Customer” related actions. UChat support below customer related actions:
Search for Customers
Get customer information
Get customer orders
Get customer abandoned checkout
Now, let’s go over these actions one by one.
Search For Customers
This action is used for looking up customer details using various query parameters such a customer id, email, phone no etc.
Input
...
...
Response Payload
{ "customers": [ { "id": 5969354489922, "email": null, "first_name": null, "last_name": "Siddiqui", "orders_count": 18, "last_order_id": 4862680858690, "phone": "+923032320964" }, { "id": 554979819586, "email": "matthew6688@gmail.com", "first_name": "Matthew", "last_name": "Miao", "orders_count": 14, "last_order_id": 4862144217154, "phone": null }, { "id": 5969349214274, "email": "hammadsiddiqui788@gmail.com", "first_name": "Test", "last_name": "test", "orders_count": 1, "last_order_id": 4861820502082, "phone": null } ] } |
Get Customer Info
This action is used to bring up information for a particular customer using their customer ID
Input
...
Response Payload
{ "customer": { "id": 5969349214274, "email": "hammadsiddiqui788@gmail.com", "first_name": "Test", "last_name": "test", "orders_count": 1, "last_order_id": 4861820502082, "phone": null } } |
Get Customer Orders
This action is used to bring up orders and their details of a particular customer using customer ID and other query parameters.
Input
...
Response Payload
{ "orders": [ { "id": 4861820502082, "cancelled_at": null, "closed_at": null, "confirmed": true, "contact_email": "hammadsiddiqui788@gmail.com", "created_at": "2023-03-27T18:03:31-04:00", "currency": "AUD", "email": "hammadsiddiqui788@gmail.com", "financial_status": "pending", "fulfillment_status": null, "name": "#1036", "number": 36, "order_number": 1036, "order_status_url": "Thank you Test! - CONNECTDOTS DEMO STORE - Checkout ", "phone": null, "processed_at": "2023-03-27T18:03:30-04:00", "reference": "019761d686838bd5f9056c44b791e4ac", "subtotal_price": "24.87", "tax_lines": [...], // 0 items "total_discounts": "0.00", "total_line_items_price": "24.87", "total_price": "44.87", "updated_at": "2023-03-27T18:03:32-04:00" } ] } |
Get Customer Abandoned Checkouts
This action is used to bring up the abandoned checkouts of a particular customer using their customer Id
Input
...
Response Payload
{ "checkouts": [ { "id": 28111582265410, "token": "d93e09414106f10844c62eba29f54d05", "cart_token": "49c342195618f0d5a0625666ebe5e3ff", "email": "matthew6688@gmail.com", "gateway": "bogus", "buyer_accepts_marketing": false, "created_at": "2022-08-28T18:52:57-04:00", "updated_at": "2022-08-29T08:21:33-04:00", "landing_site": "/", "note": null, "note_attributes": [...], // 0 items "referring_site": "", "shipping_lines": [...], // 1 items "taxes_included": false, "total_weight": 0, "currency": "AUD", "completed_at": "2022-08-29T08:21:30-04:00", "closed_at": null, "user_id": null, "location_id": null, "source_identifier": null, "source_url": null, "device_id": null, "phone": null, "customer_locale": "en-AU", "line_items": [...], // 3 items "name": "#28111582265410", "source": null, "abandoned_checkout_url": "Thank you! - CONNECTDOTS DEMO STORE - Checkout ", "discount_codes": [...], // 0 items "tax_lines": [...], // 0 items "source_name": "web", "presentment_currency": "AUD", "buyer_accepts_sms_marketing": false, "sms_marketing_phone": null, "total_discounts": "0.00", "total_line_items_price": "180.45", "total_price": "190.45", "total_tax": "0.00", "subtotal_price": "180.45", "total_duties": null, "billing_address": {...}, // 15 keys "shipping_address": {...}, // 15 keys "customer": {...} // 25 keys } ] } |