> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blueberry.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DM Sandbox

> Test and refine how Blueberry responds to customer conversations

## Overview

The DM Sandbox is your testing environment for refining Blueberry's AI responses. Replay historical conversations, create test scenarios, and save conversation snapshots to verify and improve how Blueberry handles different customer interactions.

<Info>
  Think of the Sandbox as your campaign quality assurance lab - catch issues before they reach
  customers and ensure perfect execution every time.
</Info>

## Sandbox Capabilities

<CardGroup cols={3}>
  <Card title="Replay Conversations" icon="clock-rotate-left">
    Load real DM threads and replay them to see how Blueberry would respond at
    different points in the conversation.
  </Card>

  <Card title="Save Snapshots" icon="camera">
    Save conversation snapshots at specific points to repeatedly test and refine responses.
  </Card>

  <Card title="Create Test Conversations" icon="message-pen">
    Build custom test conversations from scratch to verify how Blueberry handles
    different scenarios.
  </Card>
</CardGroup>

## Accessing the Sandbox

<Steps>
  <Step title="Navigate to Sandbox">
    Click **Sandbox** in the sidebar navigation or go to **DMs** → **Test Sandbox**.
  </Step>

  <Step title="Choose Your Testing Method">
    Select one of three options: - Load a real conversation thread - Load a saved snapshot - Start
    from scratch
  </Step>

  <Step title="Test Responses">
    Interact with the conversation explorer to test how Blueberry would respond at different points.
  </Step>
</Steps>

## How to Use the Sandbox

<Tabs>
  <Tab title="Replay Conversations" icon="clock-rotate-left">
    Load a real DM thread and test how Blueberry would respond at different points in the conversation.

    <Steps>
      <Step title="Select Thread">
        Click the **Threads** tab in the sidebar and select a DM conversation from your inbox.
      </Step>

      <Step title="View Conversation">
        The original conversation appears on the left panel. You can see all messages exchanged between your brand and the customer.
      </Step>

      <Step title="Test from Any Point">
        Click **"Copy from here"** on any customer message to test how Blueberry would respond from that point forward.
      </Step>

      <Step title="Generate Response">
        Click **"Generate next message"** to see what Blueberry would respond. The response appears in the right panel.
      </Step>

      <Step title="Continue Testing">
        Add follow-up customer messages and continue generating responses to test multi-turn conversations.
      </Step>
    </Steps>

    <Tip>
      Use **"Regenerate from"** on any message in the original conversation to test alternative response paths.
    </Tip>
  </Tab>

  <Tab title="Save Snapshots" icon="camera">
    Save conversation snapshots at specific points for repeated testing and collaboration.

    <Steps>
      <Step title="Create Snapshot">
        While viewing a thread or testing a conversation, click **"Save snapshot"** on any message to capture the conversation up to that point.
      </Step>

      <Step title="Name Your Snapshot">
        Give the snapshot a descriptive name like "VIP customer complaint" or "Product inquiry - pricing question".
      </Step>

      <Step title="Load Snapshot">
        Click the **Snapshots** tab in the sidebar to see all saved snapshots. Select one to load it.
      </Step>

      <Step title="Test Repeatedly">
        Use snapshots to consistently test the same scenario after updating your brand voice or documentation.
      </Step>
    </Steps>

    <Info>
      Snapshots are perfect for regression testing - verify Blueberry still handles important scenarios correctly after making changes.
    </Info>
  </Tab>

  <Tab title="Create from Scratch" icon="message-pen">
    Build custom test conversations to verify Blueberry handles specific scenarios.

    <Steps>
      <Step title="Start New Conversation">
        Click **"Start from scratch"** to create a blank test conversation.
      </Step>

      <Step title="Add Customer Message">
        Type a customer message to test how Blueberry would respond. For example: "Do you offer refunds?"
      </Step>

      <Step title="Generate Response">
        Click **"Generate next message"** to see Blueberry's response.
      </Step>

      <Step title="Build Conversation">
        Continue adding customer messages and generating responses to test complex conversation flows.
      </Step>

      <Step title="Edit and Refine">
        Edit any message in the conversation to test different variations and edge cases.
      </Step>
    </Steps>

    <Tip>
      Create conversations for common customer scenarios like returns, shipping questions, or product inquiries to ensure Blueberry handles them well.
    </Tip>
  </Tab>
</Tabs>

## Key Features

<AccordionGroup>
  <Accordion title="Response Testing" icon="comment-dots">
    Test how Blueberry's AI would respond to any customer message based on your brand voice and documentation.

    * See generated responses in real-time
    * View reasoning behind each response
    * Test multi-turn conversations
    * Edit messages and regenerate to test variations
  </Accordion>

  <Accordion title="Conversation Explorer" icon="compass">
    Navigate through conversations with powerful tools:

    * **Copy from here** - Test from any point in a conversation
    * **Regenerate from** - Generate alternative responses from historical messages
    * **Reset** - Clear the test panel and start fresh
    * **Save snapshot** - Capture conversation state for future testing
  </Accordion>

  <Accordion title="Message Editing" icon="pen">
    Edit any message in the conversation to test different scenarios:

    * Modify customer messages to test edge cases
    * Test different phrasings and tones
    * Add or remove context to see how it affects responses
    * Build complex conversation flows
  </Accordion>

  <Accordion title="Real Contact Context" icon="user">
    When testing with real threads, Blueberry uses actual contact information:

    * Previous conversation history
    * Contact metadata and attributes
    * Real brand voice and documentation
    * Campaign context if applicable
  </Accordion>
</AccordionGroup>

## Best Practices

<CardGroup cols={2}>
  <Card title="Test Regularly" icon="calendar-check">
    Test responses after any changes to brand voice, documentation, or rules. Save snapshots of important scenarios for regression testing.
  </Card>

  <Card title="Test Edge Cases" icon="triangle-exclamation">
    Don't just test happy paths. Test unusual requests, angry customers, and confusing messages to
    ensure Blueberry handles them gracefully.
  </Card>

  <Card title="Use Real Conversations" icon="messages">
    Load actual customer threads to test real-world scenarios. This gives you the most accurate
    testing context.
  </Card>

  <Card title="Save Important Scenarios" icon="bookmark">
    Create snapshots for critical conversation types like returns, complaints, and product inquiries to test repeatedly.
  </Card>
</CardGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Does the sandbox actually send messages?" icon="circle-question">
    No. The sandbox only generates and previews responses. No messages are sent to real customers.
  </Accordion>

  <Accordion title="What happens when I click 'Generate next message'?" icon="circle-question">
    Blueberry analyzes the conversation context, your brand voice, and documentation to generate an AI
    response.
  </Accordion>

  <Accordion title="Do snapshots update when the original conversation changes?" icon="circle-question">
    No. Snapshots are static captures of a conversation at a specific point in time. They won't change
    even if the original thread receives new messages.
  </Accordion>

  <Accordion title="Can I share snapshots with my team?" icon="circle-question">
    Yes. All team members with access to your brand can see and load saved snapshots. This is useful
    for training and ensuring consistent response quality.
  </Accordion>

  <Accordion title="Why does Blueberry say 'No response needed'?" icon="circle-question">
    Blueberry may decide not to respond if: - The customer's message doesn't require a response (e.g.,
    "Thanks!") - The conversation has naturally concluded - The message is unclear and needs
    clarification from the customer
  </Accordion>

  <Accordion title="Can I test with contacts from specific segments?" icon="circle-question">
    Yes, when loading real threads. The sandbox uses actual contact data including segment memberships, interaction history, and attributes.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Brand Voice" icon="microphone" href="/brand/knowledge-base">
    Set up your brand voice and documentation to improve AI responses.
  </Card>

  <Card title="DM Inbox" icon="inbox" href="/inbox/dms">
    Manage real customer conversations in the DM inbox.
  </Card>

  <Card title="Campaign Types" icon="paper-plane" href="/dms/campaigns/types">
    Learn about different DM campaign objectives and when to use each.
  </Card>

  <Card title="Rules Engine" icon="gears" href="/comments/rules-engine">
    Set up automated rules for handling comments and DMs.
  </Card>
</CardGroup>
