var AccountID: PartyID;
var AccountIDs: collectionof PartyID;
var CRMDocumentType: BusinessTransactionDocumentTypeCode;
/*Multiple account IDs can be passed to the API. Number of account IDs passed is subject to system performance.
It is suggested to pass an optimal number of account IDs.*/
// Account ID or Buyer ID
AccountID.content = "MC9785";
AccountIDs.Add(AccountID);
/* CRMDocumentType Sample values: 114 Sales Order, 117 Service Order, 118 Service Request,
30 Sales Quote/Quote for Contract, 1092 Contract, 32 Customer Return*/
// For Sales Order CRM document, CRMDocumentType optional parameter is set to 114 by default.
CRMDocumentType = "114"; //Sales Order
// Input is always Account/Buyer IDs
var DeterminedParties = CustomerRelationshipManagmentUtilities.CRMDocumentPartyDetermination(AccountIDs,CRMDocumentType);
if (DeterminedParties.FailedIndicator == false)
{
foreach(var DeterminedParty in DeterminedParties.CRMDocumentDeterminedParty)
{
// Given Account/Buyer ID
var ForGivenAccount = DeterminedParty.AccountID.content;
// Determined Party ID
var DeterminedPartyID = DeterminedParty.Party.PartyID.content;
// Determined Party UUID
var DeterminedPartyUUID = DeterminedParty.PartyUUID.content;
// Party Type (Role Code determines the Party type. Examples:Sales Unit Party )
var PartyRoleCode = DeterminedParty.RoleCode;
/* Sample Party Role Codes are listed below (Standard and Partner Defined Parties).
Account/Buyer Party : 1001
Bill-To Party : 8
Ship-To Party : 1005
Payer Party : 10
Sales Unit Party : 44
Seller Party : 2
Invoicing Unit Party : 1101
Employee Responsible : 39
Service Execution Team : 42
Service Performer Party : 43
Sales Partner Party : 29
Sales Employee Party : 46
Freight Forwarder Party : 47
ZParty with ZRole Code : Partner Defined Role Code*/
}
}
else
{
// Error occurred. This could be due to invalid account ID passed to API or invalid document type or technical error.
}
/* Sales Order: Sample Party Role Codes are listed below (Standard and Partner Defined Parties for CRMDocumentType = "114"; //Sales Order)
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Payer Party : 8
Sales Unit Party : 44
Seller Party : 2
Invoicing Unit Party : 1101
Employee Responsible : 39
Service Execution Team : 42
Service Performer Party : 43
Sales Partner Party : 29
Sales Employee Party : 46
Freight Forwarder Party : 47
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Service Order: Sample Party Role Codes are listed below for CRMDocumentType = "117"; //Service Order
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Seller Party : 2
Service and Support Team : 28
Processor Party : 40
Service Execution Team Party : 42
Service Performer Party : 43
Sales Unit Party : 44
Freight Forwarder Party : 47
Supplier Party : 6
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Service Request: Sample Party Role Codes are listed below for CRMDocumentType = "118"; //Service Request
Account/Buyer Party : 1001
Ship-To Party : 1005
Seller Party : 2
Service and Support Team : 28
Processor Party : 40
Sales Unit Party : 44
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Sales Quote/Quote for Contract: Sample Party Role Codes are listed below for CRMDocumentType = "30"; //Customer Quote
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Seller Party : 2
Sales Partner Party : 29
Employee Responsible Party : 39
Sales Unit Party : 44
Sales Employee Party : 46
Freight Forwarder Party : 47
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Contract: Sample Party Role Codes are listed below for CRMDocumentType = "1092"; //Contract
Account /Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Authorised Party : 1020
Contract Administrator Party : 1122
Seller Party : 2
Contracting Unit Party : 204
Sales Partner Party : 29
Employee Responsible Party : 39
Service Execution Team Party : 42
Service Performer Party : 43
Sales Unit Party : 44
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
/* Customer Return: Sample Party Role Codes are listed below for CRMDocumentType = "32"; //Customer Return
Account/Buyer Party : 1001
Bill-To Party : 10
Ship-To Party : 1005
Invoicing Unit Party : 1101
Seller Party : 2
Service and Support Team : 28
Employee Responsible Party : 39
Processor Party : 40
Sales Unit Party : 44
Payer Party : 8
ZParty with ZRole Code : Partner Defined Role Code
*/
//Get sales unit hierarchy with sales unit ID as input
var RootOrgCenterID: OrganisationalCentreID;
RootOrgCenterID = "MC40000";
var SalesUnitHierarchyForGivenID = OrganisationalManagementUtilities.ReadSalesUnitHierarchy(RootOrgCenterID);
//Note: As no date is specified, current date is considered by default.
//Get sales unit hierarchy with sales unit UUID
var RootOrgCenterUUID: UUID;
RootOrgCenterUUID.content = "00145EF588E602DBB8B3AE3B10E55944";
var RootOrgCenterID: OrganisationalCentreID;
// Note: Make sure you pass an empty first parameter- RootOrgCenterID which is required for technical reasons.
var SalesUnitHierarchyForGivenUUID =
OrganisationalManagementUtilities.ReadSalesUnitHierarchy
(RootOrgCenterID,RootOrgCenterUUID,KeyDate);
//Note: As no date is specified, current date is considered by default.
//Get sales unit hierarchy with sales unit ID and key date as input
var KeyDate= Library::Date.ParseFromString("20050101");
var RootOrgCenterID1: OrganisationalCentreID;
RootOrgCenterID1 = "MC40000";
var RootOrgCenterUUID1: UUID;
// Note: Make sure you pass an empty second parameter- RootOrgCenterUUID1, which is required for technical reasons.
var SalesUnitHierarchyForGivenIDKeyDate = OrganisationalManagementUtilities.ReadSalesUnitHierarchy(RootOrgCenterID1,RootOrgCenterUUID1,KeyDate)
//Get sales unit hierarchy with sales unit UUID and key date as input
var KeyDate= Library::Date.ParseFromString("20050101");
var RootOrgCenterUUID2: UUID;
RootOrgCenterUUID.content = "00145EF588E602DBB8B3AE3B10E55944";
var RootOrgCenterID2: OrganisationalCentreID;
// Note: Make sure you pass an empty first parameter- RootOrgCenterID2, which is required for technical reasons.
var SalesUnitHierarchyForGivenUUIDKeyDate = OrganisationalManagementUtilities.ReadSalesUnitHierarchy
(RootOrgCenterID2,RootOrgCenterUUID2,KeyDate);
//Get sales unit hierarchy with key date as input
var KeyDate= Library::Date.ParseFromString("20050101");
var RootOrgCenterID3: OrganisationalCentreID;
var RootOrgCenterUUID3: UUID;
// Note: Make sure you pass an empty first parameter- RootOrgCenterID3 and second parameter- RootOrgCenterUUID3, which are required for technical reasons.
var SalesUnitHierarchyForGivenKeyDate = OrganisationalManagementUtilities.ReadSalesUnitHierarchy(RootOrgCenterID3,RootOrgCenterUUID3,KeyDate);
//Get all sales unit hierarchies
var AllSalesUnitHierarchies = OrganisationalManagementUtilities.ReadSalesUnitHierarchy();
//Note: As no date is specified, current date is considered by default.
//Get top sales units for given validity date/key date
var KeyDate = Library::Date.ParseFromString("20050101");
var TopmostAllSalesUnitsForGivenDate = OrganisationalManagementUtilities.ReadTopmostSalesUnits(KeyDate);
foreach(var TopmostSalesUnit in TopmostAllSalesUnitsForGivenDate.TopmostSalesUnit ) {
// Top Most Sales Unit ID
var TopmostSalesUnitOrganisationalCentreID = TopmostSalesUnit.OrganisationalCentreID;
// Top Most Sales Unit UUID
var TopmostSalesUnitOrganisationalCentreUUID = TopmostSalesUnit.OrganisationalCentreUUID.content;
}
//Get all top sales units (without filtering)
var TopmostAllSalesUnits = OrganisationalManagementUtilities.ReadTopmostSalesUnits();
//Note: As no date is specified, current date is considered by default.
//Get employees reporting to sales unit IDs
var SalesUnitIDs: collectionof OrganisationalCentreID;
var SalesUnitID: OrganisationalCentreID;
SalesUnitID = "MC40000";
SalesUnitIDs.Add(SalesUnitID);
SalesUnitID = "MC41000";
SalesUnitIDs.Add(SalesUnitID);
var EmployeesBySalesUnitID = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit(SalesUnitIDs);
//Note: As no date is specified, current date is considered by default.
//Get employees reporting to sales unit UUIDs
var SalesUnitIDs1: collectionof OrganisationalCentreID;
var SalesUnitUUIDs1: collectionof UUID;
var SalesUnitUUID: UUID;
SalesUnitUUID.content = "00145EF588E602DBB8B3AE3B10E55944";
SalesUnitUUIDs1.Add(SalesUnitUUID);
SalesUnitUUID.content = "00145EF588E602DBB8B3AE683CDB1FD6";
SalesUnitUUIDs1.Add(SalesUnitUUID);
// Note: Make sure you pass an empty first parameter- SalesUnitIDs1, which is required for technical reasons.
var EmployeesBySalesUnitUUID = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit (SalesUnitIDs1,SalesUnitUUIDs1);
//Note: As no date is specified, current date is considered by default.
//Get employees reporting to sales unit IDs and key date
var KeyDate= Library::Date.ParseFromString("20050101");
var SalesUnitIDs3: collectionof OrganisationalCentreID;
var SalesUnitUUIDs3: collectionof UUID;
SalesUnitID = "MC40000";
SalesUnitIDs3.Add(SalesUnitID);
SalesUnitID = "MC41000";
SalesUnitIDs3.Add(SalesUnitID);
// Note: Make sure you pass an empty second parameter- SalesUnitUUIDs3, which is required for technical reasons.
var EmployeesBySalesUnitIDKeyDate = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit (SalesUnitIDs3,SalesUnitUUIDs3,KeyDate);
//Get employees reporting to sales unit UUIDs and key date
var KeyDate= Library::Date.ParseFromString("20050101");
var SalesUnitIDs4: collectionof OrganisationalCentreID;
var SalesUnitUUIDs4: collectionof UUID;
SalesUnitUUID.content = "00145EF588E602DBB8B3AE3B10E55944";
SalesUnitUUIDs4.Add(SalesUnitUUID);
SalesUnitUUID.content = "00145EF588E602DBB8B3AE683CDB1FD6";
SalesUnitUUIDs4.Add(SalesUnitUUID);
// Note: Make sure you pass an empty first parameter- SalesUnitIDs4 which is required for technical reasons.
var EmployeesBySalesUnitUUIDKeyDate = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit(SalesUnitIDs4,SalesUnitUUIDs4,KeyDate);
//Get employees reporting to sales unit IDs and sales unit UUIDs and key date
var KeyDate= Library::Date.ParseFromString("20050101");
var SalesUnitIDs5: collectionof OrganisationalCentreID;
var SalesUnitUUIDs5: collectionof UUID;
SalesUnitID = "MC40000";
SalesUnitIDs5.Add(SalesUnitID);
SalesUnitUUID.content = "00145EF588E602DBB8B3AE683CDB1FD6";
SalesUnitUUIDs5.Add(SalesUnitUUID);
// Note: Make sure you pass an empty first parameter- SalesUnitIDs5 which is required for technical reasons.
var EmployeesBySalesUnitIDUUIDKeyDate = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit (SalesUnitIDs5,SalesUnitUUIDs5,KeyDate);
//Get employees reporting to sales unit ID and sales unit UUIDs
var SalesUnitIDs6: collectionof OrganisationalCentreID;
var SalesUnitUUIDs6: collectionof UUID;
SalesUnitID = "MC40000";
SalesUnitIDs6.Add(SalesUnitID);
SalesUnitUUID.content = "00145EF588E602DBB8B3AE3B10E55944";
SalesUnitUUIDs6.Add(SalesUnitUUID);
var EmployeesBySalesUnitIDUUID = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit
(SalesUnitIDs6,SalesUnitUUIDs6);
//Note: As no date is specified, current date is considered by default.
//Get all employees reporting to all sales units for given key date
var KeyDate= Library::Date.ParseFromString("20050101");
var SalesUnitIDs7: collectionof OrganisationalCentreID;
var SalesUnitUUIDs7: collectionof UUID;
// Note: Make sure you pass an empty first parameter-SalesUnitIDs7, second parameter- SalesUnitUUIDs7, which is required for technical reasons.
var AllEmployeesBySalesUnitKeyDate = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit
(SalesUnitIDs7,SalesUnitUUIDs7,KeyDate);
//Get all employees reporting to all sales units
var AllEmployeesBySalesUnit = OrganisationalManagementUtilities.ReadEmployeesBySalesUnit();
//Note: As no date is specified, current date is considered by default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
11 | |
8 | |
8 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |