Skip to main content

Celonis Product Documentation

Prerequisites for the object-centric Unshipped Orders app

Before you set up the Unshipped Orders app, you’ll need to enable and configure the Order Management process from the Celonis catalog. Load the object-centric data model with your data and validate that it's all working in the perspective_celonis_OrderManagement perspective. Then publish it to the production environment.

You’ll also need to create the custom event type ExecutePacking, extend the Celonis object type Delivery, and create an event to object relationship between them. The Delivery object type is already in the perspective_celonis_OrderManagement perspective, so you don’t need to make any changes to the perspective. Adding the ExecutePacking event type tells you how.

Adding the ExecutePacking event type

To know when a delivery is packed and ready for shipment, you need to create a customer event type ExecutePacking that’s related to the Celonis object type Delivery, and extend the Delivery object type. The Celonis perspective will automatically use all these new items. Here’s what to do:

  1. From the Celonis navigation bar, select Data > Objects and Events, then select Events in the top navigation bar.

  2. Create the ExecutePacking event type. Here’s how:

    1. Click the Create button on the list of events.

    2. Name the new event type ExecutePacking (with no space).

    3. Add the description “When a delivery is packed and is ready for shipping”.

    4. Select the tag OrderManagement.

    5. Click Add attribute, and add the attribute ExecutedBy. Select the data type String from the Data type dropdown.

    6. Click Add attribute again, and add the attribute ExecutionType. Select the data type String from the Data type dropdown.

    7. Click Save to create the ExecutePacking event type.

    Creating custom object types and custom event types has more details about creating custom event types.

  3. Create the event to object relationship between the ExecutePacking event type and the Delivery object type. Here’s how:

    1. In the panel for the ExecutePacking event type, click Add Relationships and select the Celonis object type Delivery.

    2. Select “Involves one”.

    3. Type in “Delivery” as the relationship name.

    4. Click Save to create the event to object relationship.

    Creating custom object types and custom event types has more details about creating custom relationships.

  4. Create the transformation for the ExecutePacking event type. Here’s how:

    1. In the ExecutePacking event type, click Add Transformations.

    2. Paste this SQL script into the SQL editor, replacing the generated suggestion:

      SELECT 'ExecutePacking' || '_' || "Delivery_Changes"."ID" AS "ID",
             "Delivery_Changes"."Time"                          AS "Time",
             "Delivery_Changes"."ChangedBy"                     AS "ExecutedBy",
             "Delivery_Changes"."ExecutionType"                 AS "ExecutionType",
             "Delivery_Changes"."ObjectID"                      AS "Delivery"
      FROM "o_celonis_Delivery" AS "Delivery"
               LEFT JOIN "c_o_celonis_Delivery" AS "Delivery_Changes"
                         ON "Delivery"."ID" = "Delivery_Changes"."ObjectID"
                             AND "Delivery_Changes"."Attribute" = 'PackingStatus'
                             AND "Delivery_Changes"."NewValue" = 'C'
      WHERE "Delivery_Changes"."Time" IS NOT NULL

      Note

      If you click Preview, you won’t see any events yet.

    3. Click Save to save and validate the transformation.

    Creating custom transformations has more details about creating custom transformations and the SQL editor.

  5. Now select Objects in the top navigation bar of the Objects and Events environment.

  6. Extend the Celonis object type Delivery to add the packing status change as an attribute. Here’s how:

    1. Browse or search to find the Celonis object type Delivery in the list of object types.

    2. Select Object details to see the object details pane.

    3. Click Add to add a new attribute, and add the attribute PackingStatus. Select the data type String from the Data type dropdown.

    4. Click Save to apply the extension to the Delivery object type.

    Extending Celonis object types and event types has more details about extending a Celonis object type.

  7. Create a transformation script for your extension. Here’s how:

    1. In the Delivery object type, click Transformations, then click the name of the transformation you’re using for the object type.

    2. Click the + icon next to the folder Custom Changes to create a new transformation script, and give it a name.

    3. Paste this SQL script into the SQL editor, replacing the generated suggestion:

      SELECT <%=sourceSystem%> || 'Delivery_' || "CDPOS"."TABKEY"
      AS "ObjectID",
      	      <%=sourceSystem%> || "CDPOS"."TABKEY" || "CDPOS"."TABNAME" || 
      "CDPOS"."FNAME"
                 || "CDPOS"."CHANGENR" || "CDPOS"."CHNGIND"                AS "ID",
             CAST("CDHDR"."UDATE" AS DATE) + CAST("CDHDR"."UTIME" AS TIME) AS "Time",
             CASE
                 WHEN "CDPOS"."FNAME" = 'PKSTK' THEN 'PackingStatus'
                 END                                                       AS "Attribute",
             CASE
                 WHEN "CDPOS"."VALUE_OLD" LIKE '%-' THEN CONCAT('-', 
      REPLACE(LTRIM("CDPOS"."VALUE_OLD"), '-', ''))
                 ELSE "CDPOS"."VALUE_OLD" END                              AS "OldValue",
             CASE
                 WHEN "CDPOS"."VALUE_NEW" LIKE '%-' THEN CONCAT('-', 
      REPLACE(LTRIM("CDPOS"."VALUE_NEW"), '-', ''))
                 ELSE "CDPOS"."VALUE_NEW" END                              AS "NewValue",
             'User_' || "CDHDR"."MANDANT" || "CDHDR"."USERNAME"                       AS "ChangedBy",
             "CDHDR"."TCODE"                                               AS "OperationType",
             "CDHDR"."CHANGENR"                                            AS "OperationID",
             CASE           WHEN "USR02"."USTYP" IN ('B', 'C') THEN 'Automatic'
                 ELSE 'Manual' END                                         AS "ExecutionType"
      FROM "CDPOS" AS "CDPOS"
               LEFT JOIN "CDHDR" AS "CDHDR"
                         ON "CDPOS"."MANDANT" = "CDHDR"."MANDANT"
                             AND "CDPOS"."OBJECTCLAS" = "CDHDR"."OBJECTCLAS"
                             AND "CDPOS"."OBJECTID" = "CDHDR"."OBJECTID"
                             AND "CDPOS"."CHANGENR" = "CDHDR"."CHANGENR"
                             AND "CDPOS"."OBJECTCLAS" = 'LIEFERUNG'
               LEFT JOIN "LIKP" AS "LIKP"
                         ON "CDPOS"."TABKEY" = "LIKP"."MANDT" || "LIKP"."VBELN"
               LEFT JOIN "USR02" AS "USR02"
                         ON "CDHDR"."USERNAME" = "USR02"."BNAME"
                             AND "CDHDR"."MANDANT" = "USR02"."MANDT"
      WHERE "CDPOS"."TABNAME" = 'VBUK'
              AND "CDPOS"."FNAME" IN ('PKSTK')
        AND "CDPOS"."CHNGIND" = 'U'
        AND "LIKP"."VBTYP" = 'J'
        AND "CDPOS"."MANDANT" IS NOT NULL
        AND "CDHDR"."MANDANT" IS NOT NULL
        AND "LIKP"."MANDT" IS NOT NULL
    4. Click Save to save and validate the transformation.

    Creating custom transformations has more details about creating custom transformations and the SQL editor.

  8. Select Publish > Publish to development to publish all your changes to the development environment.

  9. Follow the instructions in Running transformations to run test:ocpm-data-job to create objects and events in the development environment. Check that there are no errors.

If you need to get help with any of the app’s prerequisites or setup steps, Support tells you how.