Contents
Table of Contents | ||
---|---|---|
|
Introduction
RBI’s Customer Support API is designed to allow vendors to open customer support tickets or receive open tickets opened by guests.
We support two different types of tickets:
Store support tickets: issues that should be addressed by restaurants, usually related to ongoing delivery orders such as an order that is late or never arrived.
General support tickets: issues that do not necessarily require immediate action from the store, such as a general complaint or suggestion.
Support flows
Guest opens a ticket
Guests can open customer support tickets using the RBI app.
Typically, the app will display several categories and subcategories that guests can choose from before opening a ticket – see example above. The categories and subcategories are configured by operators in our content management system. Each category is configured as either a store ticket or a general ticket.
Expand | ||
---|---|---|
| ||
Operators can configure categories and subcategories in Sanity under CTG Configs → Support → Support Category groups (example for BK PT staging). Each category has a “Ticket type” attribute which determines whether it’s created as type |
When a guest opens a store support ticket, the store support ticket event webhook (STORE_SUPPORT_TICKET_EVENT
) will trigger.
When a guest opens a general support ticket, the general support ticket event webhook (GENERAL_SUPPORT_TICKET_EVENT
) will trigger.
Both webhooks provide the same detailed payload regarding the ticket (category, subcategory, comments, source…), including a type
key which indicates whether it is a general ticket ("type": "GENERAL"
) or store ticket ("type": "STORE"
).
This information is then used by the customer support vendor to create a ticket in their system. See below the expected flow:
Zenuml sequence macro lite | ||||||
---|---|---|---|---|---|---|
| ||||||
Vendor opens a ticket
External parties can also open tickets using the submit a ticket endpoint, which is a counterpart to the general support and store support webhooks referenced in the previous section. Consequently, the payload for vendors to open a ticket is the same payload provided by the webhooks.
Info |
---|
Note that tickets opened using the submit a ticket endpoint will be broadcasted via our webhooks following the structure explained above, so that the customer support vendor listening to the webhooks can create the corresponding tickets in their system. |
Vendors can obtain the applicable customer support categories (category
key), subcategories (subcategory
key) and subcategories IDs (subcategoryId
key) from our content management system. You can find how in the reference doc [add link].
Sanity endpoint to get categories IDs, names and referenced subcategories:
Code Block |
---|
https://czqk28jt.api.sanity.io/v2021-10-21/data/query/[environment]_[brand]_[country]?query=*%5B%0A++_type%3D%3D%22supportCategoryGroup%22%0A%5D%0A%7Bname%2CsupportSubcategories%7D |
Example for Burger King Portugal prod: https://czqk28jt.api.sanity.io/v2021-10-21/data/query/prod_bk_pt?query=*[ ++_type%3D%3D"supportCategoryGroup" ] {name%2CsupportSubcategories}
Sanity endpoint to get subcategories IDs [are vendors supposed to use the Sanity subcategory ID or the Knoweldge Force ID] and names:
Code Block |
---|
https://czqk28jt.api.sanity.io/v2021-10-21/data/query/[environment]_[brand]_[country]?query=*%5B%0A++_type%3D%3D%22supportSubcategory%22%0A%5D%0A%7B_id%2Cname%2CknowledgeForceIssueId%7D |
Example for Burger King Portugal prod: https://czqk28jt.api.sanity.io/v2021-10-21/data/query/prod_bk_pt?query=*[ ++_type%3D%3D"supportSubcategory" ] {_id%2Cname%2CknowledgeForceIssueId}