When a customer purchases a private offer, Google creates an entitlement, which indicates that the customer has bought the offer from Cloud Marketplace.
This article reviews how to manage entitlements for your private offers that have automatic offer approval turned on by using the Partner Procurement API.
If you haven't turned on automatic offer approval for your software as a service (SaaS) product, you receive different Pub/Sub messages than those described in this article. For details of those Pub/Sub messages, refer to Manage entitlements for private offers.
For details on using the Partner Procurement API for private offers, visit the reference documentation.
Verify when your customer's offers will become active
When you turn on automatic offer approval for a SaaS product, you receive different Pub/Sub messages than those you receive for SaaS products that don't have automatic approval turned on. Because SaaS products with automatic offer approval support scheduled start dates, after a private offer is accepted, you must verify when the offer is expected to begin, so that you can provision resources at the right time.
When a customer purchases a private offer, Cloud Marketplace creates an entitlement and sends the following Pub/Sub message to your product:
{ "eventId": "...", "eventType": "ENTITLEMENT_OFFER_ACCEPTED", "entitlement": { "id": "ENTITLEMENT_ID", "updateTime": "...", "newOfferDuration": "", // Contract duration for the offer "newOfferStartTime": "...", // Starting time for the offer "newOfferEndTime": "...", // Ending time for the offer }, }
In this example, ENTITLEMENT_ID is an ID created by Cloud Marketplace.
In your system, update the user's account to reflect that they've purchased the
offer. Use the newOfferStartTime
field to verify the time that the offer is
expected to start, so that you can provision resources as needed.
What's next
Turn on automatic offer approval for SaaS products that you offer.
Create a private offer for a specific customer.