Format Converters

Powerful tools for converting between different data formats in NICE CXone contact centers

Introduction

CX Tools' Format Converters provide a comprehensive suite of utilities to transform data between various formats commonly used in NICE CXone contact center development. These tools streamline the process of working with different data structures, making it easier to integrate external systems, format data for reports, and implement complex data flows in your Studio scripts.

Whether you're working with CSV files, JSON APIs, Excel spreadsheets, or Studio-specific formats like CHAR#, our converters provide a fast, reliable way to transform your data with minimal effort.

Available Converters

JSON Return Converter

Convert JSON responses to Studio JSON Return format. This tool automatically generates variable names following Studio conventions and handles array indexing.

Use case: Processing API responses in NICE CXone Studio scripts.

CSV to JSON Converter

Transform CSV files or data into structured JSON format. Options for header row handling, delimiter customization, and output formatting.

Use case: Converting customer data, call lists, or configuration data from spreadsheets to API-compatible formats.

Excel to JSON Converter

Convert Excel files directly to JSON format. Supports multiple worksheets, cell formatting, and complex data structures.

Use case: Converting complex configuration spreadsheets to structured data for Studio scripts.

JSON to CHAR# Converter

Transform JSON objects to Studio's CHAR# variable format, making it easy to store complex data in Studio variables.

Use case: Storing configuration data or API responses in Studio variables.

cURL to Dynamic Converter

Convert cURL commands to NICE CXone Studio DYNAMIC format for easy implementation of API calls in your scripts.

Use case: Quickly implementing API calls from documentation examples or Postman exports.

JSON to Dynamic Converter

Convert JSON request bodies to NICE CXone Studio DYNAMIC format for implementation in your Studio scripts.

Use case: Implementing API requests with JSON payloads in Studio scripts.

Base64 Encoder/Decoder

Encode or decode Base64 data, useful for handling binary data in Studio scripts or working with certain API requirements.

Use case: Working with image data, authentication headers, or encoded payloads.

JSON Return Converter

The JSON Return Converter transforms standard JSON responses into Studio-compatible format, automatically handling variable naming conventions, array indexing, and nested structures.

How to Use

  1. Paste your JSON response in the input field
  2. Configure options:
    • Variable Prefix: Add a custom prefix to all variable names
    • Array Handling: Choose how arrays should be processed
    • Nested Object Handling: Determine how nested objects are formatted
  3. Click "Convert" to generate the Studio-compatible JSON Return format
  4. Copy the result directly into your Studio script

Example

Input (Standard JSON):

{
  "customer": {
    "id": "12345",
    "name": "John Doe",
    "balance": 150.75,
    "status": "active"
  },
  "accounts": [
    {
      "type": "savings",
      "number": "S-001",
      "balance": 125.50
    },
    {
      "type": "checking",
      "number": "C-001",
      "balance": 25.25
    }
  ]
}

Output (Studio JSON Return):

return {
  customer_id = "12345",
  customer_name = "John Doe",
  customer_balance = 150.75,
  customer_status = "active",
  accounts_0_type = "savings",
  accounts_0_number = "S-001",
  accounts_0_balance = 125.50,
  accounts_1_type = "checking",
  accounts_1_number = "C-001",
  accounts_1_balance = 25.25,
  accounts_length = 2
}

CSV to JSON Converter

The CSV to JSON Converter transforms comma-separated values into structured JSON objects, with options for handling headers, delimiters, and output formatting.

How to Use

  1. Upload a CSV file or paste CSV data into the input field
  2. Configure options:
    • First Row as Headers: Use the first row as property names
    • Delimiter: Specify the delimiter character (comma, tab, semicolon, etc.)
    • Output Format: Choose between array of objects or object with keys
  3. Click "Convert" to generate the JSON output
  4. Copy or download the result

Example

Input (CSV):

name,email,phone,status
John Doe,john@example.com,555-123-4567,active
Jane Smith,jane@example.com,555-987-6543,inactive
Bob Johnson,bob@example.com,555-567-8901,pending

Output (JSON):

[
  {
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "555-123-4567",
    "status": "active"
  },
  {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "phone": "555-987-6543",
    "status": "inactive"
  },
  {
    "name": "Bob Johnson",
    "email": "bob@example.com",
    "phone": "555-567-8901",
    "status": "pending"
  }
]

cURL to Dynamic Converter

This converter transforms cURL commands into Studio DYNAMIC blocks, making it easy to implement API calls from documentation examples or Postman exports directly in your Studio scripts.

How to Use

  1. Paste a cURL command in the input field
  2. Click "Convert" to generate the DYNAMIC script
  3. Copy the result directly into your Studio script's DYNAMIC block

Example

Input (cURL):

curl -X POST \
  https://api.example.com/v1/customers \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer abc123' \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "555-123-4567"
}'

Output (DYNAMIC):

DYNAMIC request

method = "POST"
serviceRequestURI = "https://api.example.com/v1/customers"

// Headers
headers.Content-Type = "application/json"
headers.Authorization = "Bearer abc123"

// Convert headers for Studio compatibility
reqHdrsStr = "{headers.asJSON()}"

// Request Body
reqBody = '{"name":"John Doe","email":"john@example.com","phone":"555-123-4567"}'

Best Practices

Data Validation

Always validate your converted data to ensure it meets your script's expectations:

  • Check for required fields
  • Validate data types (numbers, strings, booleans)
  • Handle potential error cases gracefully
  • Test with representative sample data

Variable Naming

Use consistent variable naming conventions in your Studio scripts:

  • Add descriptive prefixes to group related variables
  • Use underscores to separate words and levels
  • Be mindful of Studio's case sensitivity
  • Document complex data structures

Performance Considerations

Be mindful of performance when working with large data sets:

  • Filter data before conversion when possible
  • Break very large files into smaller chunks
  • Consider server-side processing for large datasets
  • Monitor script execution times

Security Considerations

Follow security best practices when handling sensitive data:

  • Never include authentication credentials in shared code
  • Sanitize input data before processing
  • Be cautious with PII (Personally Identifiable Information)
  • Use secure transport methods (HTTPS)

Frequently Asked Questions

Is there a limit to the size of files I can convert?

Web-based converters have a practical limit of approximately 10MB for file uploads. For larger files, we recommend breaking them into smaller chunks or using the API for server-to-server processing.

Can I save converter configurations for repeated use?

Yes, Pro users can save converter configurations as templates for quick access. This is particularly useful for regularly processing files with consistent formats or configurations.

How do the converters handle special characters?

All converters properly handle special characters, including international characters, quotes, and escape sequences. The converters use UTF-8 encoding by default, ensuring comprehensive character support.

Are the conversions performed on my local machine or your servers?

For security and performance, most conversions are performed entirely in your browser. Your data doesn't leave your computer unless you specifically use the API for server-side processing. This ensures your sensitive data remains secure.

Related Documentation