本页介绍了如何管理 Google Workspace 和 Google Chrome 产品的客户使用权。
前提条件
在继续之前,请确定您的转销商账号是使用单个 Google Workspace 结算账号,还是多个 Google Workspace 结算账号。如需详细了解此主题,请参阅“使用多个 Google Workspace 结算账号”新手入门指南。
创建使用权
准备工作
您需要先完成 Customer
设置,然后才能继续。
如需创建使用权,请按以下步骤操作:
使用客户名称调用
listPurchasableSkus
以检索PurchasableSkus
列表ListPurchasableSkusRequest { "customer": "accounts/123/customers/abc", "createEntitlementPurchase": { "product": "products/-" } } ListPurchasableSkusResponse { "purchasableSkus": [ { "sku": { "name": "products/product_id/skus/sku_id1", "product": { "name": "products/product_id", } } }, { "sku": { "name": "products/product_id/skus/sku_id2", "product": { "name": "products/product_id", }, } } ] }
使用所选的 PurchasableSku,使用
queryEligibleBillingAccounts
方法查找可用于支付使用权费用的一组 Google WorkspaceBillingAccount
。- 如果您想以特定币种付款,请选择使用该币种的结算账号。
QueryEligibleBillingAccountsRequest { "customer": "accounts/123/customers/abc", "skus": ["products/product_id/skus/sku_id1"] } QueryEligibleBillingAccountsResponse { "skuPurchaseGroups": [ { "skus": [ "products/product_id/skus/sku_id1" ], "billingAccountPurchaseInfos": [ { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id1", "displayName": "Google_Workspace_USD_US_1", "currencyCode": "USD", "regionCode": "US" } }, { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id2", "displayName": "Google_Workspace_CAD_CA_1", "currencyCode": "CAD", "regionCode": "CA" } } ] } ] }
使用所选的 PurchasableSku 和 BillingAccount,使用
listPurchasableOffers
方法查找可用的PurchasableOffer
ListPurchasableOffersRequest { "customer": "accounts/123/customers/abc", "createEntitlementPurchase": { "sku": "products/product_id/skus/sku_id1", "billingAccount": "accounts/123/billingAccounts/billing_account_id2" } } ListPurchasableOffersResponse { "purchasableOffers": [ { "offer": { "name": "accounts/123/offers/offer_id1", }, "sku": { "name": "products/product_id/skus/sku_id1", }, "plan": { "paymentPlan": "FLEXIBLE", "paymentCycle": { "duration": 1, "periodType": "MONTH" } }, } ], }
至此,您应该已经有了用于支付
Entitlement
和 PurchasableOffer 费用的 BillingAccount。开始使用create
方法创建使用权。- 创建使用权,并填充 offer、billingAccount 和任何其他必需参数。
CreateEntitlementRequest { "parent": "accounts/123/customers/abc", "entitlement": { "offer": "accounts/123/offers/offer_id1", "maxUnits": 100, "billingAccount": "accounts/123/billingAccounts/billing_account_id2" } } CreateEntitlementResponse { "name": "operations/operation_id1" }
更改 Google Workspace 许可的付款方案
准备工作
付款方式为“免费”或“试用”的 Google Workspace 使用权 plan
没有 Google Workspace 结算账号。如需将使用权的付款方案更改为付费方案,您需要执行一些额外的步骤来选择 Google Workspace 结算账号。
如需更改 Google Workspace 使用权的付款方案,请按以下步骤操作:
只有当现有使用权采用免费或试用付款方案时,才需要执行前两个步骤。
使用优惠时,请使用
lookupOffer
方法查找优惠的Sku
信息。LookupOfferRequest { "entitlement": "accounts/123/customers/abc/entitlements/entitlement_id1" } LookupOffer respones { "name": "accounts/123/offers/offer_id1", "sku": { "name": "products/product_id/skus/sku_id1", } }
使用 Customer 和 Sku,使用 queryEligibleBillingAccounts 方法查找可用于支付此使用权的结算账号集。如果您想以特定币种付款,请选择使用该币种的结算账号。
QueryEligibleBillingAccountsRequest { "customer": "accounts/123/customers/abc", "skus": ["products/product_id/skus/sku_id1"] } QueryEligibleBillingAccountsResponse { "skuPurchaseGroups": [ { "skus": [ "products/product_id/skus/sku_id1" ], "billingAccountPurchaseInfos": [ { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id1", "displayName": "Google_Workspace_USD_US_1", "currencyCode": "USD", "regionCode": "US" } }, { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id2", "displayName": "Google_Workspace_CAD_CA_1", "currencyCode": "CAD", "regionCode": "CA" } } ] } ] } ```
使用 Entitlement 和 BillingAccount,使用
listPurchasableOffers
方法查找任何 PurchasableOffer。如果现有使用权已包含付费方案,则无需 BillingAccount;在这种情况下,系统将使用现有的 BillingAccount。如需更改付款方案,purchase_option 字段的值需要为changeOfferPurchase
ListPurchasableOffersRequest { "customer": "accounts/123/customers/abc", "changeOfferPurchase": { "entitlement": "accounts/123/customers/abc/entitlements/entitlement_id1", "billingAccount": "accounts/123/billingAccounts/billing_account_id2" } } ListPurchasableOffersResponse { "purchasableOffers": [ { "offer": { "name": "accounts/123/offers/offer_id1", }, "sku": { "name": "products/product_id/skus/sku_id1", }, "plan": { "paymentPlan": "FLEXIBLE", "paymentCycle": { "duration": 1, "periodType": "MONTH" } }, } ], }
至此,您应该已经有了使用权、优惠和结算账号。开始使用
changeOffer
方法更改付款方案。ChangeOfferRequest { "name": "accounts/abc/customers/123/entitlements/entitlement_id1", "offer": "accounts/abc/offers/offer_id1", "billing_account": "accounts/abc/billingAccounts/billing_account_id2", "parameters": [{ "name": "max_units", "value": { "int64Value": "100" } }] } ChangeOfferResponse { "name": "operations/operation_id1" }
升级或降级 Google Workspace 使用权
如需升级或降级 Google Workspace 使用权,请按以下步骤操作:
使用此使用权,调用
listPurchasableSkus
方法可检索可用于升级或降级的 PurchasableSku 列表。ListPurchasableSkusRequest { "customer": "accounts/123/customers/abc", "changeOfferPurchase": { "entitlement": "accounts/123/customers/abc/entitlements/entitlement_id1", "changeType": "UPGRADE" } } ListPurchasableSkusResponse { "purchasableSkus": [ { "sku": { "name": "products/product_id/skus/sku_id1", "product": { "name": "products/product_id", } } }, { "sku": { "name": "products/product_id/skus/sku_id2", "product": { "name": "products/product_id", }, } } ] }
使用 PurchasableSku,使用
queryEligibleBillingAccounts
方法查找可用于支付使用权费用的一组 BillingAccount。- 如果您想以特定币种付款,请选择使用该币种的结算账号。
QueryEligibleBillingAccountsRequest { "customer": "accounts/123/customers/abc", "skus": ["products/product_id/skus/sku_id1"] } QueryEligibleBillingAccountsResponse { "skuPurchaseGroups": [ { "skus": [ "products/product_id/skus/sku_id1" ], "billingAccountPurchaseInfos": [ { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id1", "displayName": "Google_Workspace_USD_US_1", "currencyCode": "USD", "regionCode": "US" } }, { "billingAccount": { "name": "accounts/123/billingAccounts/billing_account_id2", "displayName": "Google_Workspace_CAD_CA_1", "currencyCode": "CAD", "regionCode": "CA" } } ] } ] } ```
使用 Entitlement 和 BillingAccount,使用
listPurchasableOffers
方法查找任何 PurchasableOffer。ListPurchasableOffersRequest { "customer": "accounts/123/customers/abc", "changeOfferPurchase": { "entitlement": "accounts/123/customers/abc/entitlements/entitlement_id1", "billingAccount": "accounts/123/billingAccounts/billing_account_id2" } } ListPurchasableOffersResponse { "purchasableOffers": [ { "offer": { "name": "accounts/123/offers/offer_id1", }, "sku": { "name": "products/product_id/skus/sku_id1", }, "plan": { "paymentPlan": "FLEXIBLE", "paymentCycle": { "duration": 1, "periodType": "MONTH" } }, } ], } ```
此时,您应该已经有了 Entitlement、PurchasableOffer 和 BillingAccount。使用
changeOffer
方法开始升级或降级。- 创建一个 Entitlement 对象,并填充 name、offer、billingAccount 和所有必需参数。
ChangeOfferRequest { "name": "accounts/abc/customers/123/entitlements/entitlement_id1", "offer": "accounts/abc/offers/offer_id1", "billing_account": "accounts/abc/billingAccounts/billing_account_id2", "parameters": [{ "name": "max_units", "value": { "int64Value": "100" } }] } ChangeOfferResponse { "name": "operations/operation_id1" } ```
转移使用权
本部分可帮助您从现有 Google Workspace 和 Chrome 客户之前的合作伙伴处转移其使用权。
如需在 Partner Sales Console 中转移客户,请参阅有关将客户转移到合作伙伴账号或 Google 账号的指南
Google Workspace 客户只能从单个合作伙伴或单个合作伙伴和 Google 购买使用权。
在转移期间,现有使用权会先自动取消,然后再在新合作伙伴名下重新创建。如果客户有承诺方案使用权,则这些使用权将在转移后开始新的承诺期。
准备工作
如需管理客户的使用权,您需要客户生成的转移令牌。与客户联系,提供您的合作伙伴公开 ID,以便他们生成转移令牌。创建令牌后,客户需要将转移令牌发回给您,以便完成流程。这些令牌的有效期为 14 天。您还需要客户的网域或 Cloud Identity ID。
客户创建转移令牌时,可以选择要转移给新转销商的使用权。您需要在此过程中转移所有所选的使用权。
如需转让使用权,请按以下步骤操作:
如果您只有客户的网域,则可以使用 Cloud Channel API 返回其 Cloud Identity ID。使用客户的网域调用 checkCloudIdentityAccountsExist
,如果网域存在,API 将返回客户的 Cloud Identity ID。
使用
customers.import
方法导入客户的数据,以开始转移。ImportCustomerRequest { "parent": "accounts/abc", "domain": "domain" }
使用客户的 Cloud Identity ID,调用
listTransferableSkus
以检索客户的transferableSku
列表。检查每个对象的transferEligibility
,确保您可以购买关联的 SKU。ListTransferableSkusRequest { "parent": "accounts/abc", "cloudIdentityId": "cloud_identity_id" } ListTransferableSkusResponse { "transferableSku": [ { "sku": { "name": "products/product_id/skus/voice_sku_id1", }, }, { "sku": { "name": "products/product_id/skus/google_workspace_sku_id2", }, }, { "sku": { "name": "products/product_id/skus/google_workspace_chrome_sku_id3", }, } ], }
现在,您已经有了 TransferableSkus 列表,接下来需要确定要使用哪个 BillingAccount 来支付使用权的费用。使用
queryEligibleBillingAccounts
方法查找可用于每个 TransferableSku 的一组 BillingAccount。- 请注意,某些 TransferableSku 必须共用同一 Google Workspace 结算账号,因此
queryEligibleBillingAccounts
会返回一个 sku 组,以告知您哪些 TransferableSku 需要使用同一 BillingAccount。如果给定 SKU 组有多个 Google Workspace 结算账号,您可以选择其中一个 Google Workspace 结算账号,并将其用于该组中的每个 TransferableSku。
QueryEligibleBillingAccountsRequest { "customer": "accounts/123/customers/abc", "skus": ["products/product_id/skus/voice_sku_id1","products/product_id/skus/google_workspace_sku_id2","google_workspace_chrome_sku_id3"] } QueryEligibleBillingAccountsResponse { "skuPurchaseGroups": [ { "skus": [ "products/product_id/skus/voice_sku_id1" ], "billingAccountPurchaseInfos": [ { "billingAccount": { "name": "accounts/123/billingAccounts/voice_billing_account_id1", "displayName": "Google_Workspace_Voice_USD_US_1", "currencyCode": "USD", "regionCode": "US" } } ] }, { "skus": [ "products/product_id/skus/google_workspace_sku_id2","google_workspace_chrome_sku_id3" ], "billingAccountPurchaseInfos": [ { "billingAccount": { "name": "accounts/123/billingAccounts/gw_billing_account_id1", "displayName": "Google_Workspace_USD_US_1", "currencyCode": "USD", "regionCode": "US" } }, { "billingAccount": { "name": "accounts/123/billingAccounts/gw_billing_account_id2", "displayName": "Google_Workspace_CAD_CA_1", "currencyCode": "CAD", "regionCode": "CA" } } ] } ] } ```
- 请注意,某些 TransferableSku 必须共用同一 Google Workspace 结算账号,因此
对于每个 TransferableSku 和 BillingAccount 对,请使用
listTransferableOffers
方法查找可用的TransferableOffers
。此时,您应该拥有客户的元组列表,其中包含 TransferableSku、BillingAccounts 和 TransferableOffer。ListTransferableOffersRequest { "parent": "accounts/abc", "cloudIdentityId": "cloud_identity_id", "sku": "products/product_id/skus/voice_sku_id1", "billingAccount": "ccounts/123/billingAccounts/voice_billing_account_id1" } ListTransferableOffersResponse { "transferableOffers": [ { "offer": { "name": "accounts/123/offers/voice_offer_id1", }, "sku": { "name": "products/product_id/skus/voice_sku_id1", }, "plan": { "paymentPlan": "FLEXIBLE", "paymentCycle": { "duration": 1, "periodType": "MONTH" } }, } ], }
为每个元组创建一个新的相应使用权对象,每个使用权都需要一个优惠、结算账号和任何必需的参数。调用
transferEntitlements
方法执行转移。TransferEntitlementsRequest { "parent": "accounts/abc/customers/123", "entitlements": [ { "offer": "accounts/123/offers/voice_offer_id1", "maxUnits": 100, "billingAccount": "accounts/123/billingAccounts/voice_billing_account_id1" }, { "offer": "accounts/123/offers/gw_offer_id2", "maxUnits": 150, "billingAccount": "accounts/123/billingAccounts/gw_billing_account_id1" } { "offer": "accounts/123/offers/gw_chrome_offer_id3", "maxUnits": 200, "billingAccount": "accounts/123/billingAccounts/gw_billing_account_id1" } ] } TransferEntitlementsResponse { "name": "operations/operation_id1" }