Status

DONE 

Author

Feature No.

PROCAR-501 - Getting issue details... STATUS

Test Case No.

PROCAR-507 - Getting issue details... STATUS

Related Features
Tenant

Procar

Version(s)

4.2025.0, 3.8.0-PROCAR

Conf. for Technical Upgrade

No

General Description of the Feature

This update introduces enhancements to the DSW system, specifically focusing on the handling and management of RSP+ tasks. A clear distinction is now established between External tasks, which are generated by external systems like RSP, and Internal tasks, which are created within the OneDealer system.

External tasks are set to a read-only mode within the system, meaning that while users can view these tasks, they are restricted from editing or deleting them. Additionally, the status or any other field of external tasks cannot be altered, ensuring the integrity of data imported from external sources.

To improve task accessibility, a new RSP link field has been added to task views on the "All Tasks" and "My Tasks" pages, as well as in their respective pop-up views. This allows users to quickly navigate to the relevant RSP page associated with a specific task.

Integration

The system also introduces a new service responsible for the creation and updating of tasks within OneDealer, supporting seamless integration with external systems like RSP.

Request:

~/Files/Services/ODTaskServices.onesrv?m=CreateOrUpdateTask
{
    "task": {
        "TaskCode": {
            "InternalCode": null, //IDMS_Task.Code for update
            "DMSCode": "PROCAR-501_009" //DMSCode
        },
        "CreateDate": "2024-08-13T13:11:07",
        "TaskDate": "2024-08-16",
        "Title": "Test PROCAR-501 task creation 009",
        "IsClosed": false,
        "Priority": "Medium", //Low, Medium, High
        "Subject": "TestSubjectValue 009",
        "TaskSubType": "TestSubTypeValue 009",
        "ExternalRelatedID": null,
        "VehicleCode": {
            "InternalCode": null, //XIS_Cars.Code
            "DMSCode": null // DMSCode from ODIS mapping
        },
        "ContactPersonCode": {
            "InternalCode": null, //OCPR.Code
            "DMSCode": null // DMSCode from ODIS mapping
        },
        "BusinessPartnerCode": {
            "InternalCode": null, //OCRD.Code
            "DMSCode": null // DMSCode from ODIS mapping
        },
        "UserCode": {
            "InternalCode": "270", //OUSR.Code
            "DMSCode": null //DMS mapped code
        }
    }
}


Success Response
{
  "BusinessState": {
    "BusinessStatusName": "BusinessOk",
    "BusinessStatus": 0,
    "BusinessErrors": []
  },
  "Data": {
    "CreateDate": null,
    "TaskDate": null,
    "TaskCode": {
      "InternalCode": "pLj-usUrg06fIjXyKQyKqQ",
      "ExternalCode": null,
      "DMSCode": null,
      "ExternalSystemType": null
    },
    "BusinessPartnerCode": null,
    "Title": null,
    "ContactPersonCode": null,
    "IsClosed": null,
    "UserCode": null,
    "Priority": null,
    "VehicleCode": null
  }
}


Example a possible Failed response
{
  "BusinessState": {
    "BusinessStatusName": "BusinessFailed",
    "BusinessStatus": 2,
    "BusinessErrors": [
      {
        "BusinessErrorType": 1,
        "BusinessErrorCode": 9948,
        "BusinessWarningCode": 0,
        "BusinessErrorDescription": "Cannot create new task for already existing dms code",
        "BusinessErrorResourceKey": null,
        "IsValidationError": false,
        "SourceCode": null,
        "ExternalBusinessErrorCode": null
      }
    ]
  },
  "Data": {
    "CreateDate": null,
    "TaskDate": null,
    "TaskCode": {
      "InternalCode": null,
      "ExternalCode": null,
      "DMSCode": null,
      "ExternalSystemType": null
    },
    "BusinessPartnerCode": null,
    "Title": null,
    "ContactPersonCode": null,
    "IsClosed": null,
    "UserCode": null,
    "Priority": null,
    "VehicleCode": null
  }
} 


Moreover, comprehensive validation checks have been implemented to ensure the accuracy and completeness of task data during creation and updates. This includes new database fields to better manage and store external task data, maintaining high data integrity across the system.

General Validation Rules

  1. DMS Code Missing for Task

    • Condition: If the DMS code for the task is not provided by the external system.
    • Error Message: "DMS Code for Task is empty"
  2. User Code (Internal Value) Missing

    • Condition: If the User Code (Internal Value) is empty or null.
    • Error Message: "User Code for Task is empty"
  3. User Not Found in OneDealer

    • Condition: If the user corresponding to the provided User Code (Internal Value) is not found in the OneDealer system.
    • Error Message: "No User found"
  4. Task Not Found in OneDealer

    • Condition: If a Task Code (Internal Value) is provided, but the task is not found in the OneDealer system.
    • Error Message: "No Task found"
  5. Invalid Priority Value

    • Condition: If the Priority value is not empty but does not match the accepted values.
    • Error Message: "Priority value: {task.Priority} is not valid."
    • Possible Values:
      • "Low"
      • "Medium"
      • "High"
  6. Task Creation Failure

    • Condition: If the task could not be created in the OneDealer database for an unknown reason.
    • Error Message: "Task could not be created"
  7. Task Update Failure

    • Condition: If the task could not be updated in the OneDealer database for an unknown reason.
    • Error Message: "Task could not be updated"
  8. General Unknown Error

    • Condition: If any unknown error occurs during the process in the OneDealer system.
    • Error Message: "General Unknown Error"

Procar Tenant-Specific Validation Rules

These additional rules apply only to the Procar tenant:

  1. DMS Code Already Exists

    • Condition: If the Task Code (Internal Value) is not provided, but the DMS code already exists in the OneDealer system.
    • Error Message: "Cannot create new task for already existing DMS code {extDmsIdCheck}"
  2. Task Already Linked to Another RSP Task

    • Condition: If the task should be updated, but it is already linked in the OneDealer system to another RSP task for an unknown reason.
    • Error Message: "The OD Task {taskEntryUpd.Code} is already linked with the RSP Task: {extId.U_IDMS_ID} and not the RSP Task: {task.TaskCode.DMSCode}"

External Task Request and Entity Relations

When an external task request is submitted, it can establish a relationship with various available entities within the system. This relationship is captured within the task and provides a redirection link to the respective entity for easy navigation.

Relation Check Process

  • The system checks the existence of the relational value in the order listed above.
  • If multiple entities are provided within a task request, the priority order (Leads, Vehicle, Contact Person, Business Partner) dictates which entity will be linked with the task.

This structured approach ensures that tasks are correctly associated with the most relevant entity, streamlining workflow and improving traceability.

Entity Relations and Mapping

  1. External Entity (i.e. Leads)

    • Property: ExternalRelatedID
    • Mapping: The value is mapped in the @IDMS_EXTERNAL_ID table.
    • Priority: Highest
  2. Vehicle

    • Property: VehicleCode.InternalCode
    • Mapping: XIS_CARS.Code
    • Priority: Second
  3. Contact Person

    • Property: ContactPersonCode.InternalCode
    • Mapping: OCPR.Code
    • Priority: Third
  4. Business Partner

    • Property: BusinessPartnerCode.InternalCode
    • Mapping: OCRD.Code
    • Priority: Fourth

Business Benefit 

The enhancements to the DSW system provide more robust task management capabilities, particularly in handling tasks from external systems like RSP. By restricting the editing and deletion of external tasks, the system ensures better data accuracy and reliability. The integration of direct RSP links into task views streamlines workflow efficiency, allowing users quicker access to relevant task details and improving overall task management processes.


Configuration 

Mapping

  • OneDealer to Integration Layer
    • Mapping Object: Users

Additional Information



Write a comment…