Generate credit card number

The Generate credit card number masking activity allows you to generate a credit card number of several different types.

Table of contents
Usage
Example
Properties

Usage

To use the Generate credit card number masking activity, it must be placed inside a table masking activity or a similar activity that iterates over data. Once placed, select the property you want to mask. Lastly, select the credit card number type you want to generate. Available credit card types are the following:

  • Any credit card
  • American Express
  • Australian BankCard
  • Diners Club Carte Blanche
  • Diners Club International
  • Diners Club US & Canada
  • Discover Card
  • JCB
  • Maestro
  • MasterCard
  • Visa
  • Visa Electron

Additionally, you can set the EnforceUnique property to make sure every generated credit card number is unique.

Example

In this example we want to mask credit card numbers in the CreditCard table, so first we place the CreditCard masking activity into opened Package.xaml and put the Generate credit card numbers masking activity within it. Once placed, we select the Number property. Lastly, we select the credit card number type that we want to generate. In this case we don't have a preference, so we choose Any credit card.

Generating credit card numbers Figure 1: Generating credit card numbers

Properties

Property group Property name Description Example
Input properties CreditCardType Type of credit card that activity will generate. Choose property from dropdown.
DataItemProperty The property to mask. Write x => x.Number or choose property from the dropdown list
EnforceUnique If true, random selection should select unique values. true or false
Input: Filter Filter Expression used for filtering records - only filtered items will be masked. x => x.Number.StartsWith("000")
SkipDefaultValues If true, default values will be omitted in masking (i.e. null values are not masked). true or false
Input: Repeating RepeaterId The ID of the repeater that will be used to detect repeating and save results when masking item key repeats. GenerateCreditCardNumberRepeater
RepeatingKey Key to use for repeating detection. Write x => CompositeKey.Create(x.Number) or choose properties from the pop-up window
Misc DisplayName Display name of the activity in the workflow. Generate credit card number
Result Contains the masking definition object. It's a part of the masking infrastructure and should be ignored. -