FSM Connector



Intro

The FSM connector is used to integrate with third-party application:

  • Duplicate ServiceOrder (ServiceCall, Activity, ReservedMaterial)
  • Notify about updates during resolution phase
  • Final notifications about work completion together with related details:
    • timeEfforts / Expenses
    • Materials
    • Mileages




Inboud API

The FSM Connector inbound API is a proxy to the Service API v2.

Warning: For the inbound calls you should not use the Service API directly. All the calls should be made via the FSM Connector as a proxy, otherwise unexpected behavior may occur such as “circular updates”.

More details can be found here


Outbound API

Currently we have two types of integration, as detailed in the table below:

Integration Type Payload Stategy Communication Strategy
C4C Whole Asynchronous
S4 Delta Synchronous
Other Whole Asynchronous

Payload Strategy

Payload Strategy Description
Whole FSM connector always sends the whole payload.
Delta FSM connector only sends the delta changes.

Example: If we have one ServiceCall with three Activites, and Activity_2 is updated:

  • Using the Whole payload strategy, the FSM connector will send one ServiceCall with three Activities
  • But, when using a Delta payload strategy, the FSM connector will send only Activity_2 payload and only reference the ServiceCallrecord.

Communication Strategy

Communication Strategy Type Description
Asynchronous FSM connector sends payload with “messageId” in the header and is unlocked to take care of different tasks. When the 3rd party endpoint is finished processing events, then a separate enpoint will send the confirmation (with the same “messageId” in the header, correlation is maintained) that this event has finished processing and is synchronized (or if applicable the current error state).
Synchronous FSM connector sends payload and waits while the event is fully consumed and confirmed on the 3rd party side.

All notifications are sent as an HTTP POST request with a JSON payload.

Example WebHook Notification Request

Request URL: {urlFromConfirguration}
Request Method: POST
Request Headers:
   Content-Type: application/json
   Accept: application/json
   X-Message-ID 8e515530-9eab-4a2b-9df1-83dc3bab30b3
   Authorization: Basic {credentialsFromConfiguration}
   X-Account-ID: 560347
   X-Company-ID: 587140
   X-Account-Name: core-vama
   X-Company-Name: comp1
Request Body:
   {JsonPayload}

Connector Configuration

Attention: the following steps are performed in the Admin portal. In order to perform these steps you must be assigned one of the following roles: ADMINISTRATOR, CUSTOMER, SUPPORT, SUPERUSER, EXTERNAL_SUPERUSER, or CONSULTANT.

In order to enable FSM connector you need to make setup in two steps:

1.) Navigate to Admin > Company > Settings and set the CoreSystems.FSM.Connector.Enabled setting to true.



Setting Value
CoreSystems.FSM.Connector.Enabled True. When true, the FSM Connector will be enabled.

2.) Navigate to Admin > Company > Messages > FSM Connector and configure the endpoints where notifications are sent:

Note: in the image below, the example endpoint to which FSM Connector event notifications are sent is https://mango.serveo.net/api/v1/thirdparty/mock.



Setting Description
Streaming Enabled Checked or unchecked. When checked, the FSM connector is currently enabled.
Extended Logs Enabled When checked, extended logs will be recorded for S4 and C4C events (depending on configuration), including UDFs, requirements, and attachment metadata.
Streaming URL Here you will enter the third-party endpoint that will receive notifications S4 and C4C events (depending on configuration).
Auth Method Read-only. Currently, only basic is supported at this point.
Auth user The user authenticated by the third-party to receive notifications.
Auth password Encrypted. The password associated with the auth user that is authenticated by the third-party to receive event notifications.
Integration Type Depending on selection, different events and payloads will be delivered.
Options include:
  • S4
  • C4C
Change Date Time The date and time at which the Streaming API configuration was last changed.
Last Modified By The Admin or Superuser last responsible for changing the FSM Connector configuration.

After an account has been assigned the STREAMING role, the Streaming API can then be configured.


Extended Configuration

The Extended Configuration allows users to enable attachment and/or contact replication for the FSM Connector.

Attention: This is available only for C4C integration type. For S4 and Other, this section will NOT be displayed.

Setting Description
Attachment Enabled When enabled, attachment/s will be replicated for the FSM connector.
Attachment URL The endpoint to which attachment data is sent.
Contact Enabled When enabled, contact data will be replicated for the FSM connector.
Contact URL The endpoint to which contact data is sent.

Note: Examples of the C4C outbound payloads for Contact and Attachment data are shown in the section below.


C4C Outbound

Create Service Call in FSM with/without Activity & Reserved Material / Create Service Ticket in C4C

For create ServiceCall or Activity or ReserverMaterial or any combination of these, so example create serviceCall together with an Activity, etc. the whole payload is always sent.

For example, if a service call record with three activities and we then created new fourth activity, then the whole payload starting always from the tree top, which is the service call, will be sent.

If there is such a need 3rd party system can check if the externalId is set or not and take appropriate action:

Scenario FSM Connector Action
externalId`<>null The object was already created in C4C. No action required.
externalId==null The object needs to be created in C4C.

Below example of payload structure (it’s the same as palyload as serviceCall service API GET serviceCall operation):

{
  "eventType": "servicecall.created",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "b7d060c9-a529-4a13-9e53-e27a68abe094",
  "eventTime": "2019-11-22T19:52:01.704Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "b7d78bfca66c3bda"
  },
  "data": {
    "id": "3EEA2511A6DB4D0AB9FBB2C4A6C01DC3",
    "code": "100",
    "externalId": null,
    "lastChanged": 1574452321850,
    "businessPartner": {
      "id": "35C2996591244F7C9180DD7DDBF15C52",
      "code": "C0003",
      "externalId": "C0003"
    },
    "contact": null,
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": "admin",
      "externalId": "admin"
    },
    "dueDateTime": "2019-11-22T22:59:59Z",
    "earliestStartDateTime": "2019-11-22T19:51:44Z",
    "durationInMinutes": 120,
    "equipments": [
      {
        "id": "BB13B0C269EF48DAA3C40B806F1E53A7",
        "code": "APJ-ZP485",
        "externalId": "APJ-ZP485"
      }
    ],
    "status": "-2",
    "origin": "-1",
    "problemType": "-3",
    "priority": "MEDIUM",
    "remarks": null,
    "resolution": null,
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": "admin",
        "externalId": "admin"
      }
    ],
    "subject": "SC creation test",
    "address": null,
    "activities": [
      {
        "id": "A3B817963F664E4395804D7E6F401BD2",
        "code": "164",
        "externalId": null,
        "lastChanged": 1574452322742,
        "subject": "SC creation test",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-11-22T22:59:59Z",
        "plannedStartDate": "2019-11-22T19:51:44Z",
        "plannedEndDate": "2019-11-22T21:51:44Z",
        "earliestStartDateTime": "2019-11-22T19:51:44Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": {
          "source": "EQUIPMENT",
          "sourceId": "BB13B0C269EF48DAA3C40B806F1E53A7",
          "country": "AU",
          "state": null,
          "city": "Southbank",
          "zipCode": "AU-3006",
          "street": "234 St Kilda Rd",
          "streetNumber": null,
          "location": {
            "latitude": -37.824721,
            "longitude": 144.9701526
          }
        },
        "equipment": {
          "id": "BB13B0C269EF48DAA3C40B806F1E53A7",
          "code": "APJ-ZP485",
          "externalId": "APJ-ZP485"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
              "code": null,
              "externalId": "Visa China"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "20F284D5A6544547AF1E2485D9E4CE62",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "325FA92E370B4559BABB1B1EDD020FDB",
              "code": null,
              "externalId": "English"
            },
            "mandatory": true,
            "inherited": true
          }
        ],
        "region": null
      }
    ],
    "reservedMaterials": [],
    "type": "-1",
    "attachments": [],
    "udfValues": null,
    "requirements": [
      {
        "skill": {
          "id": "325FA92E370B4559BABB1B1EDD020FDB",
          "code": null,
          "externalId": "English"
        },
        "mandatory": true,
        "inherited": true,
        "updatedProperty": []
      },
      {
        "skill": {
          "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
          "code": null,
          "externalId": "Visa China"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "6658A4CF66314DFAADA702C0246346DB",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "20F284D5A6544547AF1E2485D9E4CE62",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      }
    ]
  }
}

Update of Service Call in FSM / Update Corresponding Ticket in C4C

In case a ServiceCall, Activity, and/or ReservedMaterial (or any combination thereof) are updated in FSM, then FSM will always send whole payload (the same as for creation):

For example, if a service call record with three activities and we then created new fourth activity, then the whole payload starting always from the tree top, which in this case will be the service call record along with all four related activity records.

Below is example of payload structure (it’s the same as palyload as serviceCall service API GET serviceCall operation):


{
  "eventType": "serviceCall.updated",                 
  eventTypeVersion: "1.0",
  cloudEventsVersion: "0.1",
  source: "fsm-connector/api/v1",
  eventID: "263AADCA529C4D15BC4AA7F9A81AE81E",
  eventTime: "2019-03-23T22:23:14.888Z",
  contentType: "application/json",
  extensions: {
    traceId=2d1af04cc6ec42878a7a076df3810c4f
  },
  data:
  {
    "id": "ACB0605B150947AD87FD46A3A3B7A5AE",
    "code": "3",
    "externalId": "C4CSC0001",
    "lastChanged": 1552992130209,
    "businessPartner": {
      "id": "31192BAA08B844C5BD38F124D5BE2A1E",
      "code": "BP001",
      "externalId": "C4CBP001"
    },
    "contact": {
      "id": "FA174AFC196440A39BE7F6EA062999A6",
      "code": null,
      "externalId": "C4CCONT001"
    },
    "createPerson": {
      "id": "C8B596D87BAAE3EECD64EED9CE918FA4",
      "code": "EMP002",
      "externalId": "C4CEMP002"
    },
    "dueDateTime": "2019-03-05T08:38:00Z",
    "earliestStartDateTime": "2019-03-01T08:38:00Z",
    "durationInMinutes": null,
    "equipments": [
      {
        "id": "0B607DC8838C4440AD4DF0934723F577",
        "code": "EQ001",
        "externalId": "C4CEQ001"
      },
      {
        "id": "298E5F3B35B345B79DFB833F74E4556B",
        "code": "EQ002",
        "externalId": "C4CEQ002"
      }
    ],
    "status": "-2",
    "origin": "-1",
    "problemType": "-2",
    "priority": "HIGH",
    "remarks": "This is a service call created usiing new API",
    "resolution": "string",
    "responsibles": [
      {
        "id": "CF739486FC4018AF18301105EB2675EB",
        "code": "EMP001",
        "externalId": "C4CEMP001"
      }
    ],
    "subject": "This is from Post man with new API",
    "address": {
      "source": "SERVICECALL",
      "sourceId": "ACB0605B150947AD87FD46A3A3B7A5AE",
      "country": "IN",
      "state": "Karnataka",
      "city": "Bangalore",
      "zipCode": "560066",
      "street": "EPIP",
      "streetNumber": "138"
    },
    "activities": [
      {
        "id": "9478555DAAB64A90B307B13B6F6E4E02",
        "code": "2",
        "externalId": "C4CACT000101",
        "lastChanged": 1551617197798,
        "subject": "2- Created from post man march 1 2:30",
        "remarks": "1- This activity was Created from post man march 1 2:30",
        "contact": {
          "id": "FA174AFC196440A39BE7F6EA062999A6",
          "code": null,
          "externalId": "C4CCONT001"
        },
        "createPerson": {
          "id": "A7375F70D0AE4377B9635B3EA978EB7B",
          "code": null,
          "externalId": null
        },
        "durationInMinutes": 90,
        "dueDateTime": "2019-03-02T08:38:56Z",
        "earliestStartDateTime": "2019-03-01T08:38:56Z",
        "status": "DRAFT",
        "address": null,
        "equipment": {
          "id": "0B607DC8838C4440AD4DF0934723F577",
          "code": "EQ001",
          "externalId": "C4CEQ001"
        },
        "responsibles": [],
        "reservedMaterials": []
      },
      {
        "id": "0505D98B5BBE44579FE6526229B35330",
        "code": "3",
        "externalId": "C4CACT000102",
        "lastChanged": 1551617197910,
        "subject": "2 - Created from post man march 1 2:30",
        "remarks": "2 - This activity was Created from post man march 1 2:30",
        "contact": {
          "id": "FA174AFC196440A39BE7F6EA062999A6",
          "code": null,
          "externalId": "C4CCONT001"
        },
        "createPerson": {
          "id": "A7375F70D0AE4377B9635B3EA978EB7B",
          "code": null,
          "externalId": null
        },
        "durationInMinutes": 90,
        "dueDateTime": "2019-03-04T08:38:56Z",
        "earliestStartDateTime": "2019-03-01T08:38:56Z",
        "status": "DRAFT",
        "address": null,
        "equipment": {
          "id": "0B607DC8838C4440AD4DF0934723F577",
          "code": "EQ001",
          "externalId": "C4CEQ001"
        },
        "responsibles": [],
        "reservedMaterials": []
      }
    ],
    "reservedMaterials": [
      {
        "id": "C9B27C992B344DDAA11D1D3A8CBD6F89",
        "externalId": null,
        "item": {
          "id": "09630B3B811D4D7CB8DA458BE67289D3",
          "code": "MAT001",
          "externalId": "MCF-0003"
        },
        "serialNumber": null,
        "quantity": 3,
        "warehouse": {
          "id": "02EA5504744746C7AA14574ECC6BEA41",
          "code": "W000",
          "externalId": null
        },
        "used": 0,
        "moved": 0,
        "shipped": null
      }
    ]
  }
}

Activity Completed

The following is an example of a payload sent when Activity.status == CLOSED and all related efforts efforts.status<>OPEN and have been synced:

{
  "eventType": "activity.completed",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "67795466-3882-484b-893b-cc4b541efb98",
  "eventTime": "2019-05-03T16:40:06.417Z",
  "contentType": "application/json",
  "extensions": {
    traceId=8fcc999fabb0e8b7
  },
  "data": {
    "id": "499EFD59949A46F99E91B72CB26FB291",
    "code": "31",
    "externalId": "sc1ExternalId",
    "lastChanged": 1552948361383,
    "businessPartner": {
      "id": "41D357DF882C448CAE9795501BA00D40",
      "code": null,
      "externalId": null
    },
    "contact": null,
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": null,
      "externalId": "admin"
    },
    "dueDateTime": "2018-07-02T21:59:59Z",
    "earliestStartDateTime": "2018-07-02T16:15:00Z",
    "durationInMinutes": null,
    "equipments": [
      {
        "id": "5D398AC9985F4019930FD7CB09AD8765",
        "code": "6",
        "externalId": "E000004"
      }
    ],
    "status": "-2",
    "origin": "-1",
    "problemType": null,
    "priority": "MEDIUM",
    "remarks": null,
    "resolution": null,
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": null,
        "externalId": "admin"
      }
    ],
    "subject": "Install new ticket scanners",
    "address": null,
    "activities": [
      {
        "id": "4100432D358144C8BEC8B697D6B9F6D4",
        "code": "29",
        "externalId": null,
        "lastChanged": 1530545979996,
        "subject": "Install new ticket scanners",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": null,
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2018-07-02T21:59:00Z",
        "earliestStartDateTime": "2018-07-02T15:38:00Z",
        "status": "DRAFT",
        "address": null,
        "equipment": {
          "id": "5D398AC9985F4019930FD7CB09AD8765",
          "code": "6",
          "externalId": "E000004"
        },
        "responsibles": [],
        "reservedMaterials": []
      },
      {
        "id": "FFE617B34D5341DDA5EB371B85696450",
        "code": "73",
        "externalId": null,
        "lastChanged": 1554703397213,
        "subject": "test1",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-04-08T21:59:00Z",
        "earliestStartDateTime": "2019-04-08T05:14:00Z",
        "status": "CLOSED",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "60A745386C71444B96B29FBCCFC46C39",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "eventType": "activity.completed",
        "timeEfforts": [
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "D8C00CB4086B4870A5A93C675E992608",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702220040,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:44:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:43:39Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:43:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "4661A9FDA3F34B76B7E82F5B08668248",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702192939,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:44:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:43:12Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:42:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "BCF8BAB781AD4CEABAEB78FACC25CC6E",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702264961,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:43:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:42:49Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:42:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_CHANGE_FOR_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "DECLINED_CLOSED"
          }
        ],
        "expenses": [
          {
            "date": "2019-04-08",
            "code": null,
            "lastChanged": 1554702331208,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "tax": null,
            "owners": null,
            "type": {
              "code": "2",
              "externalId": "ET2",
              "id": "DB4AF371046544EF851AB28DB4C2CBF3"
            },
            "branches": null,
            "chargeOption": "NONCHARGEABLE",
            "createDateTime": "2019-04-08T05:45:31Z",
            "externalAmount": {
              "amount": 150.0,
              "currency": "EUR"
            },
            "syncObjectKPIs": null,
            "inactive": false,
            "udfMetaGroups": null,
            "internalAmount": {
              "amount": 100.0,
              "currency": "EUR"
            },
            "location": null,
            "id": "F492C952B1EC42B2A22C77268AB68AC1",
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "materials": [
          {
            "date": "2019-04-08",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "8F7D49964A48497986941A34D373D21B",
            "unitPrice": {
              "amount": 70.0,
              "currency": "EUR"
            },
            "item": {
              "code": "5",
              "externalId": "I000005",
              "id": "16418A0965D14E699279EBD8E8353CC2"
            },
            "quantity": 5.0,
            "serialNumbers": [],
            "lastChanged": 1554702456289,
            "equipment": "338B8383CAF249DEB8565FFB83376B59",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-08T05:46:53Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_CHANGE_FOR_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "DECLINED_CLOSED"
          },
          {
            "date": "2019-04-08",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "5CAF2FA4B5A1408C860A5ED71D70EEC8",
            "unitPrice": {
              "amount": 3.0,
              "currency": "EUR"
            },
            "item": {
              "code": "4",
              "externalId": "I000004",
              "id": "A0B3E87B3C534C91B3DC5ED703443C2B"
            },
            "quantity": 5.0,
            "serialNumbers": [],
            "lastChanged": 1554702374691,
            "equipment": "13FDBBE52C144D9CA7899F53E9CD428D",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-08T05:46:14Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "mileages": [
          {
            "date": null,
            "code": null,
            "distance": null,
            "destination": null,
            "owners": null,
            "source": null,
            "type": null,
            "travelEndDateTime": "2019-04-08T05:47:00Z",
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "travelEndDateTimeTimeZoneId": "Europe/Warsaw",
            "inactive": false,
            "travelStartDateTime": "2019-04-08T05:46:00Z",
            "id": "7301701CD4434FB6A611E79FC5E7AD32",
            "travelStartDateTimeTimeZoneId": "Europe/Warsaw",
            "lastChanged": 1554702440308,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "branches": null,
            "createDateTime": "2019-04-08T05:47:20Z",
            "driver": false,
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "privateCar": false,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ]
      }
    ],
    "reservedMaterials": []
  }
}


Activity Confirmed

This event will be triggered when related actuals (timeEffort/expense/material/mileage) are in APPROVED.

  • timeEffort/expense/material/mileage are approved via TMJ
  • Only recently approved actual will be sent , so old & related approved ones will not be sent as part of payload.
  • Activity inside payload will have extra property eventType: “activity.confirmed”, to mark which one was confirmed. It can happen that more than one activity was confirmed at the same time, then more than one activity will be marked as “activity.confirmed”
  • It can happen that more than one actual is confirmed at the same time, so all of them will be in the payload (example two TimeEfforts will be in the payload).

Example Payload for Activity Completion

{
  "eventType": "activity.confirmed",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "424ab0f7-3e54-4f23-b589-b0ae20106882",
  "eventTime": "2019-11-19T12:51:50.654Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "d22ece7a936a8664"
  },
  "data": {
    "id": "C884D334DE5D41439B4EB5499E3654AD",
    "code": "12",
    "externalId": null,
    "lastChanged": 1574167571343,
    "businessPartner": {
      "id": "0113FEDD7C9D4C4085567BDBBF547EF1",
      "code": "5",
      "externalId": "C00004"
    },
    "contact": {
      "id": "F9A2DB4E9BE047348A2682D63408D176",
      "code": "kiw",
      "externalId": "C00004_kiw@coresystems.net"
    },
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": "admin",
      "externalId": "admin"
    },
    "dueDateTime": "2019-11-19T22:59:59Z",
    "earliestStartDateTime": "2019-11-19T12:44:50Z",
    "durationInMinutes": 120,
    "equipments": [
      {
        "id": "48D7C5347B4244B085D8D2F9C9CBE7A8",
        "code": "4",
        "externalId": "E000002"
      }
    ],
    "status": "-2",
    "origin": "-1",
    "problemType": null,
    "priority": "MEDIUM",
    "remarks": null,
    "resolution": null,
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": "admin",
        "externalId": "admin"
      }
    ],
    "subject": "Test for activity.completed",
    "address": null,
    "activities": [
      {
        "id": "D7F73B48F214459686B05F27B0AEF2CD",
        "code": "25",
        "externalId": null,
        "lastChanged": 1574167601070,
        "subject": "Test for activity.completed",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-11-19T22:59:00Z",
        "plannedStartDate": "2019-11-19T13:30:00Z",
        "plannedEndDate": "2019-11-19T15:30:00Z",
        "earliestStartDateTime": "2019-11-19T12:44:00Z",
        "status": "OPEN",
        "executionStage": "EXECUTION",
        "address": null,
        "equipment": {
          "id": "48D7C5347B4244B085D8D2F9C9CBE7A8",
          "code": "4",
          "externalId": "E000002"
        },
        "responsibles": [
          {
            "id": "60A745386C71444B96B29FBCCFC46C39",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "BE363304F87841A3B7FBB5C37C73F12F",
              "code": null,
              "externalId": "Certificate"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
              "code": null,
              "externalId": "German"
            },
            "mandatory": false,
            "inherited": true
          }
        ],
        "region": null,
        "eventType": "activity.confirmed",
        "timeEfforts": [
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "B84E8B78F0D24719B380F7199A07DEB7",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+01:00",
            "lastChanged": 1574167657721,
            "createPerson": {
              "code": null,
              "externalId": "tech2",
              "id": "EC5E479D1F224757BCC9671CB052A61D"
            },
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-11-19T14:48:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-11-19T12:47:37Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-11-19T12:47:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "D7F73B48F214459686B05F27B0AEF2CD",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "490FC55E2B7E4DB5BCC4863DF610DC9B",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+01:00",
            "lastChanged": 1574167678892,
            "createPerson": {
              "code": null,
              "externalId": "tech2",
              "id": "EC5E479D1F224757BCC9671CB052A61D"
            },
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-11-19T15:48:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-11-19T12:47:58Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-11-19T12:47:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "D7F73B48F214459686B05F27B0AEF2CD",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "expenses": [],
        "materials": [],
        "mileages": []
      }
    ],
    "reservedMaterials": [],
    "type": "-1",
    "attachments": [],
    "udfValues": null,
    "requirements": [
      {
        "skill": {
          "id": "BE363304F87841A3B7FBB5C37C73F12F",
          "code": null,
          "externalId": "Certificate"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "6658A4CF66314DFAADA702C0246346DB",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
          "code": null,
          "externalId": "German"
        },
        "mandatory": false,
        "inherited": true
      }
    ]
  }
}

Attachment or Contact Created

In order to enable FSM connector contact replication, need to provide extended configuration in Admin section. Please note that it is available only for C4C integration type. For S4 & Other , this section will not be displayed.

Attachment/Contact replication can be enabled/disabled via “Attachment Enabled” & “Contact Enabled” check boxes via Admin (see Extended Configuration section above).

  • Creation of contact.created
  • Creation of attachment.created at service call level
  • Creation of attachment.created at activity level.

Contact Created Example Payload

{
  "eventType": "contact.created",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "2fadee45-5e04-4e0d-b4af-0ccfbcdf1682",
  "eventTime": "2019-11-04T14:50:49.129Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "b85b8e98cec9f6cb"
  },
  "data": {
    "contact": {
      "lastName": "Crespo",
      "skypeName": "test",
      "code": "testCode",
      "gender": "MALE",
      "owners": [
         
      ],
      "title": "Mr",
      "positionName": "SE",
      "syncObjectKPIs": [
         
      ],
      "emailAddress": "bartley.crespo@democloud.hybris.com",
      "inactive": false,
      "officePhone": "testOfficePhone",
      "pager": "testPager",
      "id": "D64FBF09888E49B9AFFF35B3E08B7340",
      "fax": "21010125",
      "profession": "IT",
      "lastChanged": 1571994678793,
      "createPerson": {
        "id": "14523B3D57424338858CB56BBF120696",
        "externalId": "admin"
      },
      "externalId": null,
      "groups": [
         
      ],
      "branches": [
         
      ],
      "birthDate": null,
      "createDateTime": "2018-12-05T12:42:45Z",
      "firstName": "Bartley",
      "defaultContact": true,
      "mobilePhone": "testMobileNo",
      "otherPhone": "testOtherPhone",
      "udfMetaGroups": null,
      "remarks2": null,
      "location": null,
      "udfValues": [
         
      ],
      "lastChangedBy": {
        "id": "14523B3D57424338858CB56BBF120696",
        "externalId": "admin"
      },
      "remarks": null,
      "syncStatus": "IN_CLOUD",
      "object": {
        "objectId": {
          "id": "3C59E62AE3E846FAA5CFE62060B66022",
          "externalId": "C0004"
        },
        "objectType": "BUSINESSPARTNER"
      }
    }
  }

Example Payload for Contact Created at Service Call Level

{
    "eventType": "attachment.created",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "code": "63",
            "externalId": null,
            "id": "23EB90525D5A437192E2630B0C82FDB1"
        },
        "attachment": {
            "fileName": "Testing",
            "description": "abcdefghijk",
            "owners": null,
            "title": null,
            "type": "XML",
            "syncWithErp": true,
            "syncObjectKPIs": null,
            "inactive": false,
            "id": "96939B4D2DF7477980CD8A735024AEC5",
            "lastChanged": 1572677584617,
            "createPerson": "F8B12698D50848E6A1C5529A57B42355",
            "externalId": null,
            "groups": null,
            "sourceObject": null,
            "branches": null,
            "createDateTime": "2019-11-02T06:53:04Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "category": null,
            "lastChangedBy": "F8B12698D50848E6A1C5529A57B42355",
            "fileContent": null,
            "syncStatus": "IN_CLOUD",
            "object": {
                 "objectId": {
                        "id": "66D75D634562403C833AF7C96B969FC8",
                        "externalId": "extId"
                    },
                "objectType": "SERVICECALL"
            },
            "ordinal": null
        }
    }
}

Example Payload of Attachment Created at Activity Level

{
    "eventType": "attachment.created",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "id": "23EB90525D5A437192E2630B0C82FDB1",
            "code": "63",
            "externalId": "null"
        },
        "activity": {
            "code": "99",
            "externalId": null,
            "id": "8D41E0B1909B4AD2904BDE88952E3177"
        },
        "attachment": {
            "fileName": "Testing",
            "description": "abcdefghijk",
            "owners": null,
            "title": null,
            "type": "XML",
            "syncWithErp": true,
            "syncObjectKPIs": null,
            "inactive": false,
            "id": "023AFFB191724BF8B120C52967CE87E0",
            "lastChanged": 1572677692141,
            "createPerson": "F8B12698D50848E6A1C5529A57B42355",
            "externalId": null,
            "groups": null,
            "sourceObject": null,
            "branches": null,
            "createDateTime": "2019-11-02T06:54:51Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "category": null,
            "lastChangedBy": "F8B12698D50848E6A1C5529A57B42355",
            "fileContent": null,
            "syncStatus": "IN_CLOUD",
            "object": {
             "objectId": {
                        "id": "66D75D634562403C833AF7C96B969FC8",
                        "externalId": "extId"
                    },
                "objectType": "ACTIVITY"
            },
            "ordinal": null
        }
    }
}

Attachment / Contact Updated

In order to enable FSM connector contact replication, need to provide extended configuration in Admin section. Please note that it is available only for C4C integration type. For S4 & Other , this section will not be displayed.

Attachment/Contact replication can be enabled/disabled via “Attachment Enabled” & “Contact Enabled” check boxes via Admin (see Extended Configuration).

  • Update of contact.updated
  • Updation of attachment.updated at service call level
  • Updation of attachment.updated at activity level.

Example Payload of Contact Updated

{
  "eventType": "contact.updated",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "2fadee45-5e04-4e0d-b4af-0ccfbcdf1682",
  "eventTime": "2019-11-04T14:50:49.129Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "b85b8e98cec9f6cb"
  },
  "data": {
    "contact": {
      "lastName": "Crespo",
      "skypeName": "test1",
      "code": "testCode",
      "gender": "MALE",
      "owners": [
         
      ],
      "title": "Mr",
      "positionName": "SE",
      "syncObjectKPIs": [
         
      ],
      "emailAddress": "bartley.crespo@democloud.hybris.com",
      "inactive": false,
      "officePhone": "testOfficePhone",
      "pager": "testPager",
      "id": "D64FBF09888E49B9AFFF35B3E08B7340",
      "fax": "21010125",
      "profession": "IT",
      "lastChanged": 1571994678793,
      "createPerson": {
        "id": "14523B3D57424338858CB56BBF120696",
        "externalId": "admin"
      },
      "externalId": null,
      "groups": [
         
      ],
      "branches": [
         
      ],
      "birthDate": null,
      "createDateTime": "2018-12-05T12:42:45Z",
      "firstName": "Bartley",
      "defaultContact": true,
      "mobilePhone": "testMobileNo1",
      "otherPhone": "testOtherPhone1",
      "udfMetaGroups": null,
      "remarks2": null,
      "location": null,
      "udfValues": [
         
      ],
      "lastChangedBy": {
        "id": "14523B3D57424338858CB56BBF120696",
        "externalId": "admin"
      },
      "remarks": null,
      "syncStatus": "IN_CLOUD",
      "object": {
        "objectId": {
          "id": "3C59E62AE3E846FAA5CFE62060B66022",
          "externalId": "C0004"
        },
        "objectType": "BUSINESSPARTNER"
      }
    }
  }

Example Payload of Attachment Updated at Service Call Level

{
    "eventType": "attachment.updated",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "code": "63",
            "externalId": null,
            "id": "23EB90525D5A437192E2630B0C82FDB1"
        },
        "attachment": {
            "fileName": "TestingUpdate",
            "description": "testDescUpdate",
            "owners": null,
            "title": null,
            "type": "XML",
            "syncWithErp": true,
            "syncObjectKPIs": null,
            "inactive": false,
            "id": "96939B4D2DF7477980CD8A735024AEC5",
            "lastChanged": 1572677584617,
            "createPerson": "F8B12698D50848E6A1C5529A57B42355",
            "externalId": null,
            "groups": null,
            "sourceObject": null,
            "branches": null,
            "createDateTime": "2019-11-02T06:53:04Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "category": null,
            "lastChangedBy": "F8B12698D50848E6A1C5529A57B42355",
            "fileContent": null,
            "syncStatus": "IN_CLOUD",
            "object": {
                 "objectId": {
                        "id": "66D75D634562403C833AF7C96B969FC8",
                        "externalId": "extId"
                    },
                "objectType": "SERVICECALL"
            },
            "ordinal": null
        }
    }
}

Example of Attachment Updated at Activity Level

{
    "eventType": "attachment.updated",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "id": "23EB90525D5A437192E2630B0C82FDB1",
            "code": "63",
            "externalId": "null"
        },
        "activity": {
            "code": "99",
            "externalId": null,
            "id": "8D41E0B1909B4AD2904BDE88952E3177"
        },
        "attachment": {
            "fileName": "TestingUpdate",
            "description": "TestDescUpdate",
            "owners": null,
            "title": null,
            "type": "XML",
            "syncWithErp": true,
            "syncObjectKPIs": null,
            "inactive": false,
            "id": "023AFFB191724BF8B120C52967CE87E0",
            "lastChanged": 1572677692141,
            "createPerson": "F8B12698D50848E6A1C5529A57B42355",
            "externalId": null,
            "groups": null,
            "sourceObject": null,
            "branches": null,
            "createDateTime": "2019-11-02T06:54:51Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "category": null,
            "lastChangedBy": "F8B12698D50848E6A1C5529A57B42355",
            "fileContent": null,
            "syncStatus": "IN_CLOUD",
            "object": {
             "objectId": {
                        "id": "66D75D634562403C833AF7C96B969FC8",
                        "externalId": "extId"
                    },
                "objectType": "ACTIVITY"
            },
            "ordinal": null
        }
    }
}

Attachment / Contact Deleted

In order to enable FSM connector contact replication, need to provide extended configuration in Admin section. Please note that it is available only for C4C integration type. For S4 & Other , this section will not be displayed.

Attachment/Contact replication can be enabled/disabled via “Attachment Enabled” & “Contact Enabled” check boxes via Admin (see Extended Configuration above).

  • Deletion of contact.deleted
  • Deletion of attachment.deleted at service call level
  • Deletion of attachment.deleted at activity level.

Example Payload of Contact Deleted

{
  "eventType": "contact.deleted",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "2fadee45-5e04-4e0d-b4af-0ccfbcdf1682",
  "eventTime": "2019-11-04T14:50:49.129Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "b85b8e98cec9f6cb"
  },
  "data": {
    "contact": {
      "id": "D64FBF09888E49B9AFFF35B3E08B7340",
      "externalId": "extId",
      "deleted": true
    }
  }
}

Example Payload of Attachment Deleted at Service Call Level

{
    "eventType": "attachment.deleted",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "code": "63",
            "externalId": null,
            "id": "23EB90525D5A437192E2630B0C82FDB1"
        },
        "attachment": {
            "id": "423A5A1A22264DFFABA2C56171103455",
            "externalId": "extId",
            "deleted": true
        }
    }
}

Example Payload of Attachment Deleted at Activity Level

{
    "eventType": "attachment.deleted",
    "eventTypeVersion": "1.0",
    "cloudEventsVersion": "0.1",
    "source": "api/fsm-connector/v1",
    "eventID": "565d17eb-305b-4f48-a4b3-158662ba03ac",
    "eventTime": "2019-11-02T06:53:04.618Z",
    "contentType": "application/json",
    "extensions": {
        "traceId": "f5ac69548bb20351"
    },
    "data": {
        "serviceCall": {
            "id": "23EB90525D5A437192E2630B0C82FDB1",
            "code": "63",
            "externalId": "null"
        },
        "activity": {
            "code": "99",
            "externalId": null,
            "id": "8D41E0B1909B4AD2904BDE88952E3177"
        },
        "attachment": {
            "id": "023AFFB191724BF8B120C52967CE87E0",
            "externalId": "extId",
            "deleted": true
        }
    }
}

Inbound Events Confirmation

Because we have asynchronous communication, each notification after synchronization on 3rd party side is confirmed by sending a PATCH request on confirmation to the specified endpoint with the same X-message-ID setup in header as in the notification request.


Example of 3rd Party Confirmation Request

Request URL: https://et.coresystems.net/fsm-connector/api/v1/confirmation
Request Method: PATCH
Request Headers:
   Content-Type: application/json
   Authorization: Bearer {token}
   X-Client-ID: C4C
   X-Client-Version: 1.0.0
   X-Message-ID 8e515530-9eab-4a2b-9df1-83dc3bab30b3
   X-Account-ID: 560347
   X-Company-ID: 587140
   X-Account-Name: core-vama
   X-Company-Name: comp1
Request Body:
   {
      "id": "E8C3AE17A6944370A952A542475B8475",
      "externalId": "scExternalId2",
      "activities": [
         {
            "id": "5B6CCA1126D241A7A43602E3D84990C8",
            "externalId": "activityExternalId2"
         }
      ]
   }

Master Data Confirmation Acknowledgement

The following is an example of 3rd party Contact confirmation request:

Request URL: https://et.coresystems.net/api/fsm-connector/v1/confirmation/Contact Request Method: PATCH Request Headers: Content-Type: application/json Authorization: Bearer {token} X-Client-ID: C4C X-Client-Version: 1.0.0 X-Message-ID: e6d427f5-b6f5-48a1-8277-c13cb5d60720 X-Account-ID: 808209 X-Company-ID: 859805 X-Account-Name: core_sys_anup_et X-Company-Name: core_system Request Body: { “id”: “D2118E225BA443DCA8B4ACA6315CBB33”, “externalId”: “scExternalId2” }


---

### 3rd Party Attachment Confirmation Request

The following is an example of a 3rd party attachment confirmation request:

Request URL: https://et.coresystems.net/api/fsm-connector/v1/confirmation/Attachment Request Method: PATCH Request Headers: Content-Type: application/json Authorization: Bearer {token} X-Client-ID: C4C X-Client-Version: 1.0.0 X-Message-ID: ffaaff51-a877-4b01-b671-6a80c693c508 X-Account-ID: 808209 X-Company-ID: 859805 X-Account-Name: core_sys_anup_et X-Company-Name: core_system Request Body: { “id”: “F0C5E0C798A944ACA17B29A8E7B8908E”, “externalId”: “scExternalId2” }


---

## S4 Outbound

### Activity Confirmed

This SAP Field Service Management event will only be sent when TimeEffort/Expsense/Material/Mileage entries are confirmed.

```json
{
  "eventType": "activity.confirmed",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "63d9114e-8783-4c47-a4ac-a84cb7e5e319",
  "eventTime": "2019-05-08T06:40:03.111Z",
  "contentType": "application/json",
  "extensions": {
    traceId=255e041053dcc4f8
  },
  "data": {
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "263AADCA529C4D15BC4AA7F9A81AE81E",
        "code": "1",
        "externalId": "sc2ExId"
      },
      "activity": {
        "unifiedIdentifier": {
          "id": "4927D0D9B6DB4734A418B467FCE88162",
          "code": "1",
          "externalId": "act3ExId"
        },
        "activityData": {
          "id": "4927D0D9B6DB4734A418B467FCE88162",
          "code": "1",
          "externalId": "act3ExId",
          "lastChanged": 1554703397213,
          "subject": "test1",
          "remarks": null,
          "contact": {
            "id": "F9A2DB4E9BE047348A2682D63408D176",
            "code": "kiw",
            "externalId": "C00004_kiw@coresystems.net"
          },
          "createPerson": {
            "id": "14523B3D57424338858CB56BBF120696",
            "code": "admin",
            "externalId": "admin"
          },
          "durationInMinutes": null,
          "dueDateTime": "2019-04-08T21:59:00Z",
          "earliestStartDateTime": "2019-04-08T05:14:00Z",
          "status": "CLOSED",
          "address": null,
          "equipment": null,
          "responsibles": [
            {
              "id": "60A745386C71444B96B29FBCCFC46C39",
              "code": null,
              "externalId": "tech1"
            }
          ],
          "reservedMaterials": [],
          "type": "ASSIGNMENT",
          "sourceActivity": {
            "id": "CDA7EF1624E849FF91846CF27420FFEB",
            "code": "77",
            "externalId": "activityExternalId1"
          }
        },
        "timeEfforts": [
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "8F5798B7F0AF434495DF9579A1E8A46C",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554480660624,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-05T18:12:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-05T16:11:00Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-05T16:10:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": "Effort2",
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "05A78AED82924F3DBEE1E672C8B3CDCC",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554480636038,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-05T17:11:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-05T16:10:35Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-05T16:10:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": "Effort1",
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "expenses": [
          {
            "date": "2019-04-05",
            "code": null,
            "lastChanged": 1554480782766,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "tax": null,
            "owners": null,
            "type": {
              "code": "2",
              "externalId": "ET2",
              "id": "DB4AF371046544EF851AB28DB4C2CBF3"
            },
            "branches": null,
            "chargeOption": "NONCHARGEABLE",
            "createDateTime": "2019-04-05T16:13:02Z",
            "externalAmount": {
              "amount": 200.0,
              "currency": "EUR"
            },
            "syncObjectKPIs": null,
            "inactive": false,
            "udfMetaGroups": null,
            "internalAmount": {
              "amount": 100.0,
              "currency": "EUR"
            },
            "location": null,
            "id": "48A8C5EAFE4649369308A51F9905EEB5",
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "materials": [
          {
            "date": "2019-04-05",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "50926FA7BCAF40B59E2812E2712F0435",
            "unitPrice": {
              "amount": 200.0,
              "currency": "EUR"
            },
            "item": {
              "code": "5",
              "externalId": "I000005",
              "id": "16418A0965D14E699279EBD8E8353CC2"
            },
            "quantity": 30.0,
            "serialNumbers": [],
            "lastChanged": 1554480964210,
            "equipment": "13FDBBE52C144D9CA7899F53E9CD428D",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-05T16:16:00Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": "Material2 Item2",
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED",
            "reservedMaterials": []
          },
          {
            "date": "2019-04-05",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "3D1F030C1F6F4A5CBEC8714A986FD2AC",
            "unitPrice": {
              "amount": 100.0,
              "currency": "EUR"
            },
            "item": {
              "code": "4",
              "externalId": "I000004",
              "id": "A0B3E87B3C534C91B3DC5ED703443C2B"
            },
            "quantity": 50.0,
            "serialNumbers": [],
            "lastChanged": 1554480912558,
            "equipment": "13FDBBE52C144D9CA7899F53E9CD428D",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-05T16:15:12Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": "Material1 Item1",
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED",
            "reservedMaterials": [
              {
                "id": "605D75A14E8843F9A84421EA54E0E52E",
                "code": null,
                "externalId": "82"
              }
            ]
          }
        ],
        "mileages": [
          {
            "date": null,
            "code": null,
            "distance": null,
            "destination": null,
            "owners": null,
            "source": null,
            "type": null,
            "travelEndDateTime": "2019-04-05T17:17:00Z",
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "travelEndDateTimeTimeZoneId": "Europe/Warsaw",
            "inactive": false,
            "travelStartDateTime": "2019-04-05T16:16:00Z",
            "id": "D75A874458BD48BD9FEDA9CCB28D2B10",
            "travelStartDateTimeTimeZoneId": "Europe/Warsaw",
            "lastChanged": 1554480993669,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "branches": null,
            "createDateTime": "2019-04-05T16:16:33Z",
            "driver": false,
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "privateCar": false,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "4927D0D9B6DB4734A418B467FCE88162",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ]
      }
    }
  }
}

Activity Completed

This event occurs when activity.status == CLOSED and all related EMME entries (timeEffort/expense/material/mileage) are in final Approval status (APPROVED or DECLINED_CLOSED).

For example:

  • The Activity was closed and all related EMME entries (timeEffort/expense/material/mileage) were already in final Approval status (APPROVED or DECLINED_CLOSED).

Example Payload for Completed Activiy


{
  "eventType": "activity.completed",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "67795466-3882-484b-893b-cc4b541efb98",
  "eventTime": "2019-05-03T16:40:06.417Z",
  "contentType": "application/json",
  "extensions": {
    traceId=8fcc999fabb0e8b7
  },
  "data": {
    "id": "499EFD59949A46F99E91B72CB26FB291",
    "code": "31",
    "externalId": "sc1ExternalId",
    "lastChanged": 1552948361383,
    "businessPartner": {
      "id": "41D357DF882C448CAE9795501BA00D40",
      "code": null,
      "externalId": null
    },
    "contact": null,
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": null,
      "externalId": "admin"
    },
    "dueDateTime": "2018-07-02T21:59:59Z",
    "earliestStartDateTime": "2018-07-02T16:15:00Z",
    "durationInMinutes": null,
    "equipments": [
      {
        "id": "5D398AC9985F4019930FD7CB09AD8765",
        "code": "6",
        "externalId": "E000004"
      }
    ],
    "status": "-2",
    "origin": "-1",
    "problemType": null,
    "priority": "MEDIUM",
    "remarks": null,
    "resolution": null,
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": null,
        "externalId": "admin"
      }
    ],
    "subject": "Install new ticket scanners",
    "address": null,
    "activities": [
      {
        "id": "4100432D358144C8BEC8B697D6B9F6D4",
        "code": "29",
        "externalId": null,
        "lastChanged": 1530545979996,
        "subject": "Install new ticket scanners",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": null,
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2018-07-02T21:59:00Z",
        "earliestStartDateTime": "2018-07-02T15:38:00Z",
        "status": "DRAFT",
        "address": null,
        "equipment": {
          "id": "5D398AC9985F4019930FD7CB09AD8765",
          "code": "6",
          "externalId": "E000004"
        },
        "responsibles": [],
        "reservedMaterials": []
      },
      {
        "id": "FFE617B34D5341DDA5EB371B85696450",
        "code": "73",
        "externalId": null,
        "lastChanged": 1554703397213,
        "subject": "test1",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-04-08T21:59:00Z",
        "earliestStartDateTime": "2019-04-08T05:14:00Z",
        "status": "CLOSED",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "60A745386C71444B96B29FBCCFC46C39",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "eventType": "activity.completed",
        "timeEfforts": [
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "D8C00CB4086B4870A5A93C675E992608",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702220040,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:44:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:43:39Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:43:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "4661A9FDA3F34B76B7E82F5B08668248",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702192939,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:44:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:43:12Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:42:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          },
          {
            "subTask": null,
            "totalPrice": null,
            "discount": null,
            "owners": null,
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "inactive": false,
            "startDateTimeTimeZoneId": "Europe/Warsaw",
            "endDateTimeTimeZoneId": "Europe/Warsaw",
            "id": "BCF8BAB781AD4CEABAEB78FACC25CC6E",
            "breakInMinutes": 0,
            "unitPrice": null,
            "timeZoneId": "UTC+02:00",
            "lastChanged": 1554702264961,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "endDateTime": "2019-04-08T05:43:00Z",
            "branches": null,
            "internalRemarks": null,
            "createDateTime": "2019-04-08T05:42:49Z",
            "breakStartDateTime": null,
            "startDateTime": "2019-04-08T05:42:00Z",
            "task": null,
            "udfMetaGroups": null,
            "breakStartDateTimeTimeZoneId": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_CHANGE_FOR_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "DECLINED_CLOSED"
          }
        ],
        "expenses": [
          {
            "date": "2019-04-08",
            "code": null,
            "lastChanged": 1554702331208,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "tax": null,
            "owners": null,
            "type": {
              "code": "2",
              "externalId": "ET2",
              "id": "DB4AF371046544EF851AB28DB4C2CBF3"
            },
            "branches": null,
            "chargeOption": "NONCHARGEABLE",
            "createDateTime": "2019-04-08T05:45:31Z",
            "externalAmount": {
              "amount": 150.0,
              "currency": "EUR"
            },
            "syncObjectKPIs": null,
            "inactive": false,
            "udfMetaGroups": null,
            "internalAmount": {
              "amount": 100.0,
              "currency": "EUR"
            },
            "location": null,
            "id": "F492C952B1EC42B2A22C77268AB68AC1",
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "materials": [
          {
            "date": "2019-04-08",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "8F7D49964A48497986941A34D373D21B",
            "unitPrice": {
              "amount": 70.0,
              "currency": "EUR"
            },
            "item": {
              "code": "5",
              "externalId": "I000005",
              "id": "16418A0965D14E699279EBD8E8353CC2"
            },
            "quantity": 5.0,
            "serialNumbers": [],
            "lastChanged": 1554702456289,
            "equipment": "338B8383CAF249DEB8565FFB83376B59",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-08T05:46:53Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_CHANGE_FOR_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "DECLINED_CLOSED"
          },
          {
            "date": "2019-04-08",
            "code": null,
            "owners": null,
            "managedByBatchItems": [],
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "itemName": null,
            "inactive": false,
            "id": "5CAF2FA4B5A1408C860A5ED71D70EEC8",
            "unitPrice": {
              "amount": 3.0,
              "currency": "EUR"
            },
            "item": {
              "code": "4",
              "externalId": "I000004",
              "id": "A0B3E87B3C534C91B3DC5ED703443C2B"
            },
            "quantity": 5.0,
            "serialNumbers": [],
            "lastChanged": 1554702374691,
            "equipment": "13FDBBE52C144D9CA7899F53E9CD428D",
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "warehouse": "02EA5504744746C7AA14574ECC6BEA41",
            "branches": null,
            "createDateTime": "2019-04-08T05:46:14Z",
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ],
        "mileages": [
          {
            "date": null,
            "code": null,
            "distance": null,
            "destination": null,
            "owners": null,
            "source": null,
            "type": null,
            "travelEndDateTime": "2019-04-08T05:47:00Z",
            "chargeOption": "NONCHARGEABLE",
            "syncObjectKPIs": null,
            "travelEndDateTimeTimeZoneId": "Europe/Warsaw",
            "inactive": false,
            "travelStartDateTime": "2019-04-08T05:46:00Z",
            "id": "7301701CD4434FB6A611E79FC5E7AD32",
            "travelStartDateTimeTimeZoneId": "Europe/Warsaw",
            "lastChanged": 1554702440308,
            "createPerson": "60A745386C71444B96B29FBCCFC46C39",
            "externalId": null,
            "groups": null,
            "branches": null,
            "createDateTime": "2019-04-08T05:47:20Z",
            "driver": false,
            "udfMetaGroups": null,
            "location": null,
            "udfValues": null,
            "privateCar": false,
            "lastChangedBy": "14523B3D57424338858CB56BBF120696",
            "remarks": null,
            "syncStatus": "REQUIRES_APPROVAL",
            "object": {
              "objectId": "FFE617B34D5341DDA5EB371B85696450",
              "objectType": "ACTIVITY"
            },
            "approvalStatus": "APPROVED"
          }
        ]
      }
    ],
    "reservedMaterials": []
  }
}

Activity Updated

This event is sent when an Activity is updated in FSM.

Example Payload of Activity Update

{
  "eventType": "activity.updated",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "fab8eed46-db90-4cd8-8406-bb1a9c1a4b3b",
  "eventTime": "2019-04-24T16:38:05.304Z",
  "contentType": "application/json",
  "extensions": {
    traceId=cf540a334bcfbb3d
  },
  "data": {
    "updatedProperty": [
      "dueDateTime",
      "earliestStartDateTime",
      "equipment",
      "subject"
    ],
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "82AFA79C6A28426FBB8150DE3AB34042",
        "code": "74",
        "externalId": "scExId1"
      },
      "activity": {
        "id": "90A973F2CF144493A433DE245DDEB83C",
        "code": "121",
        "externalId": null,
        "lastChanged": 1565709064354,
        "subject": "Broken laptop screen",
        "remarks": null,
        "contact": {
          "id": "D0725AA6243A4470A49C0052232CA898",
          "code": null,
          "externalId": null
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-08-13T21:58:00Z",
        "plannedStartDate": "2019-08-13T15:01:00Z",
        "plannedEndDate": "2019-08-13T17:01:00Z",
        "earliestStartDateTime": "2019-08-13T15:01:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": {
          "id": "3B981A0D8206421393DB124C2430F95E",
          "code": "NA-ZP758",
          "externalId": "NA-ZP758"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": null
      }
    }
  }
}

Service Call Updated

This event is sent when ServiceCall or Activity or ReservedMaterial is updated in FSM, but also when subresources (like Activity and ReservedMaterial) are created when ServiceCall already exists, so example:

  • Creation of Activity (when ServiceCall already exists)
  • Creation of ReservedMaterial (when ServiceCall aleady exists)
  • Update of ServiceCall or Activity or ReservedMaterial
  • Activity has been relased as an assignment (then activity.status will be changed from DRAFT to OPEN)

Example Payload for Activty Creation on Existing Service Call

{
  "eventType": "servicecall.updated",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "400b2ae9-26b3-4e81-b63d-a88ad26b61f6",
  "eventTime": "2019-11-25T14:03:46.345Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "f4e49121cf74c09b"
  },
  "data": {
    "id": "341CF3E2B64346AC8F2ACAD42A004046",
    "code": "102",
    "externalId": null,
    "lastChanged": 1574690605940,
    "businessPartner": {
      "id": "3C59E62AE3E846FAA5CFE62060B66022",
      "code": "C0004",
      "externalId": "C0004"
    },
    "contact": null,
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": "admin",
      "externalId": "admin"
    },
    "dueDateTime": "2019-04-28T18:22:00Z",
    "earliestStartDateTime": "2019-04-18T18:02:00Z",
    "durationInMinutes": 100,
    "equipments": [
      {
        "id": "E79E7FDBE94C4D728C15ADB1E8055609",
        "code": "NA-MZ-FG-R100-234",
        "externalId": "NA-MZ-FG-R100-234"
      },
      {
        "id": "3B981A0D8206421393DB124C2430F95E",
        "code": "NA-ZP758",
        "externalId": "NA-ZP758"
      }
    ],
    "status": "-2",
    "origin": "-3",
    "problemType": "-1",
    "priority": "MEDIUM",
    "remarks": "My favourite remarks",
    "resolution": "Repair",
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": "admin",
        "externalId": "admin"
      }
    ],
    "subject": "C4C Test4",
    "address": {
      "source": "SERVICECALL",
      "sourceId": "341CF3E2B64346AC8F2ACAD42A004046",
      "country": null,
      "state": null,
      "city": "Warsaw",
      "zipCode": "7007",
      "street": "Marszalkowska",
      "streetNumber": null,
      "location": null
    },
    "activities": [
      {
        "id": "CCE1863FEF484B71A5B141303CBFF03F",
        "code": "167",
        "externalId": null,
        "lastChanged": 1574690626991,
        "subject": "Second activity created",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-04-28T18:22:00Z",
        "plannedStartDate": "2019-04-18T18:02:00Z",
        "plannedEndDate": "2019-04-18T19:42:00Z",
        "earliestStartDateTime": "2019-04-18T18:02:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": {
          "source": "SERVICECALL",
          "sourceId": "341CF3E2B64346AC8F2ACAD42A004046",
          "country": null,
          "state": null,
          "city": "Warsaw",
          "zipCode": "7007",
          "street": "Marszalkowska",
          "streetNumber": null,
          "location": null
        },
        "equipment": {
          "id": "E79E7FDBE94C4D728C15ADB1E8055609",
          "code": "NA-MZ-FG-R100-234",
          "externalId": "NA-MZ-FG-R100-234"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true,
            "updatedProperty": []
          },
          {
            "skill": {
              "id": "8A725CD061A8432680C017042EDA4505",
              "code": null,
              "externalId": "BIKE_SERVICE"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
              "code": null,
              "externalId": "Visa China"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "20F284D5A6544547AF1E2485D9E4CE62",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
              "code": null,
              "externalId": "BIKE_ACCESSORIES_INSTALLATION"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
              "code": null,
              "externalId": "BIKE_REPAIR"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "325FA92E370B4559BABB1B1EDD020FDB",
              "code": null,
              "externalId": "English"
            },
            "mandatory": true,
            "inherited": true
          }
        ],
        "region": null
      },
      {
        "id": "02A91FA685544472934D83BE6C204790",
        "code": "166",
        "externalId": null,
        "lastChanged": 1574452668202,
        "subject": "C4C Test3",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": 15,
        "dueDateTime": "2019-04-28T18:22:57Z",
        "plannedStartDate": null,
        "plannedEndDate": null,
        "earliestStartDateTime": "2019-04-18T18:02:57Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": {
          "id": "E79E7FDBE94C4D728C15ADB1E8055609",
          "code": "NA-MZ-FG-R100-234",
          "externalId": "NA-MZ-FG-R100-234"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true,
            "updatedProperty": []
          },
          {
            "skill": {
              "id": "8A725CD061A8432680C017042EDA4505",
              "code": null,
              "externalId": "BIKE_SERVICE"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
              "code": null,
              "externalId": "Visa China"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "20F284D5A6544547AF1E2485D9E4CE62",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
              "code": null,
              "externalId": "BIKE_ACCESSORIES_INSTALLATION"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
              "code": null,
              "externalId": "BIKE_REPAIR"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "325FA92E370B4559BABB1B1EDD020FDB",
              "code": null,
              "externalId": "English"
            },
            "mandatory": true,
            "inherited": true
          }
        ],
        "region": null
      }
    ],
    "reservedMaterials": [
      {
        "id": "01EE3E06F96E474683C426068CB025D2",
        "externalId": null,
        "item": {
          "id": "880A069737D5426D956F68CA3FB77997",
          "code": "MZ-FG-C900",
          "externalId": "MZ-FG-C900"
        },
        "serialNumber": null,
        "quantity": 21.0,
        "warehouse": {
          "id": "7862C472CEC848BDBD8A85074A5A9C7B",
          "code": "R001",
          "externalId": null
        },
        "used": 0.0,
        "moved": 0.0,
        "shipped": null,
        "udfValues": null
      },
      {
        "id": "27666AFA6F124DC6BBF3A3425AACD2A5",
        "externalId": null,
        "item": {
          "id": "880A069737D5426D956F68CA3FB77997",
          "code": "MZ-FG-C900",
          "externalId": "MZ-FG-C900"
        },
        "serialNumber": null,
        "quantity": 20.0,
        "warehouse": {
          "id": "7862C472CEC848BDBD8A85074A5A9C7B",
          "code": "R001",
          "externalId": null
        },
        "used": 0.0,
        "moved": 0.0,
        "shipped": null,
        "udfValues": null
      }
    ],
    "type": null,
    "attachments": [],
    "udfValues": null,
    "requirements": [
      {
        "skill": {
          "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
          "code": null,
          "externalId": "Visa China"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "6658A4CF66314DFAADA702C0246346DB",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "20F284D5A6544547AF1E2485D9E4CE62",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "325FA92E370B4559BABB1B1EDD020FDB",
          "code": null,
          "externalId": "English"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
          "code": null,
          "externalId": "BIKE_ACCESSORIES_INSTALLATION"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
          "code": null,
          "externalId": "BIKE_REPAIR"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "8A725CD061A8432680C017042EDA4505",
          "code": null,
          "externalId": "BIKE_SERVICE"
        },
        "mandatory": true,
        "inherited": true
      }
    ]
  }
}

Example Payload for Subject and Equipment on Updated Service Call

{
  "eventType": "servicecall.updated",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "337bd83c-074c-4325-bf1a-fedf843afafe",
  "eventTime": "2019-11-25T14:06:51.134Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "9e96457b3f5328fa"
  },
  "data": {
    "id": "341CF3E2B64346AC8F2ACAD42A004046",
    "code": "102",
    "externalId": null,
    "lastChanged": 1574690811131,
    "businessPartner": {
      "id": "3C59E62AE3E846FAA5CFE62060B66022",
      "code": "C0004",
      "externalId": "C0004"
    },
    "contact": null,
    "createPerson": {
      "id": "14523B3D57424338858CB56BBF120696",
      "code": "admin",
      "externalId": "admin"
    },
    "dueDateTime": "2019-04-28T18:22:00Z",
    "earliestStartDateTime": "2019-04-18T18:02:00Z",
    "durationInMinutes": 100,
    "equipments": [
      {
        "id": "A353A5739FFE417792A2AD350822FB44",
        "code": "MZ-FG-M500",
        "externalId": "MZ-FG-M500"
      },
      {
        "id": "3B981A0D8206421393DB124C2430F95E",
        "code": "NA-ZP758",
        "externalId": "NA-ZP758"
      }
    ],
    "status": "-2",
    "origin": "-3",
    "problemType": "-1",
    "priority": "MEDIUM",
    "remarks": "My favourite remarks",
    "resolution": "Repair",
    "responsibles": [
      {
        "id": "14523B3D57424338858CB56BBF120696",
        "code": "admin",
        "externalId": "admin"
      }
    ],
    "subject": "C4C Test change",
    "address": {
      "source": "SERVICECALL",
      "sourceId": "341CF3E2B64346AC8F2ACAD42A004046",
      "country": null,
      "state": null,
      "city": "Warsaw",
      "zipCode": "7007",
      "street": "Marszalkowska",
      "streetNumber": null,
      "location": null
    },
    "activities": [
      {
        "id": "CCE1863FEF484B71A5B141303CBFF03F",
        "code": "167",
        "externalId": null,
        "lastChanged": 1574690626991,
        "subject": "Second activity created",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-04-28T18:22:00Z",
        "plannedStartDate": "2019-04-18T18:02:00Z",
        "plannedEndDate": "2019-04-18T19:42:00Z",
        "earliestStartDateTime": "2019-04-18T18:02:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": {
          "source": "SERVICECALL",
          "sourceId": "341CF3E2B64346AC8F2ACAD42A004046",
          "country": null,
          "state": null,
          "city": "Warsaw",
          "zipCode": "7007",
          "street": "Marszalkowska",
          "streetNumber": null,
          "location": null
        },
        "equipment": {
          "id": "E79E7FDBE94C4D728C15ADB1E8055609",
          "code": "NA-MZ-FG-R100-234",
          "externalId": "NA-MZ-FG-R100-234"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "8A725CD061A8432680C017042EDA4505",
              "code": null,
              "externalId": "BIKE_SERVICE"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
              "code": null,
              "externalId": "Visa China"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "20F284D5A6544547AF1E2485D9E4CE62",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
              "code": null,
              "externalId": "BIKE_ACCESSORIES_INSTALLATION"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
              "code": null,
              "externalId": "BIKE_REPAIR"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "325FA92E370B4559BABB1B1EDD020FDB",
              "code": null,
              "externalId": "English"
            },
            "mandatory": true,
            "inherited": true
          }
        ],
        "region": null
      },
      {
        "id": "02A91FA685544472934D83BE6C204790",
        "code": "166",
        "externalId": null,
        "lastChanged": 1574452668202,
        "subject": "C4C Test3",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": 15,
        "dueDateTime": "2019-04-28T18:22:57Z",
        "plannedStartDate": null,
        "plannedEndDate": null,
        "earliestStartDateTime": "2019-04-18T18:02:57Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": {
          "id": "E79E7FDBE94C4D728C15ADB1E8055609",
          "code": "NA-MZ-FG-R100-234",
          "externalId": "NA-MZ-FG-R100-234"
        },
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "6658A4CF66314DFAADA702C0246346DB",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "8A725CD061A8432680C017042EDA4505",
              "code": null,
              "externalId": "BIKE_SERVICE"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
              "code": null,
              "externalId": "Visa China"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "20F284D5A6544547AF1E2485D9E4CE62",
              "code": null,
              "externalId": null
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
              "code": null,
              "externalId": "BIKE_ACCESSORIES_INSTALLATION"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
              "code": null,
              "externalId": "BIKE_REPAIR"
            },
            "mandatory": true,
            "inherited": true
          },
          {
            "skill": {
              "id": "325FA92E370B4559BABB1B1EDD020FDB",
              "code": null,
              "externalId": "English"
            },
            "mandatory": true,
            "inherited": true
          }
        ],
        "region": null
      }
    ],
    "reservedMaterials": [
      {
        "id": "01EE3E06F96E474683C426068CB025D2",
        "externalId": null,
        "item": {
          "id": "880A069737D5426D956F68CA3FB77997",
          "code": "MZ-FG-C900",
          "externalId": "MZ-FG-C900"
        },
        "serialNumber": null,
        "quantity": 21.0,
        "warehouse": {
          "id": "7862C472CEC848BDBD8A85074A5A9C7B",
          "code": "R001",
          "externalId": null
        },
        "used": 0.0,
        "moved": 0.0,
        "shipped": null,
        "udfValues": null
      },
      {
        "id": "27666AFA6F124DC6BBF3A3425AACD2A5",
        "externalId": null,
        "item": {
          "id": "880A069737D5426D956F68CA3FB77997",
          "code": "MZ-FG-C900",
          "externalId": "MZ-FG-C900"
        },
        "serialNumber": null,
        "quantity": 20.0,
        "warehouse": {
          "id": "7862C472CEC848BDBD8A85074A5A9C7B",
          "code": "R001",
          "externalId": null
        },
        "used": 0.0,
        "moved": 0.0,
        "shipped": null,
        "udfValues": null
      }
    ],
    "type": null,
    "attachments": [],
    "udfValues": null,
    "requirements": [
      {
        "skill": {
          "id": "881FBB368EBA4AF8A84FDC71EB09EA74",
          "code": null,
          "externalId": "Visa China"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "6658A4CF66314DFAADA702C0246346DB",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "20F284D5A6544547AF1E2485D9E4CE62",
          "code": null,
          "externalId": null
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "325FA92E370B4559BABB1B1EDD020FDB",
          "code": null,
          "externalId": "English"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "575ED1D0CDA84F9AB5AD44DBFEB5C7E5",
          "code": null,
          "externalId": "BIKE_ACCESSORIES_INSTALLATION"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "9DD96B1F30D8411FAC86CDDEC30B6022",
          "code": null,
          "externalId": "BIKE_REPAIR"
        },
        "mandatory": true,
        "inherited": true
      },
      {
        "skill": {
          "id": "8A725CD061A8432680C017042EDA4505",
          "code": null,
          "externalId": "BIKE_SERVICE"
        },
        "mandatory": true,
        "inherited": true
      }
    ],
    "updatedProperty": [
      "equipments",
      "subject"
    ]
  }
}


Activity Released

Example Payload when Assignment Released for Activity (activity.status Changed to OPEN)

{
  "eventType": "activity.released",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "1ccf9173-8bb0-43d5-b2c1-5d92ad3ee883",
  "eventTime": "2019-04-24T19:31:25.747Z",
  "contentType": "application/json",
  "extensions": {
    traceId=255e041053dcc4f8
  },
  "data": {
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "540D194B05184F0EBFC78BC6CBE81C8A",
        "code": "67",
        "externalId": "scExId1"
      },
      "activity": {
        "id": "E6CEE792C22A417093E158E4435933E0",
        "code": "114",
        "externalId": "actExId1",
        "lastChanged": 1565709890341,
        "subject": "aaa",
        "remarks": null,
        "contact": {
          "id": "ECD444A9DB294E73AFA3163ADC25A7A6",
          "code": null,
          "externalId": null
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-06-27T21:59:00Z",
        "plannedStartDate": "2019-07-26T11:15:00Z",
        "plannedEndDate": "2019-07-26T13:15:00Z",
        "earliestStartDateTime": "2019-06-27T12:19:00Z",
        "status": "OPEN",
        "executionStage": "EXECUTION",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "CA971D25D8194C4983EE1183E01ADF48",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": null,
        "attachments": [],
        "udfValues": null,
        "requirements": null
      }
    }
  }
}

Duplicate Activity

When from UI you will choose duplicate functionality and assign to new technician then will cause to trigger two events:

  • activity.created of new activity with sourceActivity property referencing to activity from which was done duplication.
  • activity.updated with responsible person change, pointing to current technician assignment.

Example Payload for Duplicate Activity Created

{
  "eventType": "activity.created",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "1ccf9173-8bb0-43d5-b2c1-5d92ad3ee883",
  "eventTime": "2019-04-24T19:31:25.747Z",
  "contentType": "application/json",
  "extensions": {
    traceId=255e041053dcc4f8
  },
  "data": {
    "updatedProperty": [],
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "540D194B05184F0EBFC78BC6CBE81C8A",
        "code": "67",
        "externalId": "null"
      },
      "activity": {
        "id": "C448F14991DA46CBA2875FF1843DCA6F",
        "code": "122",
        "externalId": null,
        "lastChanged": 1565710053485,
        "subject": "aaa",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-07-26T13:15:00Z",
        "plannedStartDate": "2019-07-26T11:15:00Z",
        "plannedEndDate": "2019-07-26T13:15:00Z",
        "earliestStartDateTime": "2019-07-26T11:15:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": null,
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": {
          "id": "E6CEE792C22A417093E158E4435933E0",
          "code": "114",
          "externalId": "actExId1"
        },
        "attachments": [],
        "udfValues": null,
        "requirements": null
      }
    }
  }
}

Example Payload for Duplicate Activity Updated

  "eventType": "activity.updated",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "fsm-connector/api/v1",
  "eventID": "fab8eed46-db90-4cd8-8406-bb1a9c1a4b3b",
  "eventTime": "2019-04-24T16:38:05.304Z",
  "contentType": "application/json",
  "extensions": {
    traceId=cf540a334bcfbb3d
  },
  "data": {
    "updatedProperty": [
      "responsibles"
    ],
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "540D194B05184F0EBFC78BC6CBE81C8A",
        "code": "67",
        "externalId": "null"
      },
      "activity": {
        "id": "C448F14991DA46CBA2875FF1843DCA6F",
        "code": "122",
        "externalId": null,
        "lastChanged": 1565710054450,
        "subject": "aaa",
        "remarks": null,
        "contact": null,
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-07-26T13:15:00Z",
        "plannedStartDate": "2019-07-26T11:15:00Z",
        "plannedEndDate": "2019-07-26T13:15:00Z",
        "earliestStartDateTime": "2019-07-26T11:15:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "31E680DFC6994D81A36AAC5B8C3F934E",
            "code": "tech2",
            "externalId": "tech2"
          }
        ],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": {
          "id": "E6CEE792C22A417093E158E4435933E0",
          "code": "114",
          "externalId": null
        },
        "attachments": [],
        "udfValues": null,
        "requirements": null
      }
    }
  }
}

“activity.replannedreleased” / “activity.releasedunassigned”

There are two scenarios when at the same time the same one activity is closed and created new one (with reference to the old activity) and special events needs to be generated:

eventType Occurs When Impact
"activity.replannedreleased" Generated when there will be steps: activity assigned to technician / released / replaned to other technician / released A new activity will be have status: OPEN and will have setup sourceActivity referencing to the activity from which it was duplicated.
"activity.releasedunassigned" Generated when there will be steps: activity assigned to technician / released / unassigned. A new activity will be have status: DRAFT and will have setup sourceActivity referencing to the activity from which it was duplicated.

In both cases if the CLOSED activity is in the same time completed then in the payload there will be extra node "sourceActivityCompleted" containing similar payload as activity.completed event.

Otherwise this node "sourceActivityCompleted" will be set to null.


Example Payload for “eventType”: “activity.releasedunassigned” with sourceActivityCompleted

{
  "eventType": "activity.releasedunassigned",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "c9adf31a-36bd-493c-8bc0-fe9481f21b18",
  "eventTime": "2019-11-09T16:18:36.943Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "54f0315e16935b36"
  },
  "data": {
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "1F8776CDFC8D4AE09EBEFA110D9DC3F9",
        "code": "48",
        "externalId": "null"
      },
      "activity": {
        "id": "189D05D0E67348CC8D4E1FD85DED85EC",
        "code": "107",
        "externalId": null,
        "lastChanged": 1573316317493,
        "subject": "Mango test 3",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-06-27T21:59:00Z",
        "plannedStartDate": "2019-11-11T08:45:00Z",
        "plannedEndDate": "2019-11-11T10:45:00Z",
        "earliestStartDateTime": "2019-06-27T10:38:00Z",
        "status": "DRAFT",
        "executionStage": "DISPATCHING",
        "address": null,
        "equipment": null,
        "responsibles": [],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": {
          "id": "6DC936AFD69448B38269CBEC25EEE24F",
          "code": "96",
          "externalId": null
        },
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
              "code": null,
              "externalId": "German"
            },
            "mandatory": false,
            "inherited": true
          }
        ],
        "region": null
      },
      "sourceActivityCompleted": {
        "unifiedIdentifier": {
          "id": "6DC936AFD69448B38269CBEC25EEE24F",
          "code": "96",
          "externalId": "null"
        },
        "activityData": {
          "id": "6DC936AFD69448B38269CBEC25EEE24F",
          "code": "96",
          "externalId": null,
          "lastChanged": 1573316317168,
          "subject": "CANCELLED - Mango test 3",
          "remarks": null,
          "contact": {
            "id": "F9A2DB4E9BE047348A2682D63408D176",
            "code": "kiw",
            "externalId": "C00004_kiw@coresystems.net"
          },
          "createPerson": {
            "id": "14523B3D57424338858CB56BBF120696",
            "code": "admin",
            "externalId": "admin"
          },
          "durationInMinutes": null,
          "dueDateTime": "2019-06-27T21:59:00Z",
          "plannedStartDate": "2019-11-11T08:45:00Z",
          "plannedEndDate": "2019-11-11T10:45:00Z",
          "earliestStartDateTime": "2019-06-27T10:38:00Z",
          "status": "CLOSED",
          "executionStage": "CANCELLED",
          "address": null,
          "equipment": null,
          "responsibles": [
            {
              "id": "EC5E479D1F224757BCC9671CB052A61D",
              "code": null,
              "externalId": "tech2"
            }
          ],
          "reservedMaterials": [],
          "type": "ASSIGNMENT",
          "sourceActivity": null,
          "attachments": [],
          "udfValues": null,
          "requirements": [
            {
              "skill": {
                "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
                "code": null,
                "externalId": "German"
              },
              "mandatory": false,
              "inherited": true
            }
          ],
          "region": null
        },
        "timeEfforts": [],
        "expenses": [],
        "materials": [],
        "mileages": []
      }
    }
  }
}

Example Palyoad for “eventType”: “activity.replannedreleased” with sourceActivityCompleted

{
  "eventType": "activity.replannedreleased",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "44a91783-27f7-47fe-90a8-a53af89dcd77",
  "eventTime": "2019-11-09T15:40:57.882Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "bdda2f2ba2f5796a"
  },
  "data": {
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "E48360F3414F4092A599A0B02B29FA51",
        "code": "47",
        "externalId": "null"
      },
      "activity": {
        "id": "BF6D7CCEF5DD4A0A94B6082A824824DE",
        "code": "106",
        "externalId": null,
        "lastChanged": 1573314058438,
        "subject": "Mango test2",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-06-27T21:59:00Z",
        "plannedStartDate": "2019-11-11T02:30:00Z",
        "plannedEndDate": "2019-11-11T04:30:00Z",
        "earliestStartDateTime": "2019-06-27T10:34:00Z",
        "status": "OPEN",
        "executionStage": "EXECUTION",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "60A745386C71444B96B29FBCCFC46C39",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": {
          "id": "453D4613388D4A889C55D5E2E736C12F",
          "code": "95",
          "externalId": null
        },
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
              "code": null,
              "externalId": "German"
            },
            "mandatory": false,
            "inherited": true
          }
        ],
        "region": null
      },
      "sourceActivityCompleted": {
        "unifiedIdentifier": {
          "id": "453D4613388D4A889C55D5E2E736C12F",
          "code": "95",
          "externalId": "null"
        },
        "activityData": {
          "id": "453D4613388D4A889C55D5E2E736C12F",
          "code": "95",
          "externalId": null,
          "lastChanged": 1573314058255,
          "subject": "CANCELLED - Mango test2",
          "remarks": null,
          "contact": {
            "id": "F9A2DB4E9BE047348A2682D63408D176",
            "code": "kiw",
            "externalId": "C00004_kiw@coresystems.net"
          },
          "createPerson": {
            "id": "14523B3D57424338858CB56BBF120696",
            "code": "admin",
            "externalId": "admin"
          },
          "durationInMinutes": null,
          "dueDateTime": "2019-06-27T21:59:00Z",
          "plannedStartDate": "2019-11-11T02:30:00Z",
          "plannedEndDate": "2019-11-11T04:30:00Z",
          "earliestStartDateTime": "2019-06-27T10:34:00Z",
          "status": "CLOSED",
          "executionStage": "CANCELLED",
          "address": null,
          "equipment": null,
          "responsibles": [
            {
              "id": "B4003ECBA0354B0B89B91290F491D5C9",
              "code": null,
              "externalId": "tech3"
            }
          ],
          "reservedMaterials": [],
          "type": "ASSIGNMENT",
          "sourceActivity": null,
          "attachments": [],
          "udfValues": null,
          "requirements": [
            {
              "skill": {
                "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
                "code": null,
                "externalId": "German"
              },
              "mandatory": false,
              "inherited": true
            }
          ],
          "region": null
        },
        "timeEfforts": [],
        "expenses": [],
        "materials": [],
        "mileages": []
      }
    }
  }
}

Example Payload for “eventType”: “activity.replannedreleased” with sourceActivityCompleted null (so closed activity is not completed yet)

{
  "eventType": "activity.replannedreleased",
  "eventTypeVersion": "1.0",
  "cloudEventsVersion": "0.1",
  "source": "api/fsm-connector/v1",
  "eventID": "22aab90a-c87f-4092-8beb-213b370ff993",
  "eventTime": "2019-11-09T15:40:57.882Z",
  "contentType": "application/json",
  "extensions": {
    "traceId": "bdda2f2ba2f5796a"
  },
  "data": {
    "serviceCall": {
      "unifiedIdentifier": {
        "id": "E48360F3414F4092A599A0B02B29FA51",
        "code": "47",
        "externalId": "null"
      },
      "activity": {
        "id": "BF6D7CCEF5DD4A0A94B6082A824824DE",
        "code": "106",
        "externalId": null,
        "lastChanged": 1573314058438,
        "subject": "Mango test2",
        "remarks": null,
        "contact": {
          "id": "F9A2DB4E9BE047348A2682D63408D176",
          "code": "kiw",
          "externalId": "C00004_kiw@coresystems.net"
        },
        "createPerson": {
          "id": "14523B3D57424338858CB56BBF120696",
          "code": "admin",
          "externalId": "admin"
        },
        "durationInMinutes": null,
        "dueDateTime": "2019-06-27T21:59:00Z",
        "plannedStartDate": "2019-11-11T02:30:00Z",
        "plannedEndDate": "2019-11-11T04:30:00Z",
        "earliestStartDateTime": "2019-06-27T10:34:00Z",
        "status": "OPEN",
        "executionStage": "EXECUTION",
        "address": null,
        "equipment": null,
        "responsibles": [
          {
            "id": "60A745386C71444B96B29FBCCFC46C39",
            "code": null,
            "externalId": "tech1"
          }
        ],
        "reservedMaterials": [],
        "type": "ASSIGNMENT",
        "sourceActivity": {
          "id": "453D4613388D4A889C55D5E2E736C12F",
          "code": "95",
          "externalId": null
        },
        "attachments": [],
        "udfValues": null,
        "requirements": [
          {
            "skill": {
              "id": "344F7AB436BD4C2DAB8B9299B0A5F2EE",
              "code": null,
              "externalId": "German"
            },
            "mandatory": false,
            "inherited": true
          }
        ],
        "region": null
      },
      "sourceActivityCompleted": null
    }
  }
}