SaveADRDetails (POST)

Overview

This API allows you to synchronize ADR (Accounting Derivation Rules) data mappings from ERP to GEP SMART system. 
ADR is way to define defaulting logic for accounting entities. Currently it is being consumed by various C2P documents. 

 

URL Format:  https://<Instance>/smartInterfaceAPI/api/ADR/SaveADRDetails
 

Request
[
   {
      "adrSetName": "string",
      "sources": [
         {
            "sourceType": "string",
            "fieldName": "string",
            "sourceValue": "string",
            "sourceLOB": "string"
         }
      ],
      "target": {
         "targetType": "string",
         "targetValue": "string",
         "targetLOB": "string"
      }
   }
]

 

Response
{
   "data": {},
   "statusCode": "string",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "string"
      }
   ]
}

 

Examples

Success Scenario - Request 

[
   {
      "adrSetName": "Company-Plant-Cat-PurGrp-30-200",
      "sources": [
         {
            "sourceType": "Org Entity",
            "fieldName": "Plant",
            "sourceValue": "M253",
            "sourceLOB": "30-200"
         },
         {
            "sourceType": "Category",
            "fieldName": "",
            "sourceValue": "10000000",
            "sourceLOB": ""
         },
         {
            "sourceType": "Org Entity",
            "fieldName": "Company Code",
            "sourceValue": "0468",
            "sourceLOB": "30-200"
         }
      ],
      "target": {
         "targetType": "Purchasing Group",
         "targetValue": "SO3/MY08/0004",
         "targetLOB": "30-200"
      }
   }
]

Success Scenario – Response

{
   "data": null,
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "Company-Plant-Cat-PurGrp-30-200|Plant|M253,Category|10000000,Company Code|0468"
      }
   ]
}

Error Scenario – Request

[
   {
      "adrSetName": "Company-Plant-Cat-PurGrp-30-200",
      "sources": [
         {
            "sourceType": "Org Entity",
            "fieldName": "Plant",
            "sourceValue": "M253",
            "sourceLOB": "30-200"
         },
         {
            "sourceType": "Category",
            "fieldName": "",
            "sourceValue": "10000000",
            "sourceLOB": ""
         },
         {
            "sourceType": "Org Entity",
            "fieldName": "Company Code",
            "sourceValue": "0468",
            "sourceLOB": ""
         }
      ],
      "target": {
         "targetType": "Purchasing Group",
         "targetValue": "SO3/MY08/0004",
         "targetLOB": "30-200"
      }
   }
]

Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "Company-Plant-Cat-PurGrp-30-200|Plant|M253,Category|10000000,Company Code|0468",
         "errors": [
            {
               "errorCode": "MandatoryException",
               "errorDescription": "Source LOB is mandatory when SourceType is OrgEntity."
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

ADRSet

Property

Required?

Data type

Description

Validations/Exceptions

ADRSetName

Yes

String

ADR set name

  • ADRSetName is mandatory

Sources

Yes

List of Source

Check data type Sources for details

 

  • Source is mandatory

Target

Yes

Target

Check data type Target for details

 

  • Target is mandatory

Sources - Sources are of different type as mentioned below and we can combine different source type based on ADR set up.

Property

Required?

Data type

Description

Validations/Exceptions

SourceType

Yes

String

Source Type values

  • Supplier

  • Category

  • Org Entity

  • Tax Master

  • Item Master

  • Contacts

  • Text

  • Ship to location

  • Source Type is mandatory

FieldName                           

Yes, in case of ‘org Entity’

String

If Source Type is Org Entity, then FieldName is required to specify the type of organization entity. Refer ADR setup and organization structure to find Entity Type for expected values.

  • Field Name is mandatory when SourceType is OrgEntity

SourceValue

Yes

String

Specify value corresponding to Source Type.

E.g.: if SourceType is category the SourceValue will hold category code.

  • Source Value is mandatory

SourceLOB

Yes, in case of ‘org Entity’

String

If Source Type is organization entity, then SourceLOB is the LOB EntityCode.

  • Source LOB is mandatory when SourceType is OrgEntity

 

Target - Target is an Organization Entity that will be derived from sources specified.

Property

Required?

Data type

Description

Validations/Exceptions

TargetType

Yes

String

TargetType is required to specify the type of organization entity. Refer to ADR setup and organization structure to find what Entity Type is set against this ADR set name.

  • Target Type is mandatory

TargetValue

Yes

String

TargetValue is EntityCode of organizations entity.

  • Target Value is mandatory

TargetLOB

Yes

String

TargetLOB is LOB EntityCode of that TargetValue.

  • Target LOB is mandatory