createCustomerKhách hàng
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo đối tượng Company
để nhận dạng duy nhất một công ty (khách hàng) cho quy trình đăng ký Knox hoặc đăng ký không tiếp xúc. Sau khi phương thức trả về thành công, chủ sở hữu (primary_emails
) hoặc quản trị viên (secondary_emails
) được chỉ định có thể liên kết địa chỉ email của họ với một Tài khoản Google để truy cập vào cổng khách hàng không tiếp xúc (để biết thông tin chi tiết, hãy xem phần Đăng ký không tiếp xúc cho quản trị viên CNTT) hoặc Tài khoản Samsung để truy cập vào cổng Knox Mobile Enrollment (KME).
Chữ ký phương thức
public CreateCustomerResponse createCustomer(CreateCustomerRequest request) throws CommonException;
CreateCustomerRequest
Tên tài sản |
Giá trị |
Bắt buộc |
Mô tả |
customer_name |
string |
Có |
Tên của công ty. Ví dụ: Công ty XYZ. Hiển thị cho nhân viên của công ty trong cổng đăng ký không tiếp xúc. |
primary_emails |
Danh sách object(string) |
Có |
Không cần tiếp xúc: Địa chỉ email của người dùng trong vai trò chủ sở hữu của khách hàng. Phải nhập ít nhất một địa chỉ email. Mỗi địa chỉ email phải được liên kết với một Tài khoản Google. Chủ sở hữu có cùng quyền truy cập như quản trị viên, nhưng cũng có thể thêm, xoá và chỉnh sửa người dùng cổng thông tin của tổ chức.
Samsung: Địa chỉ email của quản trị viên cấp cao của khách hàng. Samsung chỉ lấy email đầu tiên trong danh sách. Địa chỉ email phải được liên kết với một Tài khoản Samsung. |
secondary_emails |
Danh sách object(string) |
Không |
Địa chỉ email của người dùng khách hàng có vai trò quản trị. Mỗi địa chỉ email phải được liên kết với một Tài khoản Google. Lưu ý: Samsung không hỗ trợ thuộc tính này. |
vendorParams |
map |
Thiết lập tự động: Không
Samsung: Có |
Các trường bổ sung, cặp khoá-giá trị do nhà cung cấp chỉ định. Các yêu cầu từ lớp SamsungResellerService phải chỉ định:
"country": Mã quốc gia ISO 3166-1 của khách hàng, ví dụ: "US".
"firstName": tên của khách hàng (tối đa 60 ký tự).
"lastName": họ của khách hàng (tối đa 60 ký tự).
"service": "KME" là giá trị duy nhất được hỗ trợ. |
CreateCustomerResponse
Tên tài sản |
Giá trị |
Mô tả |
customer |
object( Company ) |
Đối tượng chứa thông tin chi tiết về khách hàng mới tạo. |
vendor_params |
map |
Các trường bổ sung, cặp khoá-giá trị do nhà cung cấp chỉ định (chỉ dành cho Samsung). |
Hành vi lỗi
Nếu xảy ra lỗi, thư viện sẽ gửi một CommonException
chứa một trong các mã lỗi sau:
CommonException
Mã lỗi |
INTERNAL_SERVER_ERROR |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eThis process creates a \u003ccode\u003eCompany\u003c/code\u003e object to uniquely identify a customer for Knox or zero-touch enrollment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecustomer_name\u003c/code\u003e, \u003ccode\u003eprimary_emails\u003c/code\u003e, and \u003ccode\u003evendorParams\u003c/code\u003e are required parameters for creating a customer, and \u003ccode\u003esecondary_emails\u003c/code\u003e is optional.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eprimary_emails\u003c/code\u003e are email addresses for owners (for zero-touch) or super admins (for Samsung), who can access the zero-touch or Knox Mobile Enrollment portal, and must be associated with a Google Account or Samsung Account, respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esecondary_emails\u003c/code\u003e represent admin users for zero-touch enrollment, must be associated with a Google Account, and are not supported by Samsung.\u003c/p\u003e\n"],["\u003cp\u003eThe method throws a \u003ccode\u003eCommonException\u003c/code\u003e with an \u003ccode\u003eINTERNAL_SERVER_ERROR\u003c/code\u003e if an issue occurs during customer creation.\u003c/p\u003e\n"]]],["This document outlines how to create a `Company` object to identify a customer for Knox or zero-touch enrollment. The `createCustomer` method requires a company name and a list of primary email addresses (owners/super admins). Secondary email addresses (admins) are optional for zero-touch. Samsung requests also need `vendorParams`, specifying country, first name, last name, and \"KME\" service. Successful creation returns a `Company` object, allowing associated emails access to the zero-touch or KME portal. Errors result in a `CommonException`.\n"],null,["# createCustomer\n\nCreates a [`Company`](/zero-touch/reseller-library/reference/objects#company)\nobject to uniquely identify a company (customer) for Knox or zero-touch\nenrollment. After the method returns successfully, the specified owners (`primary_emails`)\nor admins (`secondary_emails`) can associate their email addresses with a Google\nAccount to access the [zero touch customer portal](https://enterprise.google.com/android/zero-touch/customers)\n(for details, see [Zero-touch enrollment for IT admins](https://support.google.com/work/android/answer/7514005))\nor a Samsung Account to access the Knox Mobile Enrollment (KME) portal.\n\nMethod signature\n----------------\n\n public CreateCustomerResponse createCustomer(CreateCustomerRequest request) throws CommonException;\n\nCreateCustomerRequest\n---------------------\n\n| Property name | Value | Required | Description |\n|--------------------|--------------------------|-------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer_name` | `string` | Yes | The name of the company. For example XYZ Corp. Displayed to the company's employees in the zero-touch enrollment portal. |\n| `primary_emails` | List of `object(string)` | Yes | **Zero-touch:** Email address of customer's users in the owner role. At least one email address is required. Each email address must be associated with a Google Account. Owners share the same access as admins but can also add, delete, and edit your organization's portal users. **Samsung:** Email address of customer's super admin. Samsung only takes the first email in the list. Email address must be associated with a Samsung Account. |\n| `secondary_emails` | List of `object(string)` | No | Email address of customer's users in the admin role. Each email address must be associated with a Google Account. **Note:** This property is not supported by Samsung. |\n| `vendorParams` | `map` | **Zero-touch:** No **Samsung:** Yes | Extra fields, vendor specified key-value pair. Requests from the `SamsungResellerService` class must specify: \"country\": [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the customer, for example \"US\". \"firstName\": first name of the customer (max. 60 characters). \"lastName\": last name of the customer (max. 60 characters). \"service\": \"KME\" is the only supported value. |\n\nCreateCustomerResponse\n----------------------\n\n| Property name | Value | Description |\n|-----------------|---------------------------------------------------------------------------------|---------------------------------------------------------------|\n| `customer` | `object(`[`Company`](/zero-touch/reseller-library/reference/objects#company)`)` | Object containing details of the newly created customer. |\n| `vendor_params` | `map` | Extra fields, vendor specified key-value pair (Samsung only). |\n\nError behavior\n--------------\n\nIf an error occurs, the library throws a `CommonException` containing one of the\nfollowing error codes:\n\n### `CommonException`\n\n| Error code |\n|-------------------------|\n| `INTERNAL_SERVER_ERROR` |"]]