The offers and deals prebuilt component checks whether the caller is a registered user. If the caller has a registered account, the component lets you provide information about user-specific offers and deals.
The user can also get details on general offers and deals or report issues with a specific coupon code. This component uses the Alphanumeric collection prebuilt component to collect coupon codes.
The component also uses Generators for post-call summarization, FAQs, and offer details.
Limitations
In addition to the common prebuilt component limitations, this prebuilt component has the following limitations:
- This component doesn't encrypt any data.
Sample dialogs
These sample dialogs show common scenarios that this prebuilt component handles. They demonstrate behavior when the user calls the component using telephony, which triggers the Default Welcome Intent and the first agent response at the start of the conversation.
User-specific and general offers and deals
- The user has been previously authenticated.
- The user asks for their latest offers.
- The agent presents a list of offers specific to the user.
- The user asks some questions about the offers, and then asks for offers in a specific category.
- The agent presents the list of offers in the category.
- The agent offers to send the offer details to the user.
- The user declines.
| User input | Agent response |
|---|---|
| Welcome! Would you like to explore our latest offers or are you experiencing any issues with a specific coupon code? | |
| I want to see the latest offers | |
| To confirm, you are looking for offers. Is that correct? | |
| Yes | |
| We found the following offers for you, here are the details: Offer 1: Get 5% off on apparels, use code APPARELS5, valid until 2024-03-28. Offer 2: Get 15% off on grocery, use code GROCERY500, valid until 2024-03-28. Hope you find these offers interesting. Do you have any queries about offers or deals that we can answer for you? |
|
| Is there a purchase minimum for the grocery offer? | |
| Yes, there is a minimum purchase value of 10 to redeem the 15% off on grocery. Use code GROCERY500 to redeem this offer, valid until 2024-03-28. We hope to be able to provide you with the details you require. Do you have any queries about offers or deals that we can answer for you? |
|
| Do you have any offers for electronics? | |
| Certainly! Here are the offer details: Offer 1: Enjoy 5% off on electronics, use code ELECTRIC5, valid until 2024-03-28. Offer 2: Get 15% off on electronics, use code ELECTRIC15, valid until 2024-03-28. We hope to be able to provide you with the details you require. Do you have any queries about offers or deals that we can answer for you? |
|
| No, I'm done | |
| Do you want offer details to be shared on your registered mobile or email? | |
| No, thanks | |
| Thank you for calling. |
Issue with a coupon code
- The user has been previously authenticated.
- The user mentions that they have an issue with a coupon code.
- The agent collects the coupon code and provides the user with details about the coupon code redemption.
- The user confirms that they are having an issue with the coupon code.
- The agent submits a ticket to report the issue.
| User Input | Agent Response |
|---|---|
| Welcome! Would you like to explore our latest offers or are you experiencing any issues with a specific coupon code? | |
| I'm having issues with a coupon code | |
| To confirm, you are looking for coupon codes. Is that correct? | |
| yes | |
| We're sorry to hear that. Could you please share the coupon code you're using? | |
| The agent collects the coupon code using the Alphanumeric collection prebuilt component. | |
| The offer code APPARELS5 associated with apparels needed minimum purchase value of $100 and valid till 2024-03-28, please ensure the conditions such as minimum purchase requirement are met. Is this information helpful for you? |
|
| no | |
| Please specify the issue you are experiencing. You may say something like my coupon code isn't working, code is not working in my area. | |
| coupon code isn't working | |
| To confirm, the coupon code issue provided is coupon code isn't working. Is this correct? | |
| yes | |
| We've raised a ticket to report your issue. Thank you for calling. |
Naming conventions
This prebuilt component uses the following naming conventions:
| Feature | Format | Example |
|---|---|---|
| Flow | [Component Name] | Offers and Deals |
| Entity Type | prebuilt_components_[component_name]_[entity_type] | prebuilt_components_offers_and_deals_category |
| Webhook | prebuilt_components_[component_name]:[webhook_action] | prebuilt_components_offers_and_deals:get_offers_details |
Input parameters
Input parameters configure certain behaviors of the component. One or more conditions within the flow use these parameters to determine how the component behaves. You must set flow-scoped parameters on the start page of the component. You can set session-scoped parameters using a calling flow or on the start page of this component.
This prebuilt component accepts the following input parameters:
| Parameter Name | Description | Input Format |
|---|---|---|
| $session.params.phone_number | (optional) The user's local phone number, without the country code, used to identify the user. | string |
This prebuilt component lets you configure the behavior of the component, including retries, with the following optional parameters:
| Parameter Name | Description | Format |
|---|---|---|
| $flow.max_retry_concern_type | Specifies the number of retries allowed when selecting whether the user would like to hear offers or report an issue with a coupon code. The default value is 2. |
integer |
| $flow.max_retry_offers_category | Specifies the number of retries allowed when providing a category to hear offers for. The default value is 2. |
integer |
| $flow.max_retry_another_coupon_code | Specifies the number of retries allowed when providing the specific coupon code the user is having an issue with. The default value is 2. |
integer |
| $flow.max_retry_coupon_code_issue_counter | Specifies the number of retries allowed when providing the issue the user is having with a coupon code. The default value is 2. |
integer |
| $flow.max_retry_message_confirm_channel | Specifies the number of retries allowed when providing a channel to receive offer details on. The default value is 2. |
integer |
| $flow.valid_coupon_code_status | Specifies the value of the coupon_code_status field returned by the get_coupon_code_details webhook indicating that the coupon code is valid. The default value is "valid". |
string |
| $flow.invalid_coupon_code_status | Specifies the value of the coupon_code_status field returned by the get_coupon_code_details webhook indicating that the coupon code is invalid. The default value is "invalid". |
string |
| $flow.expired_coupon_code_status | Specifies the value of the coupon_code_status field returned by the get_coupon_code_details webhook indicating that the coupon code is expired. The default value is "expired". |
string |
To configure the input parameters for this component, expand for instructions.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Select the Build tab.
- Click the imported component in the Flows section.
- Click the Start Page in the Pages section.
- Click the true Route in the Start Page.
- In the Route window, edit the Parameter Presets values as needed.
- Click Save.
Output parameters
Output parameters are session parameters that remain active after exiting the component. These parameters contain important information collected by the component.
This prebuilt component provides the following output parameters:
| Parameter Name | Description | Output Format |
|---|---|---|
| phone_number | The user's local phone number, without the country code, used to identify the user. | string |
| transfer_reason | Indicates the reason the flow exited, if it was not successful. The returned value is one of the following:agent: the user requested a human agent at some point during the conversation.denial_of_information: the user declined to share information requested by the component.max_no_input: the conversation reached the maximum number of retries for no-input events. See no-input built-in events.max_no_match: the conversation reached the maximum number of retries for no-match events. See no-match built-in events.webhook_error: a webhook error occurred. See webhook.error built-in event. webhook_not_found: a webhook URL was unreachable. See webhook.error.not-found built-in event. |
string |
Generators
This component uses Generators to enable specific parts of the conversation.
Summarization
The Summarization generator creates a post-call summary describing the conversation handled by the component.
General FAQ
The General FAQ generator handles frequently asked questions related to discounts, sales, purchases, and loyalty programs.
For example:
- Can I return sale products if I change my mind?
- Can I get free samples or gifts with certain product purchases?
- Do you offer price adjustments if the item I bought goes on sale later?
- Is there a time limit for redeeming loyalty program rewards?
User-specific offer details
The User-specific offer details generator provides details about user-specific
offers based on the information provided by the get_offers_details
webhook.
Offers and deals details
The Offers and deals details generator provides details about general offers
and deals based on the information provided by the get_offers_details
webhook.
You can ask about offers in a specific category or ask for more detail about
specific offers.
Offers and deals FAQ
The Offers and deals FAQ generator handles frequently asked questions related to offers and deals.
For example:
- Are there special offers for new customers?
- How can I be notified of upcoming deals?
- Are there deals exclusively available in-store or online?
- How often are new deals added to your platform?
Discount and promo code FAQ
The Discount and promo code FAQ generator handles frequently asked questions related to discounts and promotional codes.
For example:
- Can I use a discount code more than once?
- Can I use multiple discounts on a single order?
- How can I redeem a discount code during checkout?
- What if I forgot to apply a discount code during checkout?
Basic setup
To set up this prebuilt component, follow these steps:
- Import the prebuilt component.
- Configure the provided flexible webhooks with settings describing your external services. For more information, see the Webhook setup section.
Webhook setup
To use this component, configure the included flexible webhooks to retrieve the necessary information from your external services.
Get offers details
The component uses the prebuilt_components_offers_and_deals:get_offers_details
webhook to retrieve details about user-specific and general offers.
API request parameters
The component provides the following parameters as inputs to the API request:
| Parameter Name | Description | Input Format |
|---|---|---|
| $session.params.phone_number | The user's phone number to retrieve offer details for. | string |
API response parameters
The component retrieves the following parameters from the API response:
| Parameter Name | Description | Output Format |
|---|---|---|
| active_category | A list of offer categories available to the user. Valid values are defined by the prebuilt_components_offers_and_deals_category entity. |
List (string) |
| user_email | The email address registered to the provided account, used to send offer details. | string |
| user_offer | A list of user-specific offer details. Each element of the list represents a single offer, with key-value pairs describing different attributes of the offer. For example, {"valid_from": "2024-01-29", "sale_type": "none", "valid_until": "2024-03-28", "offer_id": "G5E0M2D7A6Y4W9S", "discount_value": "5%", "coupon_code": "ELECTRIC5", "is_redeem_allowed": "true", "minimum_order_value": "1000", "maximum_discount_amount": "200", "offer_category_name": "electronics"}. |
List (object) |
| all_offers | A list of general offer details. Each element of the list represents a single offer, following the same format as the user_offer field. |
List (object) |
To configure the Get offers details webhook for this component, expand for instructions.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Select the Manage tab.
- Click Webhooks.
- Select the prebuilt_components_offers_and_deals:get_offers_details webhook.
- Replace the URL in the Dialogflow CX Webhook URL field with the endpoint for the service you want to integrate with. Select the proper Method in the dropdown.
- Review and update the Request body to form the proper request format for your webhook.
- Review and update the Response configuration to extract specific fields from your webhook's response. Do not modify the parameter names, as these are required by the component to access the returned field values.
- Review and update the Authentication settings as needed.
- Click Save.
Get coupon code details
The component uses the
prebuilt_components_offers_and_deals:get_coupon_code_details webhook to
retrieve details about a specific coupon code for which you've reported an
issue.
API request parameters
The component provides the following parameters as inputs to the API request:
| Parameter Name | Description | Input Format |
|---|---|---|
| $flow.coupon_code | The coupon code to retrieve details for. | string |
| $session.params.phone_number | The phone number associated with the user's account. | string |
API response parameters
The component retrieves the following parameters from the API response:
| Parameter Name | Description | Output Format |
|---|---|---|
| offer_id | The offer ID for the coupon code. | string |
| offer_category_name | The category of the coupon code. Valid values are defined by the prebuilt_components_offers_and_deals_category entity. |
string |
| coupon_code_status | The status of the coupon code. Valid values are defined by the $flow.valid_coupon_code_status, $flow.invalid_coupon_code_status, and $flow.expired_coupon_code_status input parameters. |
string |
| valid_until | The date the coupon code is valid until, in YYYY-MM-DD format. |
string |
| minimum_order_value | The minimum order value for the coupon code. | string |
To configure the Get coupon code details webhook for this component, expand for instructions.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Select the Manage tab.
- Click Webhooks.
- Select the prebuilt_components_offers_and_deals:get_coupon_code_details webhook.
- Replace the URL in the Dialogflow CX Webhook URL field with the endpoint for the service you want to integrate with. Select the proper Method in the dropdown.
- Review and update the Request body to form the proper request format for your webhook.
- Review and update the Response configuration to extract specific fields from your webhook's response. Do not modify the parameter names, as these are required by the component to access the returned field values.
- Review and update the Authentication settings as needed.
- Click Save.
Send message
The component uses the prebuilt_components_offers_and_deals:send_message
webhook to send a message containing offer details to the user-selected channel.
API request parameters
The component provides the following parameters as inputs to the API request:
| Parameter Name | Description | Input Format |
|---|---|---|
| $session.params.phone_number | The user's local phone number, without the country code, used to identify the user. | string |
| $flow.confirmation_channel | The channel the user has selected to receive the offer details on. Valid values are defined by the prebuilt_components_channel_email_phone entity. |
string |
To configure the Send message webhook for this component, expand for instructions.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Select the Manage tab.
- Click Webhooks.
- Select the prebuilt_components_offers_and_deals:send_message webhook.
- Replace the URL in the Dialogflow CX Webhook URL field with the endpoint for the service you want to integrate with. Select the proper Method in the dropdown.
- Review and update the Request body to form the proper request format for your webhook.
- Review and update the Response configuration to extract specific fields from your webhook's response. Do not modify the parameter names, as these are required by the component to access the returned field values.
- Review and update the Authentication settings as needed.
- Click Save.
Raise ticket
The component uses the prebuilt_components_offers_and_deals:raise_ticket
webhook to submit a ticket reporting the user's issue with a coupon code.
API request parameters
The component provides the following parameters as inputs to the API request:
| Parameter Name | Description | Input Format |
|---|---|---|
| $session.params.phone_number | The user's local phone number, without the country code, used to identify the user. | string |
| $flow.coupon_code | The coupon code the user has reported an issue for. | string |
| $flow.offer_id | The offer ID for the provided coupon code. | string |
| $flow.coupon_code_issue | The provided issue for the coupon code. | string |
To configure the Raise ticket webhook for this component, expand for instructions.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Select the Manage tab.
- Click Webhooks.
- Select the prebuilt_components_offers_and_deals:raise_ticket webhook.
- Replace the URL in the Dialogflow CX Webhook URL field with the endpoint for the service you want to integrate with. Select the proper Method in the dropdown.
- Review and update the Request body to form the proper request format for your webhook.
- Review and update the Response configuration to extract specific fields from your webhook's response. Do not modify the parameter names, as these are required by the component to access the returned field values.
- Review and update the Authentication settings as needed.
- Click Save.
Complete
The prebuilt component and its webhooks are now set up and ready to test.