Last updated

Value lists

Use value lists to compare against a list of data when setting conditions for rules or binds, or applying filters to data table segments. Commonly used lists contain values related to conditions that target specific properties such as: customers, transactions, or BINs.

Value list conditions:

  • is in list: The selected value must be in a specified list.
  • is not in list: The selected value must not be in a specified list.
  • is empty or is in list: The selected value must empty or in a specified list.
  • is empty or is not in list: The selected value must empty or not in a specified list.

Create a value list

Use this process to create a value list.

  1. In the left navigation bar, click Automations .
  2. In the Rules engine section, click Value lists.
  3. Click Create value list.
  4. In the Description field, enter a list name. The ID field is populated automatically.
  5. In the List values section, enter list values, or click Upload CSV to upload them.
  6. Click Save value list.

Use a value list in a rule or bind

This process describes how to use value lists when setting conditions in a rule or bind.

  1. Create a value list.
  2. Configure a rule or bind. In the Conditions section, clear the No conditions checkbox.
  3. In the Filter dropdown, select a filter.
  4. In the Operation dropdown, select from the following:
    • is in list: Values must be in a specified list.
    • is not in list: Values must not be in a specified list.
    • is empty or is in list: Values must be empty or in a specified list.
    • is empty or is not in list: Values must be empty or not in a specified list.
  5. In the Value field, select or add the related list. For more information, see Rule and binds.

Use a value list in a filter or segment

This process describes how to use a value list to apply filters in a data tables segment.

  1. Create a value list.
  2. In the left navigation bar, click Data tables, click Customers, Payments, Billing, or Logs, then select a segment.
  3. In the top right of the table, click Filters .
  4. In the Filter dropdown, select a value to filter.
  5. In the Operation dropdown, select from the following conditions:
    • is in list: Values must be in a specified list.
    • is not in list: Values must not be in a specified list.
    • is empty or is in list: Values must empty or in a specified list.
    • is empty or is not in list: Values must empty or not in a specified list.
  6. In the Value field, select a value list.
  7. Click Apply filter.
  8. Optionally, to save the filtered data to the active segment, click Save.
  9. Optionally, to create a new segment based on the filtered data, click Save segment as, enter a name for the new segment, and then click Save.

Manage value lists using the Rebilly API

For information on how to manage lists using the Rebilly API, see Lists.

Manage value lists using the Rebilly PHP SDK

The following example describes how to search a list by name using the Rebilly PHP SDK.

$lists = $client->valuesLists()->search([
    'filter' => 'name:testName',
]);

The following example describes how to create a list with a predefined ID using the Rebilly PHP SDK.

$listForm = new Rebilly\Entities\ValuesList();
$listForm->setName('listName');
$listForm->setValues([
        're',
        'bil',
        'ly'
]);
try {
    $invoice = $client->valuesLists()->create($listForm, 'testListId');
} catch (UnprocessableEntityException $e) {
    echo $e->getMessage();
}

Empty conditions

Use the empty condition option to match conditions where a value is null, not in a specified value or range, or not in a specified value list.

The empty condition is an option when creating a rule or bind. If an event matches the condition, the rule, or bind is executed.

For example, if an event has the 'is empty or is in' criteria configured for the country ID: 'CA'. And, has the 'transaction > payment card > bank country' filter applied. This rule or bind will only execute when the bank country ID, related to a payment card, is null or is in Canada (CA is the country code for Canada).

Empty condition rule or bind conditions:

  • is empty: the selected value must be null.
  • is not empty: the selected value must not be null.
  • is empty or is in: the selected value must be null or within a specified value or range.
  • is empty or is not in: the selected value must be null or not within a specified value or range.
  • is empty or is in list: the selected value must empty or not in a specified value list.
  • is empty or is not in list: the selected value must empty or not in a specified value list.