get-all-message-templates

Description

Retrieves all available message templates configured in Detect. Message templates define the message format for different destination types (Journey, Interact, CDP, Generic). Use this command to identify which templateId to use when creating destinations.

Syntax

Windows:

CliTool.bat get-all-message-templates

Linux :

./CliTool.sh get-all-message-templates

Parameters

This command does not require any parameters.

Example Execution

./CliTool.sh get-all-message-templates

Sample Output

Success:

Found 4 message templates:
Template ID: 1, Name: Journey, Type: JOURNEY
Template ID: 2, Name: Interact, Type: INTERACT
Template ID: 3, Name: CDP, Type: CDP
Template ID: 4, Name: Generic, Type: GENERIC

No Templates:


Found 0 message templates:

Understanding Template IDs

Template ID Name Type Use Case
1 Journey JOURNEY Publishing customer journey events to HCL Journey
2 Interact INTERACT Sending real-time offer requests to HCL Interact
3 CDP CDP Synchronizing events to Customer Data Platforms
4 Generic Generic User-defined generic message formats

Use Cases

  1. Before Creating Destination
    # Check available templates
       ./CliTool.sh get-all-message-templates
       
       # Use appropriate templateId in destination JSON
       # Example: templateId: 1 for Journey destination
  1. Documentation and Planning
    
       # List templates for deployment documentation
       ./CliTool.sh get-all-message-templates > message-templates-inventory.txt

Exit Codes

  • 0 " Success (templates retrieved, may be empty)
  • 1 " Error (connection failure)