Credit card number collection prebuilt component

This prebuilt component captures an 8 to 19 digit credit card number. Captured credit card numbers are validated using the Luhn algorithm.

Limitations

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

  • Payment gateway integration is not included in the component.
  • Credit card numbers shorter than 8 or longer than 19 digits are not supported.

Enable DTMF to allow users to input numeric values using the telephone keypad.

Additional features

The following additional functionalities are provided by this prebuilt component:

Sample dialogs

The following sample dialogs demonstrate common scenarios handled by this prebuilt component. The sample dialogs demonstrate behavior when the component is called via telephony, which triggers the Default Welcome Intent and the first agent response at the start of the conversation.

Single chunk

End-user provides the entire credit card number in the first turn; agent successfully validates and accepts it.

User input Agent response
Please say or enter the first part of your credit card number. You can say "play back" at any time to hear the current collected numbers.
4242 4242 4242 4242
I got 4242424242424242, is that correct?
yes
Please say or enter the next part of your credit card number, or say "that's all" if you are done.
That's all
To do a final confirmation with you, the credit card number I have got is 4242424242424242, is that correct?
yes
Thank you, your credit card number has been successfully verified.

Multiple chunks

End-user provides credit card number in three chunks; agent validates and accepts it.

User input Agent response
Please say or enter the first part of your credit card number. You can say "play back" at any time to hear the current collected numbers.
4242
I got 4242, is that correct?
yes
Please say or enter the next part of your credit card number, or say "that's all" if you are done.
424242
I got 424242, is that correct?
yes
Please say or enter the next part of your credit card number, or say "that's all" if you are done.
424242
I got 424242, is that correct?
yes
Please say or enter the next part of your credit card number, or say "that's all" if you are done.
done
To do a final confirmation with you, the credit card number I have got is 4242424242424242, is that correct?
yes
Thank you, your credit card number has been successfully verified.

Successful retry

End-user provides the entire credit card number in the first turn; agent re-confirms it but end-user says "no". Agent asks end-user to provide the input again. End-user provides and confirms the number and agent successfully validates and accepts it.

User input Agent response
Please say or enter the first part of your credit card number. You can say "play back" at any time to hear the current collected numbers.
5105105105105100
I got 5105105105105101, is that correct?
no
No problem, please repeat the credit card number or try saying four digits at a time
5105105105105100
I got 5105105105105100, is that correct?
yes
Please say or enter the next part of your credit card number, or say "that's all" if you are done.
That's all
To do a final confirmation with you, the credit card number I have got is 5105105105105100, is that correct?
yes
Thank you, your credit card number has been successfully verified.

Unrecognized input

Component exits the flow after the end-user provides unrecognized input three times.

User input Agent response
Please say or enter the first part of your credit card number. You can say "play back" at any time to hear the current collected numbers.
It's fine
Sorry, I didn't get that. Can you please say or enter the credit card number again?
It's fine
Hmm, I still wasn't able to get that. Please make sure you're saying the credit card number. You can also use the keypad to enter the credit card number.
It's fine
Sorry, I'm having difficulty understanding your response.

Credit card number validation

Valid credit card numbers must be between 8 and 19 digits long. This component also validates credit card numbers using the Luhn algorithm using the IS_CREDIT_CARD_NUMBER system function.

Naming conventions

This prebuilt component uses the following naming conventions:

Feature Format Example
Flow [Component Name] Credit Card Number Collection
Component Specific Intent prebuilt_components_[component_name]_[intent_name] prebuilt_components_credit_card_number_collection_credit_card_sequence
Parameter [param_name] user_provided_new_seq

Output parameters

Output parameters are session parameters that will 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
credit_card_status This parameter indicates the collected credit card number's validity using Luhn algorithm:
"valid" indicates that the collected credit card number has been successfully validated and it is between 8 and 19 digits in length
"invalid" indicates that the collected credit card number is invalid or it is not between 8 to 19 digits in length
string
credit_card_number_collection_credit_card_number This parameter returns the credit card number captured by the component string

Basic setup

To set up this prebuilt component:

  1. Import the prebuilt component.

Complete

Your agent should now be set up and ready to test.