---
title: "CustomerCreateInput"
description: "用于创建客户的输入字段。"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/inputs/customer-create-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/inputs/customer-create-input.md'
---
# CustomerCreateInput

用于创建客户的输入字段。

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Input Fields

* `lastName`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户的姓。  
  最大长度限制：128

* `firstName`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户的名。    
  最大长度限制：128

* `password`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户的密码。  
  最大长度限制：18

* `phone`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户的手机号码。  
  最大长度限制：20

* `acceptsMarketing`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/boolean.md)

  客户是否接受通过邮箱订阅营销信息。
  * `true`：接受
  * `false`：不接受
  

* `email`

  [String!](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户的邮箱地址。  
  最大长度限制：50

* `source`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户创建请求来源的标识符。有效枚举值包含：
    * `7`：Storefront API
    * `22`：ITS App
    * `24`：Shopper App
  
  若不传入该字段或将该字段设为 `null` 时，系统将采用默认值 `7`。

* `verifyToken`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  验证码令牌。

* `birthday`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户出生日期。格式：`yyyyMMdd`。    
  例子：`19931231`

* `gender`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户性别。有效枚举值包含：
  * `male`：男
  * `female`：女
  * `prefer not to say`：保密
  
  默认值：`prefer not to say`

* `channel`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  客户创建请求的提交渠道标识。与 `source` 配合使用，用于更精准地识别客户的设备与操作环境。有效枚举值包含：
    * `ShopperApp_IOS`：iOS  系统的 Shopper App 客户端
    * `ShopperApp_Android`：安卓系统的 Shopper App 客户端
    * `EC_Web`：PC 端浏览器
    * `EC_H5`：移动端 HTML5 网页

* `preregisteredAccountStrategy`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  预注册账号的处理策略。有效枚举值包含：
  * `send_invite_email`：保持未激活状态，并向客户发送账号激活邀请邮件。
  * `suppress_invite_email`：保持未激活状态，且不发送账号激活邀请邮件。
      
  默认值：`send_invite_email`

* `attributes`

  [[ExtAttributesInput]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/inputs/ext-attributes-input.md)

  自定义客户属性列表（格式为键值对）。用于在客户注册时一并收集额外的业务扩展信息，例如会员邀请码和自定义注册表单字段等。<br/>最大个数限制：10

## Argument from

* [Mutation](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/mutations/customer-create.md).customerCreate

