Skip to main content
Advanced A/B Testing routes calls according to customer data instead of relying only on random traffic distribution. For example, you can send enterprise customers to one agent version, route Hindi-speaking customers to Hindi versions, and use the standard A/B test for everyone else.

Standard versus Advanced A/B Testing

Both tests can be enabled at the same time. Advanced rules run first. If no advanced rule matches, CallKaro continues to the standard A/B test and published-version lookup.

Before you start

  • Create the agent versions you want to route calls to.
  • Include the values used by your conditions in the call’s metadata object.
See Agent Versions and Create Outbound Call for details.

Configure an Advanced A/B Test

  1. Open your agent.
  2. Open Manage Versions.
  3. Select Advanced A/B Test.
  4. Enter the condition for the first IF block.
  5. Choose whether the block returns a Version or a Language.
  6. Select one target, or choose a split and assign percentages to multiple targets.
  7. Add ELSE IF rules for additional customer groups.
  8. Optionally add an ELSE block to handle every remaining call.
  9. Open Test & Preview and enter sample metadata on your conditions.
  10. Select Save & Enable.
Rules are evaluated from top to bottom. The first matching block wins, and all later blocks are skipped.

Write conditions

Every comparison must be wrapped in parentheses and must contain at least one metadata.variable_name value.
Combine comparisons by wrapping the complete expression in another pair of parentheses:
Supported comparison operators: Use uppercase AND or OR. Do not mix AND and OR at the same bracket level; add brackets to make the intended order explicit.
Text comparisons are case-insensitive. Numeric-looking values are compared as numbers. A missing metadata value does not match ==, >, <, >=, or <=, but it does match != when compared with a present value.

Choose what a rule returns

Return a version

The selected agent version runs the call immediately. This bypasses the standard A/B test and published-version lookup. Use this when the rule identifies the exact prompt and configuration that should handle the customer.

Return a language

The rule changes the call language, then CallKaro selects a version using this order:
  1. Standard A/B test versions for that language.
  2. The published version for that language.
  3. The agent’s default-language configuration if no suitable version is available.
Use this when multiple versions can handle the selected language.

Split traffic inside a rule

A matching block can return multiple versions or languages. Assign a percentage to each target; all shares must be whole numbers greater than zero and total exactly 100%. For example, an enterprise rule could send:
  • 70% of matching calls to Enterprise v2.
  • 30% of matching calls to Enterprise v3.
The target is drawn again for each call. Advanced version splits do not keep a customer on the same version for future calls.

Routing priority

CallKaro resolves the version in this order:
  1. A version explicitly supplied with the call request.
  2. The first matching Advanced A/B rule.
  3. An eligible previous version for repeat-caller handling.
  4. The standard ratio-based A/B test for the selected language.
  5. The published version for the selected language.
  6. The default-language fallback.
An explicitly supplied version always bypasses Advanced A/B Testing.

Test before enabling

The Test & Preview tab evaluates the unsaved rules using sample call metadata. You can enter values manually, use saved metadata presets, or import JSON, CSV, or Excel data. The preview shows:
  • Which rules matched, did not match, or were skipped.
  • Which block won.
  • The version or language targets returned by that block.
  • A sample weighted result when the block contains a split.
The preview uses the same condition grammar and comparison behavior as live call routing.

Edit or disable the test

Return to Manage Versions and select Edit Advanced A/B Test to change the rules. Selecting Disable stops rule evaluation but keeps the configuration so it can be enabled again later. Versions referenced by saved rules cannot be deleted or deactivated, even while the test is disabled. Remove the version from every advanced rule before deleting or deactivating it.

Availability and limitations

Advanced A/B routing currently applies to direct API calls, regular outbound calls, and inbound agent resolution. Batch calls and WhatsApp agent resolution continue to use their existing version-selection behavior.
  • Direct and regular outbound calls can evaluate the metadata supplied with the request.
  • Inbound routing does not currently receive call metadata. An ELSE block provides the most predictable inbound fallback.
  • If no rule matches and there is no ELSE block, the call continues through standard A/B and published-version resolution.

Example

Suppose an agent has three active versions:
  • Enterprise English
  • Standard English
  • Hindi Sales
Configure the rules as follows: For this call metadata:
The first rule wins and the call uses Enterprise English. The second rule is not evaluated after the first match.