Name
global.CSMRelationshipConstantsSNC
Description
Set of constants used in CSM Relationship framework.
Script
var CSMRelationshipConstantsSNC = Class.create();
CSMRelationshipConstantsSNC.prototype = {
initialize: function() {},
AUTHORISED_REPRESENTATIVE: "c009bbedb3730010700b4d43c6a8dcef",
AUTHORISED_ACCOUNT: "986bc57243111110911baf56aab8f255",
AUTHORISED_SERVICE_ORGANIZATION: "c7ccc21b65ed1910f87764df53db7725",
CONSUMER_SOLD_PRDOUCT_VIEWER: global.CSMBaseConstants.SOLD_PRODUCT_VIEWER_RESPONSIBILITY,
getAdditionalConsumerConfig: function() {
return {
"FULL": [this.AUTHORISED_REPRESENTATIVE],
"WRITE": [this.AUTHORISED_REPRESENTATIVE],
"CREATE": [this.AUTHORISED_REPRESENTATIVE],
"READ": [this.AUTHORISED_REPRESENTATIVE]
};
},
getAdditionalContactsConfig: function() {
return {
"READ": [this.AUTHORISED_REPRESENTATIVE],
"WRITE": [this.AUTHORISED_REPRESENTATIVE],
"CREATE": [this.AUTHORISED_REPRESENTATIVE],
"FULL": [this.AUTHORISED_REPRESENTATIVE]
};
},
getCaseRelatedPartiesConfig: function() {
return {
"READ": [this.AUTHORISED_REPRESENTATIVE],
"WRITE": [this.AUTHORISED_REPRESENTATIVE],
"CREATE": [this.AUTHORISED_REPRESENTATIVE],
"FULL": [this.AUTHORISED_REPRESENTATIVE]
};
},
getSoldProductRelatedPartiesConfig: function() {
return {
"READ": [this.AUTHORISED_REPRESENTATIVE, this.AUTHORISED_ACCOUNT],
"WRITE": [this.AUTHORISED_REPRESENTATIVE, this.AUTHORISED_ACCOUNT],
"CREATE": [this.AUTHORISED_REPRESENTATIVE, this.AUTHORISED_ACCOUNT],
"FULL": [this.AUTHORISED_REPRESENTATIVE, this.AUTHORISED_ACCOUNT]
};
},
/** Roles and Responsibilities **/
/**
*
* {
* // Roles will be evaluated in OR'ed manner; One role is enough to grant the responsibility
* responsibility1 : [comma, separated, roles];
* responsibility2 : [comma, separated, roles];
* ...
* }
**/
getRolesAndResponsibilitiesForAdditionalContacts: function() {
var rolesAndResp = {};
rolesAndResp[this.AUTHORISED_REPRESENTATIVE] = [
"sn_install_base.sold_product_authorized_contact"
];
return rolesAndResp;
},
getRolesAndResponsibilitiesForAdditionalConsumers: function() {
var rolesAndResp = {};
rolesAndResp[this.AUTHORISED_REPRESENTATIVE] = [
"sn_install_base.sold_product_authorized_consumer"
];
return rolesAndResp;
},
getRolesAndResponsibilitiesForCaseRelatedParites: function() {
var rolesAndResp = {};
rolesAndResp[this.AUTHORISED_REPRESENTATIVE] = [
"sn_customerservice.case_authorized_contact",
"sn_customerservice.case_authorized_consumer",
"sn_customerservice.case_authorized_contributor"
];
return rolesAndResp;
},
getRolesAndResponsibilitiesForSoldProductRelatedParites: function() {
var rolesAndResp = {};
rolesAndResp[this.AUTHORISED_REPRESENTATIVE] = [
"sn_install_base.sold_product_authorized_contact",
"sn_install_base.sold_product_authorized_consumer"
];
rolesAndResp[this.AUTHORISED_ACCOUNT] = [
"sn_install_base.sold_product_authorized_contact"
];
return rolesAndResp;
},
type: 'CSMRelationshipConstantsSNC'
};
CSMRelationshipConstants.AUTHORISED_REPRESENTATIVE = CSMRelationshipConstantsSNC.prototype.AUTHORISED_REPRESENTATIVE;
CSMRelationshipConstants.AUTHORISED_ACCOUNT = CSMRelationshipConstantsSNC.prototype.AUTHORISED_ACCOUNT;
CSMRelationshipConstants.AUTHORISED_SERVICE_ORGANIZATION = CSMRelationshipConstantsSNC.prototype.AUTHORISED_SERVICE_ORGANIZATION;
//EXTENSION POINTS
CSMRelationshipConstants.RELATIONSHIP_EXTENSION_POINT = "global.CSMRelationshipServiceEP";
CSMRelationshipConstants.CONTENT_ACCESS_EXTENSION_POINT = "global.CSMContentAccessEP";
CSMRelationshipConstants.RELATIONSHIP_RESP_CONFIG_EXTENSION_POINT = "global.CSMRelationshipRespConfigEP";
//Field Names
CSMRelationshipConstants.RESPONSIBILITY = "responsibility";
CSMRelationshipConstants.SOLD_PRODUCT = "sold_product";
CSMRelationshipConstants.RP_CASE_FIELD = "case_record";
CSMRelationshipConstants.RELATED_PARTY_CONSUMERS = "related_party_consumers";
CSMRelationshipConstants.RELATED_PARTY_USERS = "related_party_users";
//Related Party Types
CSMRelationshipConstants.RELATED_PARTY_AS_ADDITIONAL_PARTY = "additional_party";
CSMRelationshipConstants.RELATED_PARTY_AS_ADDITIONAL_ACCOUNT = "additional_account";
CSMRelationshipConstants.RELATED_PARTY_AS_ADDITIONAL_SERVICE_ORGANIZATION = "additional_service_oranization";
//Value Constants
CSMRelationshipConstants.DEFAULT_PERSONA_FIELD = "user";
CSMRelationshipConstants.FIELD_CONTACT = "contact";
CSMRelationshipConstants.FIELD_CONSUMER = "consumer";
CSMRelationshipConstants.FIELD_ACCOUNT = "account";
CSMRelationshipConstants.FIELD_SERVICE_ORGANIZATION = "service_organization";
CSMRelationshipConstants.FIELD_SOLD_PRODUCT = "sold_product";
CSMRelationshipConstants.FIELD_INSTALL_BASE_ITEM = "install_base_item";
CSMRelationshipConstants.FIELD_ADDITIONAL_CONSUMERS = "additional_consumers";
CSMRelationshipConstants.FIELD_ADDITIONAL_USERS = "additional_users";
CSMRelationshipConstants.DISABLE_RESTRICTED_ACCESS = 'DISABLE_RESTRICTED_ACCESS';
CSMRelationshipConstants.FETCH_FORCEFULLY = 'FETCH_FORCEFULLY';
CSMRelationshipConstants.ADDITIONAL_RELATIONSHIPS = "ADDITIONAL_RELATIONSHIPS";
CSMRelationshipConstants.NO_PERSONA_QUERY = "NO_PERSONA_QUERY";
CSMRelationshipConstants.NO_PERSONA_ACCOUNT_QUERY = "NO_PERSONA_ACCOUNT_QUERY";
CSMRelationshipConstants.SKIP_BEFORE_QUERY_FILTER = "SKIP_BEFORE_QUERY_FILTER";
CSMRelationshipConstants.SKIP_ROLE_CHECK = "SKIP_ROLE_CHECK";
CSMRelationshipConstants.HAS_TARGET_ENTITY = "has_target_entity";
CSMRelationshipConstants.TARGET_ENTITY = "targetEntity";
CSMRelationshipConstants.APPLICABLE_TO = "applicableTo";
CSMRelationshipConstants.RESTRICT_ACCESS_TO = "restrictAccessTo";
CSMRelationshipConstants.ADDITIONAL_ENCODED_QUERY = "ADDITIONAL_ENCODED_QUERY";
CSMRelationshipConstants.IS_ACCOUNT_QUERY = "IS_ACCOUNT_QUERY";
CSMRelationshipConstants.IS_SVC_ORG_QUERY = "IS_SVC_ORG_QUERY";
CSMRelationshipConstants.IS_CONTACT_SOLD_PRODUCT = "IS_CONTACT_SOLD_PRODUCT";
CSMRelationshipConstants.IS_CONSUMER_SOLD_PRODUCT = "IS_CONSUMER_SOLD_PRODUCT";
//Roles
CSMRelationshipConstants.ROLE_CONSUMER = "sn_customerservice.consumer";
CSMRelationshipConstants.ROLE_CONTACT = "sn_customerservice.customer";
CSMRelationshipConstants.ROLE_INTERNAL_USER = "snc_internal";
CSMRelationshipConstants.ROLE_SOLD_PRODUCT_AUTH_CONTACT = "sn_install_base.sold_product_authorized_contact";
CSMRelationshipConstants.ROLE_SOLD_PRODUCT_AUTH_CONSUMER = "sn_install_base.sold_product_authorized_consumer";
//Access Levels
CSMRelationshipConstants.ACCESS = {};
CSMRelationshipConstants.ACCESS.READ = "READ";
CSMRelationshipConstants.ACCESS.CREATE = "CREATE";
CSMRelationshipConstants.ACCESS.WRITE = "WRITE";
CSMRelationshipConstants.ACCESS.NOTIFY = "NOTIFY";
CSMRelationshipConstants.ACCESS.FULL = "FULL";
CSMRelationshipConstants.ACCESS.DELETE = "DELETE";
CSMRelationshipConstants.ACCESS.FULFILLER = "FULFILLER";
CSMRelationshipConstants.ACCESS.FULFILLER_CHILDREN = "FULFILLER_CHILDREN";
CSMRelationshipConstants.ACCESS.READ_CUSTOMER = "READ_CUSTOMER";
CSMRelationshipConstants.ACCESS.READ_CONSUMER = "READ_CONSUMER";
CSMRelationshipConstants.ACCESS.FULL_CHILDREN = "FULL_CHILDREN";
CSMRelationshipConstants.ACCESS.READ_CHILDREN = "READ_CHILDREN";
CSMRelationshipConstants.ACCESS.WRITE_CUSTOMER = "WRITE_CUSTOMER";
CSMRelationshipConstants.ACCESS.WRITE_CONSUMER = "WRITE_CONSUMER";
//Notification Events
CSMRelationshipConstants.EVENT_CASE_CLOSED_RP = "sn_customerservice.NotifyCaseClosedRP";
CSMRelationshipConstants.EVENT_CASE_COMMENTED_RP = "sn_customerservice.NotifyCaseCommentedRP";
CSMRelationshipConstants.EVENT_CASE_RESOLVED_RP = "sn_customerservice.NotifyCaseResolvedRP";
CSMRelationshipConstants.EVENT_CASE_CLOSED_SP = "sn_customerservice.NotifyCaseClosedSP";
CSMRelationshipConstants.EVENT_CASE_COMMENTED_SP = "sn_customerservice.NotifyCaseCommentedSP";
CSMRelationshipConstants.EVENT_CASE_RESOLVED_SP = "sn_customerservice.NotifyCaseResolvedSP";
//Relationship Config
CSMRelationshipConstants.RELATIONSHIPS = {};
CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES={};
//Relationships Config
CSMRelationshipConstants.CONTACT_ADDITIONAL_OWNER = CSMRelationshipConstantsSNC.prototype.AUTHORISED_REPRESENTATIVE;
CSMRelationshipConstants.CONSUMER_ADDITIONAL_OWNER = CSMRelationshipConstantsSNC.prototype.AUTHORISED_REPRESENTATIVE;
CSMRelationshipConstants.CONSUMER_SOLD_PRDOUCT_VIEWER = CSMRelationshipConstantsSNC.prototype.CONSUMER_SOLD_PRDOUCT_VIEWER;
CSMRelationshipConstants.CASE_LISTED_CONSUMER = "6b71a4ba7332301081fd6cb63cf6a797";
CSMRelationshipConstants.CASE_LISTED_CONTACT = "c551a0ba7332301081fd6cb63cf6a75d";
/*
* Additional consumer configuration
*/
CSMRelationshipConstants.RELATIONSHIP_CONSUMER_SOLDPRODUCT = global.CSMBaseConstants.M2M_CON_SOLD_PRODUCT;
CSMRelationshipConstants.RELATIONSHIPS[CSMRelationshipConstants.RELATIONSHIP_CONSUMER_SOLDPRODUCT] = CSMRelationshipConstantsSNC.prototype.getAdditionalConsumerConfig();
CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES[CSMRelationshipConstants.RELATIONSHIP_CONSUMER_SOLDPRODUCT] = CSMRelationshipConstantsSNC.prototype.getRolesAndResponsibilitiesForAdditionalConsumers();
/*
* Additional contact configuration
*/
CSMRelationshipConstants.RELATIONSHIP_CONTACT_SOLDPRODUCT = global.CSMBaseConstants.M2M_CONTACT_SOLD_PRODUCT;
CSMRelationshipConstants.RELATIONSHIPS[CSMRelationshipConstants.RELATIONSHIP_CONTACT_SOLDPRODUCT] = CSMRelationshipConstantsSNC.prototype.getAdditionalContactsConfig();
CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES[CSMRelationshipConstants.RELATIONSHIP_CONTACT_SOLDPRODUCT] = CSMRelationshipConstantsSNC.prototype.getRolesAndResponsibilitiesForAdditionalContacts();
/*
* Case Related party configuration
*/
CSMRelationshipConstants.RELATIONSHIP_CASE_RELATED_PARTY = global.CSMBaseConstants.CASE_RELATED_PARTY_TABLE;
CSMRelationshipConstants.RELATIONSHIPS[CSMRelationshipConstants.RELATIONSHIP_CASE_RELATED_PARTY] = CSMRelationshipConstantsSNC.prototype.getCaseRelatedPartiesConfig();
CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES[CSMRelationshipConstants.RELATIONSHIP_CASE_RELATED_PARTY] = CSMRelationshipConstantsSNC.prototype.getRolesAndResponsibilitiesForCaseRelatedParites();
/*
* Sold Product Related party configuration
*/
CSMRelationshipConstants.RELATIONSHIP_SOLD_PRODUCT_RELATED_PARTY = global.CSMBaseConstants.SOLD_PRODUCT_RELATED_PARTY;
CSMRelationshipConstants.RELATIONSHIPS[CSMRelationshipConstants.RELATIONSHIP_SOLD_PRODUCT_RELATED_PARTY] = CSMRelationshipConstantsSNC.prototype.getSoldProductRelatedPartiesConfig();
CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES[CSMRelationshipConstants.RELATIONSHIP_SOLD_PRODUCT_RELATED_PARTY] = CSMRelationshipConstantsSNC.prototype.getRolesAndResponsibilitiesForSoldProductRelatedParites();
/*
* Install Base related party
*/
CSMRelationshipConstants.RELATIONSHIP_INSTALL_BASE_RELATED_PARTY = global.CSMBaseConstants.INSTALL_BASE_RELATED_PARTY;
/*
* Fetch all the relationship access config and responsibility roles config
*/
CSMRelationshipConstants.RELATIONSHIPS = new global.CSMRelationshipUtils().getCSMRelationshipRolesAndRespConfig(global.CSMRelationshipConstants.RELATIONSHIPS, "getRespConfig");
CSMRelationshipConstants.RESPONSIBILITY_ROLES = new global.CSMRelationshipUtils().getCSMRelationshipRolesAndRespConfig(CSMRelationshipConstantsSNC.RESPONSIBILITY_ROLES, "getRolesAndRespConfig");
Sys ID
8bf374e977427010d3ef07dc7d5a9969