Activities (2.2.5)
An activity is a task (something to take action on and only has a start date) or an event (happened in the past, has a start and end date) captured against a customer in the DMS.
x-onbehalf-of
The user (id) of the user who is actually using this resource. This user Id should be known in the receiving system. This user ID will be used in the backend system for auditing reasons.correlation-id
A unique identifier value (GUID) that is attached to requests and messages that allow reference to a particular transaction or event chain. This ID might be required in case a support case is logged.
Changes in this version:
[2.2.5]
- Added specificationOfInterest model for GET and POST sales activities response
[2.2.4]
- Added specificationOfInterest model for SalesActivityCreateRequest
[2.2.3]
- Removed swaggerhub urls
[2.2.2]
- Server URLs changed to Keyloop
- Added 'WALK_IN', 'MANUFACTURER_LEAD' to Origin
[2.2.1]
- Change to Keyloop
- Updated mail address
- Remove reference to vehicle-data in vehicle/makeId
[2.2.0]
- Added 'campaign' details
- Added 'previousActivityId'
- Added new GET 'related-activities' endpoint
[2.1.0]
- Add Sales activity search endpoint
- Added 'duration' as a new field
- Added new types 'CUSTOMER_CONTACT', 'GENERAL_SALES_ACTIVITY', 'OTHER'
[2.0.0]
- Redesign of activities API
- Removed LEAD related dmsLink (Use LEADS API instead), use 'CustomerId' only
- Added oAuth for activity apis.
- Allow split in Sales and Aftersales activities
Get activity types
Endpoint to retrieve the available activity types for a certain activity group
Authorizations:
query Parameters
activityGroup required | string (Activity group code) Value: "SALESACTIVITIES" Example: activityGroup=SALESACTIVITIES Specifies the activity group for which the activity types should be retrieved
|
Responses
Response samples
- 200
{- "activityGroup": "SALESACTIVITIES",
- "activityTypes": [
- null
]
}
Create Sales Activity
Endpoint to create a new sales activity for an existing customer or contact record.
Authorizations:
header Parameters
x-on-behalf-of | string The user (id) of the user who is actually using this resource. This user Id should be known in the receiving system. |
Request Body schema: application/json
Create sales activity request
object (Activity classification object) Object for the classification of the activity. | |
origin | string or null (Origin) Enum: "CUSTOMER" "CALL_CENTRE" "CAMPAIGN" "EMAIL" "EXHIBITION" "POS" "RECOMMENDATION" "PHONE" "SOCIAL_MEDIA" "SHOWROOM" "WEBSITE" "OTHER" "WALK_IN" "MANUFACTURER_LEAD" Origin of the activity. |
notes | string (Activity notes) Notes relating to the activity describing the activity content are actions to take on this. |
startDateTime required | string <date-time> (Activity start date and timestamp) Activity start timestamp (UTC Time in ISO-8601 Format) |
endDateTime | string or null <date-time> (Activity end date and timestamp) Activity end timestamp (UTC Time in ISO-8601 Format) Used only in case of an activity that happened in the past and is closed (ie. an event) |
duration | integer <int32> (Activity duration (minutes)) Activity duration (in minutes) |
previousActivityId | string (Previous Activity Id) The previousActivityId is used to identify if an activity has been followed-up. It is intended to define the relation between the two activities. A new activity chain will be created when this value is not supplied. |
customerId required | string (Customer Id) Resource that is linked from DMS |
object (Vehicle object) This object is optional and is only used when the DMS supports vehicle links relating to an activity. | |
object (Specification Of Interest) This object is optional and is only used when the DMS supports vehicle links relating to an activity. Specification of interest( Or vehicle of Interest) is the addition/visibility of a vehicle of interest that can be associated to each new sales activity thread/chain from EnquiryMax to activityAPI and in turn downstream DMS. | |
object (Assigned to DMS user) The user (id) assigned to this activitye. This user Id should be known in the receiving system. | |
object (Campaign details) Campaign details for this activity | |
object (ExternalReference) External reference ID for this activity |
Responses
Request samples
- Payload
{- "classification": {
- "activityGroup": "SALESACTIVITIES",
- "activityType": "ENQUIRY_MADE"
}, - "origin": "CUSTOMER",
- "notes": "Customer has made an enquiry relating to a offer, get back in touch after a week.",
- "startDateTime": "2019-02-20T12:34:01.194Z",
- "endDateTime": "2019-02-20T12:52:08.232Z",
- "duration": 60,
- "previousActivityId": "e17179d7-5697-4693-8d36-bb1def8c7c89",
- "customerId": "781aa0d6-a540-4e4d-a121-2997bcb0b9bd",
- "vehicle": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "vehicleType": "NEW"
}, - "specificationOfInterest": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "model": "M4 Convertible - 2021",
- "variant": "M4 xDrive Competition M 2dr Step Auto [M Carbon]",
- "vehicleType": "NEW"
}, - "assignedTo": {
- "id": "AB1",
- "name": "Joe Doe",
- "email": "Joe.Doe@example.com"
}, - "campaign": {
- "externalReference": "Ref-Campaign"
}, - "externalReference": {
- "provider": "DummyProvider",
- "application": "LEADMANAGEMENT",
- "id": "6e5b8bd0-8867-446c-a3a8-8ade9f7a07a0",
}
}
Response samples
- 201
- 400
{- "activity": {
- "activityId": "6fb4ebc8-6243-4d18-9ad5-603b6ee285ad",
- "classification": {
- "activityGroup": "SALESACTIVITIES",
- "activityType": "ENQUIRY_MADE"
}, - "origin": "CUSTOMER",
- "title": "Customer enquiry made",
- "notes": "Customer has made an enquiry relating to a offer, get back in touch after a week.",
- "createdDateTime": "2019-02-21T09:01:14.002Z",
- "startDateTime": "2019-02-20T12:34:01.194Z",
- "endDateTime": "2019-02-20T12:52:08.232Z",
- "duration": 60,
- "previousActivityId": "e17179d7-5697-4693-8d36-bb1def8c7c89",
- "followUpActivityId": "fda881f2-3cda-4a47-a915-24f6ac5f466a",
- "customer": {
- "customerId": "string",
- "familyName": "string",
- "givenName": "string",
- "titleCommon": "string"
}, - "vehicle": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "vehicleType": "NEW"
}, - "specificationOfInterest": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "model": "M4 Convertible - 2021",
- "variant": "M4 xDrive Competition M 2dr Step Auto [M Carbon]",
- "vehicleType": "NEW"
}, - "assignedTo": {
- "id": "AB1",
- "name": "Joe Doe",
- "email": "Joe.Doe@example.com"
}, - "campaign": {
- "externalReference": "Ref-Campaign"
}, - "externalReference": {
- "provider": "DummyProvider",
- "application": "LEADMANAGEMENT",
- "id": "6e5b8bd0-8867-446c-a3a8-8ade9f7a07a0",
}
}, - "links": {
- "method": "GET",
- "rel": "self",
- "href": "string",
- "title": "string"
}
}
Search Sales Activity
Endpoint to search for sales activities using the fiter cirteria specified witin the query parameters - at least one search parameter must be specified.
Authorizations:
query Parameters
customerId | string |
assignedToId | string |
fromStartDateTime | string <date> |
toStartDateTime | string <date> |
page | integer >= 1 Default: 1 Examples:
A non-zero integer representing the page of the results |
pageSize | integer >= 50 Default: 50 Examples:
A non-negative, non-zero integer indicating the maximum number of results to return at one time |
Responses
Response samples
- 200
- 400
{- "salesActivities": [
- {
- "activityId": "6fb4ebc8-6243-4d18-9ad5-603b6ee285ad",
- "classification": {
- "activityGroup": "SALESACTIVITIES",
- "activityType": "ENQUIRY_MADE"
}, - "customerId": "781aa0d6-a540-4e4d-a121-2997bcb0b9bd",
- "startDateTime": "2019-02-20T12:34:01.194Z",
- "endDateTime": "2019-02-20T12:52:08.232Z"
}
], - "totalItems": 4,
- "totalPages": 1,
- "links": {
- "method": "GET",
- "rel": "self",
- "href": "string",
- "title": "string"
}
}
Get sales activity by ID
Endpoint to retrieve the details of the activity identified from the /sales-activities endpoint
Authorizations:
path Parameters
activityId required | string A unique id that identifes an individual activity resource. |
Responses
Response samples
- 200
{- "activity": {
- "activityId": "6fb4ebc8-6243-4d18-9ad5-603b6ee285ad",
- "classification": {
- "activityGroup": "SALESACTIVITIES",
- "activityType": "ENQUIRY_MADE"
}, - "origin": "CUSTOMER",
- "title": "Customer enquiry made",
- "notes": "Customer has made an enquiry relating to a offer, get back in touch after a week.",
- "createdDateTime": "2019-02-21T09:01:14.002Z",
- "startDateTime": "2019-02-20T12:34:01.194Z",
- "endDateTime": "2019-02-20T12:52:08.232Z",
- "duration": 60,
- "previousActivityId": "e17179d7-5697-4693-8d36-bb1def8c7c89",
- "followUpActivityId": "fda881f2-3cda-4a47-a915-24f6ac5f466a",
- "customer": {
- "customerId": "string",
- "familyName": "string",
- "givenName": "string",
- "titleCommon": "string"
}, - "vehicle": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "vehicleType": "NEW"
}, - "specificationOfInterest": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "model": "M4 Convertible - 2021",
- "variant": "M4 xDrive Competition M 2dr Step Auto [M Carbon]",
- "vehicleType": "NEW"
}, - "assignedTo": {
- "id": "AB1",
- "name": "Joe Doe",
- "email": "Joe.Doe@example.com"
}, - "campaign": {
- "externalReference": "Ref-Campaign"
}, - "externalReference": {
- "provider": "DummyProvider",
- "application": "LEADMANAGEMENT",
- "id": "6e5b8bd0-8867-446c-a3a8-8ade9f7a07a0",
}
}, - "links": {
- "method": "GET",
- "rel": "self",
- "href": "string",
- "title": "string"
}
}
Get related sales activities by activityId
Endpoint to retrieve the related sales activities identified from the /sales-activities/{activityId} endpoint
Authorizations:
path Parameters
activityId required | string A unique id that identifes an individual activity resource. |
Responses
Response samples
- 200
{- "salesActivities": [
- {
- "activityId": "6fb4ebc8-6243-4d18-9ad5-603b6ee285ad",
- "classification": {
- "activityGroup": "SALESACTIVITIES",
- "activityType": "ENQUIRY_MADE"
}, - "origin": "CUSTOMER",
- "title": "Customer enquiry made",
- "notes": "Customer has made an enquiry relating to a offer, get back in touch after a week.",
- "createdDateTime": "2019-02-21T09:01:14.002Z",
- "startDateTime": "2019-02-20T12:34:01.194Z",
- "endDateTime": "2019-02-20T12:52:08.232Z",
- "duration": 60,
- "previousActivityId": "e17179d7-5697-4693-8d36-bb1def8c7c89",
- "followUpActivityId": "fda881f2-3cda-4a47-a915-24f6ac5f466a",
- "customer": {
- "customerId": "string",
- "familyName": "string",
- "givenName": "string",
- "titleCommon": "string"
}, - "vehicle": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "vehicleType": "NEW"
}, - "specificationOfInterest": {
- "vehicleId": "8d796e91-6068-499c-886f-7e6f4ec324a1",
- "makeId": "BMW",
- "class": "CAR",
- "model": "M4 Convertible - 2021",
- "variant": "M4 xDrive Competition M 2dr Step Auto [M Carbon]",
- "vehicleType": "NEW"
}, - "assignedTo": {
- "id": "AB1",
- "name": "Joe Doe",
- "email": "Joe.Doe@example.com"
}, - "campaign": {
- "externalReference": "Ref-Campaign"
}, - "externalReference": {
- "provider": "DummyProvider",
- "application": "LEADMANAGEMENT",
- "id": "6e5b8bd0-8867-446c-a3a8-8ade9f7a07a0",
}
}
], - "totalItems": 4,
- "totalPages": 1,
- "links": {
- "method": "GET",
- "rel": "self",
- "href": "string",
- "title": "string"
}
}