This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.
This use case demonstrates how you can update your event site with a ticket counter for specific-price tickets. This counter provides real-time information on the availability of tickets for customers to see. For example, your page can have a counter that says "Only 3 tickets left for this price." By displaying the number of tickets remaining, you can motivate customers to buy tickets promptly.
Note: This flow assumes you have already created the UI component of the counter for your site.
To create a ticket counter, follow these steps:
salesDetails.unsoldCount
and fixedPrice.value
values (for fixedPrice
pricing method).salesDetails.unsoldCount
and pricingOptions.optionDetails.price.value
field values (for optionalPrice
pricing method).Pass these retrieved values in your app to initialize the counter on your website, displaying the number of available tickets at the specified price.
On an ongoing basis, listen for each new ticket purchase using the Order Confirmed Webhook.
When the webhook is triggered, you'll receive an order in the payload. Retrieve the ticketDefinitionId
value from the event data.
Send the extracted ticketDefinitionId
value to your site and compare it with the ticket definition ID for which the counter is set. If they match, call Get Ticket Definition again to retrieve the updated salesDetails.unsoldCount
value. Send this new decreased value to your website to update the ticket counter.
If you're using a Wix site to manage events and another system to handle ticketing, you can synchronize ticket definitions between them whenever a definition is updated on the site. This includes aspects such as ticket types, pricing, availability, and any other relevant ticket settings. This synchronization eliminates the need for manual updates and reduces the risk of discrepancies between systems.
To upload and update all ticket definitions defined on the Wix site to your external system for the first time, follow these flows:
Create a custom field in your system that stores the ticket definition ID for a particular event to ensure a 1-to-1 relationship with the external ticketing system. Craft your code so that this ID won't be overwritten by future updates from your app.
Create a mapping from the site ticket definition fields to the system fields that will be used whenever site ticket definitions and the external system are synchronized.
Query Ticket Definitions by eventId
and send the relevant information to the external ticketing system.
On an ongoing basis, listen for changes to site ticket definitions with these webhooks:
When one of the above webhooks is triggered, you'll receive the ticket definition in the payload. You can bring those changes to the ticketing system by retrieving the relevant info from the payload, and use mapping to take action on the external system:
For created and updated ticket definitions retrieve the relevant info from the createdEvent.currentEntity
object.
For deleted ticket definitions retrieve the createdEvent.currentEntity.id
value.
Let customers know when ticket sales for an event begin. You can send automated notifications to customers with email or push notifications. These notifications make customers aware of ticket availability so they can secure their tickets promptly.
Note: This flow assumes your customers already have the ability to subscribe to your newsletters.
To send notifications about the start of ticket sales, follow these steps:
Retrieve the salePeriod.startDate
field value, and write your code so that the value can be passed to your marketing tool.
Request and filter the list of subscribers in your external marketing tool based on customers subscription status for the current event.
When the ticket sale start date arrives, send notifications to your customers who have opted in to receive marketing emails.