Creating Leads

Learn how to use Vrio orders as leads for better tracking, reporting, and conversion optimization with tracking variables and order abandonment.

Many CRMs have separate endpoints for leads versus customers. While Vrio has a Customer endpoint, we recommend creating an order as a lead or partial instead of just creating a customer record.

Creating an order (even before payment) gives you powerful advantages:

  • Tracking Variables - Track marketing source, campaign data, and custom variables
  • Lead Reports - Access detailed reporting on lead sources and conversion rates
  • Order Abandonment - Automatically trigger follow-up communications for incomplete orders
  • Future Processing - Complete the payment later using multi-step order processing
  • Better Attribution - Understand which marketing channels drive the most leads
Key Insight

Tracking variables exist on orders, not on customer records. If you only create a customer, you lose the ability to track where that lead came from, what campaign brought them in, or trigger automated follow-up.


Creating an Order as a Lead

When creating an order as a lead, you create the order without processing payment. This creates a "partial" order that can be completed later.

At a minimum, an order requires:

  • email - Customer email address
  • connection_id - Found on the Connections page in your Vrio admin
  • campaign_id - The campaign containing your configuration

Example: Create a Lead Order

curl -X "POST" "https://api.vrio.app/orders" \
  -H 'X-Api-Key: YOUR_VRIO_API_KEY' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "connection_id": 1,
    "campaign_id": 1,
    "email": "[email protected]",
    "tracking1": "facebook",
    "tracking2": "summer-2024",
    "tracking3": "ad_12345"
  }'

This creates an order in a "partial" state without processing payment. The order can be processed later when you're ready.


Benefits of Order-Based Lead Tracking

Tracking Variables for Attribution

Orders support tracking variables that let you capture critical marketing data:

  • UTM parameters from your marketing campaigns
  • Affiliate IDs
  • Ad campaign identifiers
  • Custom business logic variables
  • A/B test variations

→ Learn more: Tracking Variables

Lead Reports and Analytics

Orders appear in Vrio's reporting system, giving you insights into:

  • Lead volume by source
  • Conversion rates by campaign
  • Time-to-conversion metrics
  • Lead quality by channel
  • Revenue attribution

→ Learn more: Reporting

Order Abandonment Events

When you create an order without processing payment (status "Partial"), you can leverage the campaign's abandonment delay setting to trigger automated workflows.

Set an Order Abandonment Delay (in minutes) in your campaign's Marketing & Tracking settings. When a partial order reaches this delay threshold without being processed, an abandonment event is created. This event can be sent to your webhook endpoint for custom processing.

→ Learn more: Campaign Marketing & Tracking

→ Learn more: Webhooks


Processing the Order Later

Once you've created the order as a lead, you can complete the payment when the customer is ready. You can include shipping address and billing information at this stage.

curl -X "POST" "https://api.vrio.app/orders/ORDER_ID/process" \
  -H 'X-Api-Key: YOUR_VRIO_API_KEY' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "ship_fname": "John",
    "ship_lname": "Doe",
    "ship_address1": "123 Main St",
    "ship_city": "New York",
    "ship_state": "NY",
    "ship_country": "US",
    "ship_zipcode": "10001",
    "same_address": true,
    "card_type_id": 1,
    "payment_method_id": 1,
    "card_number": "4111111111111111",
    "card_exp_month": 12,
    "card_exp_year": 2025,
    "card_cvv": 123
  }'

→ Learn more: Multi-Step Order Processing


Related Documentation