Testing & Playground

Test your messages and workflows in a safe environment

Overview

The Testing & Playground environment includes:

  • Message Preview: See how your messages will look on different devices
  • Workflow Testing: Test complete workflows with your personal number
  • Channel Capability Checking: Verify RCS support for phone numbers
  • API Testing: Test API calls and webhook integrations
  • Development Tools: Debug and troubleshoot your messaging campaigns

Message Preview

Preview Your Messages

Before sending messages to customers, preview how they’ll appear:

Text Messages

  • RCS Preview: See how text messages look in RCS format
  • SMS Fallback: Preview the SMS version for non-RCS devices
  • Interactive Elements: Test button layouts and functionality
  • Responsive Design: Check how messages adapt to different screen sizes

Rich Cards

  • Card Layout: Preview card orientation, height, and thumbnail position
  • Media Display: See how images and videos appear
  • Button Placement: Test local and global suggestion positioning
  • Content Formatting: Verify title, description, and media alignment

Carousels

  • Carousel Width: Test small and medium carousel sizes
  • Item Scrolling: Preview horizontal scrolling behavior
  • Multiple Items: See how multiple cards display together
  • Global Actions: Test carousel-wide button functionality

Workflow Testing

Test Complete Workflows

Test your automated workflows end-to-end:

Test Execution

  1. Select Workflow: Choose the workflow you want to test
  2. Enter Test Number: Use your personal phone number for testing
  3. Set Variables: Configure test variables and data
  4. Execute Test: Run the workflow and monitor execution
  5. Review Results: Check execution logs and results

Test Configuration

1// Test workflow with custom variables
2const testConfig = {
3 phoneNumber: "15552223333", // Your test number
4 variables: {
5 customerName: "Test Customer",
6 orderId: "TEST-12345",
7 discountCode: "TEST20"
8 },
9 settings: {
10 channelOverride: "RCS" // Force RCS for testing
11 }
12};
13
14// Execute test workflow
15const result = await client.workflows.executeWorkflowSingle(
16 "workflow-definition-id",
17 testConfig.phoneNumber,
18 {
19 variables: testConfig.variables,
20 settings: testConfig.settings
21 }
22);

Test Monitoring

  • Real-time Execution: Watch workflow execution in real-time
  • Node-by-Node Tracking: Monitor each workflow node
  • Variable Inspection: Check variable values at each step
  • Error Detection: Identify and debug workflow issues

Workflow Debugging

Execution Logs

  • Detailed Logs: Complete execution history
  • Node Transitions: Track flow between nodes
  • Variable Changes: Monitor variable updates
  • Error Details: Detailed error information

Debug Tools

  • Step-by-Step Execution: Execute workflows one node at a time
  • Variable Inspection: Check variable values at any point
  • Condition Testing: Test conditional logic
  • Performance Analysis: Monitor execution times

Channel Capability Checking

Check RCS Support

Verify which messaging channels are supported for specific phone numbers:

Capability Check

1// Check channel support for a phone number
2async function checkChannelSupport() {
3 try {
4 const support = await client.channels.checkSupport(
5 "15552223333", // Phone number to check
6 "YourBrand" // Your sender ID
7 );
8
9 console.log("RCS Support:", support.rcs);
10 console.log("SMS Support:", support.sms);
11
12 if (support.rcs) {
13 console.log("This number supports RCS messaging");
14 } else {
15 console.log("This number will receive SMS fallback");
16 }
17 } catch (error) {
18 console.error("Error checking channel support:", error);
19 }
20}

API Testing

Test API Endpoints

Test your API integrations in a safe environment:

Message Sending Test

1// Test sending a message
2async function testMessageSending() {
3 try {
4 const result = await client.messages.send({
5 clientRef: "test-message-" + Date.now(),
6 recipientPhoneNumber: "15552223333", // Your test number
7 content: {
8 rcs: {
9 content: {
10 type: "TEXT",
11 content: "This is a test message from Smobi",
12 globalSuggestions: [
13 {
14 id: "test-reply",
15 text: "Test Reply",
16 type: "REPLY"
17 }
18 ]
19 }
20 },
21 sms: {
22 content: "This is a test message from Smobi"
23 }
24 }
25 });
26
27 console.log("Test message sent:", result.smobiMessageId);
28 console.log("Status:", result.status);
29
30 return result;
31 } catch (error) {
32 console.error("Test message failed:", error);
33 throw error;
34 }
35}

Workflow Execution Test

1// Test workflow execution
2async function testWorkflowExecution() {
3 try {
4 const result = await client.workflows.executeWorkflowSingle(
5 "test-workflow-id",
6 "15552223333",
7 {
8 variables: {
9 testMode: true,
10 customerName: "Test User",
11 testScenario: "welcome-flow"
12 }
13 }
14 );
15
16 console.log("Test workflow executed:", result.workflowExecutionId);
17 console.log("Success:", result.success);
18
19 return result;
20 } catch (error) {
21 console.error("Test workflow failed:", error);
22 throw error;
23 }
24}

Next Steps