# Campaigns

A **Campaign** is a targeted workflow designed to manage and execute tasks for telematics devices within a specified timeframe. Campaigns enable users to send commands to devices and monitor the progress of the campaign in real time.

<figure><img src="/files/4I6dhwkKt6kD1Pq6IFop" alt=""><figcaption></figcaption></figure>

## **Core Features of Campaigns** <a href="#id-2.-core-features-of-campaigns" id="id-2.-core-features-of-campaigns"></a>

### **Command Configuration**

* **Predefined Commands**: Select from a list of pre-defined commands
* **Custom Commands**: Write device-specific commands

### **Bulk Operations**

* Upload multiple devices using the template.
* Save time with **Bulk Upload** or **Download Template** for standardized format

### **Progress Tracking**

* Monitor completion status via **Campaign Progress**
* Filter campaigns by date, creator, or name

### **Expiry Date Management**

Set deadlines to ensure campaigns auto-conclude, preventing outdated tasks

### **Search & Filter**

Quickly locate campaigns using keywords or dates in the **Search Campaign** bar.

## **Step-by-Step Guide for Campaign Creation and Execution** <a href="#id-3.-step-by-step-guide-for-campaign-creation-and-execution" id="id-3.-step-by-step-guide-for-campaign-creation-and-execution"></a>

## **Step 1: Navigate to Actions**

1. Go to Pipelines for Telematics device type connector

<figure><img src="/files/Fa0vnARElsYhDeStj3Y8" alt=""><figcaption></figcaption></figure>

2. Click on the Telematics device type connector card and click on the Actions tab.

<figure><img src="/files/KYhkPQiFwL9aJ0ZPtUN0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To learn more about Pipelines, please read the detailed guide on [Pipelines](/condense/v2.4.0/deep-dive/pipelines.md)
{% endhint %}

## **Step 2: Creating a New Campaign**

### **Initiate Campaign Creation**

Click **Create New Campaign** on the campaign page.

<figure><img src="/files/4I6dhwkKt6kD1Pq6IFop" alt=""><figcaption></figcaption></figure>

### **Campaign Details**

**Campaign Name**: Enter a unique name (e.g., "Q3 Fleet Tracking").

<figure><img src="/files/I7tZFyYfHBHpGw9Cvf1D" alt=""><figcaption></figcaption></figure>

**Expiry Date**: Select an end date for the campaign.

<figure><img src="/files/ciLYpcFphyMejcGreb2H" alt=""><figcaption></figcaption></figure>

2. **Add IMEI details**:
   * **Manual IMEI**: Enter the **IMEI Number** manually.
   * **Bulk Upload**:
     1. Download the **Template** for bulk entries.
     2. Fill in IMEI numbers
     3. Upload the file.<br>
3. **Commands Configuration**:
   * **Choose Command**: Select predefined commands from the dropdown.
   * **Custom Command**: Write a custom command if needed.<br>
4. **Finalize**:
   * Click **Create Campaign** to save.
   * Use **Cancel** to discard changes.

### **Step 3: Managing Campaigns**

#### **Campaign List View**:

* Access the list by clicking the **Search Campaign**.
* Columns include

<figure><img src="/files/fpFlUcmCxcHvtRIOoUx5" alt=""><figcaption></figcaption></figure>

* **Campaign Name -** A unique, user-defined identifier for the campaign
* **Created On -** The timestamp (date and time) when the campaign was created.
* **Created By -** The username associated with the Condense account who created the campaign
* **Expiry Date -** The deadline by which the campaign must be completed. After this date, the campaign will cease execution.
* **Progress** (% and entries completed) - The proportion of devices that have finished executing the command (ex - 1200 out of 2000 devices).

#### **Actions**:

* **Search**: Filter campaigns by name or date.
* **Monitor Progress**: Track completion via the **Campaign Progress** bar.
* **Delete**: Remove outdated campaigns (if supported).

### **Step 4: Track Progress and status of each IMEI in the campaign**

#### **IMEI List View**

<figure><img src="/files/6JOqa2GBxhk32lZlWm0J" alt=""><figcaption></figcaption></figure>

Click the campaign name to view a table/list of all targeted devices, filtered by their IMEI.

* Access the list by clicking the **Campaign**.
* Columns include:
  * **IMEI -** Unique Identifier for each device
  * **Command:** Selected during campaign creation from a list of pre-defined commands or custom commands
  * **Status**: Indicates the current state of the command execution. It includes below statuses:
    * **Yet to Execute**: Command is queued but not yet processed
    * **Executing**: The device is actively performing the command
    * **Time Out**: The device failed to respond within a predefined window (may require retrying).
    * **Executed**: Command completed successfully.
  * **Last Updated At:** Timestamp showing when the response from the device was received.
  * **Response:** Feedback from the device after executing the command

## FAQs

1. **After how much time is a command marked as timed out?**\
   A command is marked as **Timed Out** if it remains in the *Executing stage* for **more than 60 minutes**. This applies only if the device is online during this period.<br>
2. **Do pre-built and custom commands follow the same timeout rules?**\
   Yes, the **60-minute timeout** applies uniformly to both pre-built and custom commands in the *Executing stage*.<br>
3. **When is the manual retry option available?**\
   The manual retry option becomes available **only after a command has timed out**.<br>
4. **How are overlapping campaigns handled?**\
   If two campaigns targeting the same device (e.g., IMEI 1) with the **same start/expiry dates** are created, the system processes them in a **campaign creation order**. The earlier-created campaign executes first.<br>
5. **What happens to queued commands during retries?**\
   Timed-out commands are **automatically removed** from the queue. Retrying adds the new campaign to the queue, subject to the same prioritization rules.<br>
6. **What are the stages for command execution?**\
   Commands typically transition through:

   **Queued** → **Executing** → **Completed**/**Timed Out**/**Failed**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zeliot.in/condense/v2.4.0/other-features/campaigns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
