Lost and stolen card prebuilt component

The lost and stolen card prebuilt component authenticates the user, retrieves cards registered to the user, and lets the user lock a card. After confirming their locked card, the component lets the user enroll for an upgrade or reissue a new card. This component uses a customized version of the Authentication prebuilt component to authenticate cardholders.

Limitations

In addition to the common prebuilt component limitations, this prebuilt component has the following limitations:

  • This component does not 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.

Unauthenticated user with a single card

  1. The agent identifies that the user isn't authenticated and collects information to verify that they're a registered cardholder.
  2. After the user authenticates, the agent retrieves information about the single card registered to them.
  3. When the user confirms they'd like to lock the card, the agent locks it.
  4. The agent confirms the user's preferred card and delivery address and reissues a new card.
User Input Agent Response
The agent authenticates the user using the Authentication prebuilt component.
Thank you, you have been successfully authenticated.
Please wait while we fetch your card details.

We have found your MasterCard ending in 4444. Do you want to lock your card permanently?
Yes
Please tell us why you are locking your card. You can choose from options like damaged, stolen, lost, or others.
I lost my card
Thanks for your input. We will help you lock your card permanently. Can you confirm if the card ends with 4444?
Yes
Okay, before proceeding, we will send a code to your registered mobile number. Tell us the code to validate the request.
123457
Okay, your card ending with 4444 will be permanently locked. Once locked, you will not be able to make any transactions online or on POS machines with that card. Do you confirm this action?
Yes
Your card was locked successfully. Your request number is 9761431 and has been shared successfully with your registered mobile number. Do you want to reissue a new card?
Yes
You are eligible for a platinum card. The annual fee is 97 dollars, and you can get annual bonuses and special benefits worth 494 dollars. Click the link sent to your registered mobile number to learn more.

Do you want to enroll for this card?
Yes
We will deliver the card to your registered address. Can you confirm your delivery address zip code is 12345?
Yes
Okay, wait for a few seconds while we raise the request for reissuing a new card.

The reissue request for the new card was successful. Your request number is 4643943 and has been shared successfully to your registered mobile number.

The card will be delivered to your registered address in 3 working days. To use the card, follow the instructions shared with the card.

Authenticated user with multiple cards

  1. The agent identifies that the user has been previously authenticated and retrieves information about the cards registered to the user.
  2. The user selects a previously locked card, and then the agent lets the user request a new card.
User Input Agent Response
Please wait while we are retrieving your card details.

We have found multiple cards registered with your number. We have a Visa ending in 1456, a MasterCard ending in 1457, a MasterCard ending in 1345, and a Visa ending in 3456

Please tell us the last 4 digits of the card you'd like to lock.
1457
The last four digits of the card number that we received are 1457, is that correct?
Yes
The requested card is already in permanent locked status. Do you want to reissue a new card?
Yes
We will deliver the card to your registered address. Can you please confirm your delivery address zip code is 12345?
Yes
Okay, please wait for a few seconds while we are raising the request for reissuing a new card.

The reissue request for the new card was successful. Your request number is 5423270 and has been shared successfully to your registered mobile number.

The card will be delivered to your registered address in 3 working days. To use the card, please follow the instructions shared with the card.

Do you want to block any other card?
No that's all for me
Okay, thank you for calling us.

Naming conventions

This prebuilt component uses the following naming conventions:

Feature Format Example
Flow [Component Name] Lost and Stolen Card
Entity Type prebuilt_components_[component_name]_[entity_type] prebuilt_components_lost_and_stolen_lock_reason
Webhook prebuilt_components_[component_name]:[webhook_action] prebuilt_components_lost_and_stolen_card:lock_card_ticket_number

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.auth_level (optional) Indicates the authentication level of the caller. integer
$session.params.auth_level_req Indicates the level of authentication needed before the user can access their card details. This value is configured in the parameter presets of the page entry fulfillment on the check auth level page. By default, this value is 1. integer
$session.params.account_auth_enabled Indicates whether the user should be authenticated as an account holder as described in the Authentication types. This value is configured in the parameter presets of the page entry fulfillment on the check auth level page. By default, this value is false. boolean
$session.params.card_auth_enabled Indicates whether the user should be authenticated as a card holder as described in the Authentication types. This value is configured in the parameter presets of the page entry fulfillment on the check auth level page. By default, this value is true. boolean
$session.params.phone_number (optional) The user's registered phone number used for authentication. string
$session.params.card_count (optional) The number of credit cards associated with the authenticated user. integer
$flow.card_status_active Specifies the value of the parameter returned by the Validate card webhook to indicate the selected card is currently active. By default, the value is "active". string
$flow.card_status_lock_temp Specifies the value of the parameter returned by the Validate card webhook to indicate the selected card is temporarily locked. By default, the value is "inactive". string
$flow.card_status_lock_permanent Specifies the value of the parameter returned by the Validate card webhook to indicate the selected card is permanently locked. By default, the value is "blocked". string
$flow.max_retry_card_number Specifies the number of retries allowed when collecting the last four digits of the credit card. The default value is 3. integer
$flow.max_otp_retry_count Specifies the number of retries allowed when collecting a one-time password (OTP) from the user. The default value is 3. integer

To configure the input parameters for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Build tab.
  5. Click the imported component in the Flows section.
  6. Click the Start Page in the Pages section.
  7. Click the true Route in the Start Page.
  8. In the Route window, edit the Parameter Presets values as needed.
  9. 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 values for the following output parameters:

Parameter Name Description Output Format
auth_level Indicates the authentication level of the caller. integer
phone_number The user's local phone number, without the country code, used to identify the user. string
card_count The number of cards associated with the registered phone number. integer
last_four_digit_of_card_number If the user has a single card, Dialogflow returns the last four digits of the card number. If the user has multiple cards, the value of this parameter is the last four digits of the card that you selected to lock or reissue a new card for. 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

Basic setup

To set up this prebuilt component, do the following:

  1. Import the prebuilt component.
  2. Configure the provided flexible webhooks with settings describing your external services. For more information, see Webhook setup.

Webhook setup

To use this component, configure the included flexible webhooks to retrieve the necessary information from your external services.

Authentication

Configure the external services required for authentication to authenticate users for this component. For more information, see Authentication webhook setup.

Get card details

The component uses the prebuilt_components_account_services:get_card_details webhook to retrieve information about the cards registered to the user.

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

API response parameters

The component retrieves the following parameters from the API response:

Parameter Name Description Output Format
last_four_digit_of_all_cards A list containing the last four digits of each card registered to the user. For example, ["0000", "1111", "2222"]. Each element in this list represents the same card as the element with the same index in card_vendor_all. List (string)
card_vendor_all A list containing the credit card vendor for each card registered to the user. For example, ["Visa", "Mastercard", "Discover"]. Each element in this list represents the same card as the element with the same index in last_four_digit_of_all_cards. List (string)
card_count The number of cards associated with the authenticated user. integer

To configure the Get card details webhook for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Manage tab.
  5. Click Webhooks.
  6. Select the prebuilt_components_account_services:get_card_details webhook.
  7. 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.
  8. Review and update the Request body to form the proper request format for your webhook.
  9. 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.
  10. Review and update the Authentication settings as needed.
  11. Click Save.

Validate card

The component uses the prebuilt_components_lost_and_stolen_card:validate_card webhook to retrieve information about a specific card registered to the user's account.

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
$session.params.last_four_digit_of_card_number The last four digits of the card number the user requested to lock. string

API response parameters

The component retrieves the following parameters from the API response:

Parameter Name Description Output Format
zip_code The zip code registered to the user's account. string
card_vendor The credit card vendor for the selected card. string
card_status Indicates the current status of the card. By default, valid values are active, temporarily blocked, or permanently blocked. These statuses are specified by the parameters $flow.card_status_active, $flow.card_status_lock_temp, and $flow.card_status_lock_permanent. For more information, see Input parameters. string
card_upgrade Indicates whether an upgrade is available for the selected card. boolean
card_upgrade_type Specifies the type of card upgrade available. For example, "gold" or "platinum". If card_upgrade is false, this parameter is not required. string
card_upgrade_annual_fee Specifies the dollar amount of the annual fee required for the card upgrade. For example, 150. If card_upgrade is false, this parameter is not required. number
card_upgrade_benefit Specifies the dollar amount of benefits available for the card upgrade. For example, 450. If card_upgrade is false, this parameter is not required. number
reissue_status Indicates whether a new card has been reissued for this card. boolean
dispatch_status Indicates whether the reissued card has been dispatched to the registered address. If reissue_status is false, dispatch_status must be false. boolean
card_estimated_duration The estimated amount of time for new card delivery. For example, "2 days" or "24 hours". If reissue_status is false, this parameter is not required. string

To configure the Validate card webhook for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Manage tab.
  5. Click Webhooks.
  6. Select the prebuilt_components_lost_and_stolen_card:validate_card webhook.
  7. 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.
  8. Review and update the Request body to form the proper request format for your webhook.
  9. 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.
  10. Review and update the Authentication settings as needed.
  11. Click Save.

Lock card

The component uses the prebuilt_components_lost_and_stolen_card:lock_card_ticket_number webhook to create a request to lock a selected card.

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
$session.params.last_four_digit_of_card_number The last four digits of the card number the user requested to lock. string
$flow.lock_type Indicates the type of lock to be applied to the user's card. By default, this component supports permanent locks for lost and stolen cards. Valid lock types are specified by the parameters $flow.card_status_active, $flow.card_status_lock_temp, and $flow.card_status_lock_permanent. For more information, see Input parameters. string
$flow.lock_reason Indicates the reason the user requested the card to be locked. Valid values are defined by the prebuilt_components_lost_and_stolen_lock_reason custom entity. By default "damaged", "stolen", "lost", and "others" are supported. string

API response parameters

The component retrieves the following parameters from the API response:

Parameter Name Description Output Format
ticket_number The ticket number for the created lock card request. integer

To configure the Lock card webhook for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Manage tab.
  5. Click Webhooks.
  6. Select the prebuilt_components_lost_and_stolen_card:lock_card_ticket_number webhook.
  7. 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.
  8. Review and update the Request body to form the proper request format for your webhook.
  9. 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.
  10. Review and update the Authentication settings as needed.
  11. Click Save.

Reissue card

The component uses the prebuilt_components_lost_and_stolen_card:reissue_card_number webhook to create a request to reissue a new or upgraded card.

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
$session.params.last_four_digit_of_card_number The last four digits of the card number the user requested to lock. string
zip_code The zip code registered to the user's account. string
card_upgrade Indicates whether the user selected to upgrade their card. boolean
card_upgrade_type Specifies the type of card upgrade selected by the user. For example, "gold" or "platinum". If card_upgrade is false, this parameter is not required. string

API response parameters

The component retrieves the following parameters from the API response:

Parameter Name Description Output Format
acknowledgement_number The ticket number for the created reissue card request. integer

To configure the Reissue card webhook for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Manage tab.
  5. Click Webhooks.
  6. Select the prebuilt_components_lost_and_stolen_card:reissue_card_number webhook.
  7. 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.
  8. Review and update the Request body to form the proper request format for your webhook.
  9. 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.
  10. Review and update the Authentication settings as needed.
  11. Click Save.

Complete

The prebuilt component and its webhooks are now set up and ready to test.