createCustomer
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat objek Company
untuk mengidentifikasi perusahaan (pelanggan) secara unik untuk pendaftaran Knox atau zero-touch. Setelah metode berhasil ditampilkan, pemilik (primary_emails
) atau admin (secondary_emails
) yang ditentukan dapat mengaitkan alamat email mereka dengan Akun Google untuk mengakses portal pelanggan zero-touch (untuk mengetahui detailnya, lihat Pendaftaran zero-touch untuk admin IT) atau Akun Samsung untuk mengakses portal Knox Mobile Enrollment (KME).
Tanda tangan metode
public CreateCustomerResponse createCustomer(CreateCustomerRequest request) throws CommonException;
CreateCustomerRequest
Nama properti |
Nilai |
Wajib |
Deskripsi |
customer_name |
string |
Ya |
Nama perusahaan. Misalnya, XYZ Corp. Ditampilkan kepada karyawan perusahaan di portal pendaftaran zero-touch. |
primary_emails |
Daftar object(string) |
Ya |
Zero-touch: Alamat email pengguna pelanggan dalam peran pemilik. Setidaknya masukkan satu alamat email. Setiap alamat email harus dikaitkan dengan Akun Google. Pemilik memiliki akses yang sama dengan admin, tetapi juga dapat menambahkan, menghapus, dan mengedit pengguna portal organisasi Anda.
Samsung: Alamat email admin super pelanggan. Samsung hanya mengambil email pertama dalam daftar. Alamat email harus dikaitkan dengan Akun Samsung. |
secondary_emails |
Daftar object(string) |
Tidak |
Alamat email pengguna pelanggan dalam peran admin. Setiap alamat email harus dikaitkan dengan Akun Google. Catatan: Properti ini tidak didukung oleh Samsung. |
vendorParams |
map |
Zero-touch: Tidak
Samsung: Ya |
Kolom tambahan, key-value pair yang ditentukan vendor. Permintaan dari class SamsungResellerService harus menentukan:
"country": Kode negara ISO 3166-1 pelanggan, misalnya "US".
"firstName": nama depan pelanggan (maks. 60 karakter).
"lastName": nama belakang pelanggan (maks. 60 karakter).
"service": "KME" adalah satu-satunya nilai yang didukung. |
CreateCustomerResponse
Nama properti |
Nilai |
Deskripsi |
customer |
object( Company ) |
Objek yang berisi detail pelanggan yang baru dibuat. |
vendor_params |
map |
Kolom tambahan, pasangan nilai kunci yang ditentukan vendor (khusus Samsung). |
Perilaku error
Jika terjadi error, library akan menampilkan CommonException
yang berisi salah satu kode error berikut:
CommonException
Kode error |
INTERNAL_SERVER_ERROR |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-29 UTC.
[null,null,["Terakhir diperbarui pada 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` |"]]