Skip to main content

Celonis Product Documentation

Generate dummy data
What do we need?
  1. An understanding of the structure of your data

    1. You can usually find that in the documentation of the system we are using, such as ServiceNow. Search "ServiceNow objects API incident".

  2. A tool to manipulate data such as JupyterLab.

Step 1: Launch a Python3 notebook

Click the + button at the top left side and then select Python 3.

Step 2: Paste the content of the script on the right side

In this moment you will need to add some logic for your data.

Step 3: Download the generated file with dummy data

Dummy data generator

import pandas as pd
import os
import datetime
from random import randint
import random

#lets generate a random incident table
incident = pd.DataFrame(columns = [
    'number', #Id
    'sys_created_on', #datetime
    'sys_created_by', #user
    'opened_at', #datetime
    'resolved_at', #datetime
    'reopened_time', #datetime
    'activity_due', #datetime
    'closed_at', #datetime
    'closed_by', #user
    'due_date', #datetime
    'sla_due', #datime
    'contact_type', # options: email, walk-in, phone
    'category', #options: help, Hardware, Software, Network, Smartphone
    'urgency', #options: 1 High, 2 Medium, 3 Low
    'short_description', #text
    'priority', #options: 1 - Critical, 2 - High, 3 - Moderate, 4 - Low, 5 - Planning
    'state', #options: New, Closed, In Progress, On Hold
    'escalation' #options: Normal, Overdue, High, Moderate

def rand_dt(year,from_month,to_month):
    return datetime.datetime(year, randint(from_month,to_month),randint(1,28),randint(0,23),randint(1,59),randint(1,59))

cases = 1000 #choose the number of cases
for i in range(cases):
    new_row = {
            'number'            : "INC%d" %i,
            'sys_created_by'    :random.choice(['UserA','UserA','UserA','UserA', 'UserB','UserB','UserB', 'UserC', 'UserD', 'UserE', 'UserF', 'UserG']),
            'closed_by'         :random.choice(['UserA','UserA','UserA','UserA', 'UserB','UserB','UserB', 'UserC', 'UserD', 'UserE', 'UserF', 'UserG']),
            'escalation'        :random.choice(['New','New','Normal','Normal','', '', 'Overdue','Overdue', 'High', 'Moderate']),
            'state'             :random.choice(['Normal','Normal','Normal','In Progress','In Progress', 'In Progress', 'Closed','On Hold', '', '']),
            'priority'          :random.choice(['1 - Critical','2 - High','2 - High','3 - Moderate', '3 - Moderate', '3 - Moderate','4 - Low', '4 - Low', '5 - Planning']),
            'urgency'           :random.choice(['1 High','2 Medium','2 Medium','2 Medium', '3 Low']),
            'category'          :random.choice(['Help','Help','Help','Hardware','Hardware','Software','Software', 'Network', 'Smartphone']),
            'contact_type'      :random.choice(['email','email','email','walk-in','walk-in','walk-in','walk-in', 'walk-in', 'phone']),
            'short_description' :"This is a description",
            'sys_created_on'    :rand_dt(2020,1,2), 
            'opened_at'         :rand_dt(2020,2,3),
            'activity_due'      :random.choice(['',rand_dt(2020,3,4)]),#it will occur 50% of times
            'due_date'          :random.choice(['','',rand_dt(2020,4,5)]),#it will occur 33% of times
            'sla_due'           :random.choice(['','','',rand_dt(2020,5,6)]),#it will occur 25% of times,
            'resolved_at'       :random.choice(['','','','',rand_dt(2020,6,7)]),#it will occur 20% of times,
            'reopened_time'     :random.choice(['','','','','',rand_dt(2020,7,8)]),#it will occur 16% of times, 
            'closed_at'         :random.choice(['','','','','','','',rand_dt(2020,9,10)]),#it will occur 12% of times,
    incident = incident.append(new_row, ignore_index=True)
incident = incident.reset_index(drop=True)
incident.to_csv(os.getcwd()+"/"+"incident.csv", index=False)