TMF671 v4 Resource Mappings

Before using the TMF671 v4 resource mappings, refer these.

  • Use the promotion rules configuration and the Promotion API GET request to retrieve the promotion details.

  • Create a rule library that maps the usage type to Global Promotion Management and defines the context name. Set this rule library name as the default during the Create Promotion API call.

  • The criteriaGroup field is mandatory for Create Promotion API call. Only system admin can access this API. Users can only create promotions using a custom template.

  • Validations must be implemented to limit the number of rules, criteria, or actions if GPM enforces any such restrictions.

  • Users are not allowed to modify the context definition tags.

  • POST method input validations.

    • The promotion must include a name, id, and a valid startDateTime.
    • Criteria group must have at least one criteria and action.
  • User needs to perform these operations.
    • Global Promotions Management (GPM) setup
    • Rule Library configuration
    • Field-level security to the fields
  • As there is no life cycle status field available on promotion entity, isActive field is used and it supports these statuses.
    • active
    • inactive
  • When the 671 POST request is invoked, orchestrate the data and create a promotion using the Create Promotion Connect API. The response provides the promotion code name, which can then be used to configure the promotion's rules using the custom template. These rules define both the criteria and the actions associated with the promotion.
  • Promotion rules are stored as blob data, which cannot be directly read from the database. For the GET operation, use APIs to retrieve the rules in a readable format. To fetch promotion details, query the database directly. If the information retrieved is insufficient or not readable, use the API to obtain the promotion details.
  • Revenue Lifecycle Management (RLM) operates within its own context, and the mapping to GPM tags is managed through the rule library associated with that context.

The TMF671 specific criteria and action codes are hardcoded as a HashMap.

ActionTypeActionTypeCode
voice(minute)1
data(MB)2
data(GB)3
SMS4
bonus point5
physical gift6
voucher7
promotion code8
an existing offering9
currency10

NOTE: Other types of action also be used.

CiteriaParamTypeParameterCriteriaParamTypeCode
Individual-1
id1.1
name1.2
birth date1.3
Product Offering-2
id2.1
duty free amount2.2
tax included amount2.3
product order id2.4
price type2.5
channel name2.6
Product-3
id3.1
duration amount3.2
duration units3.3
Product Offering Category-4
id4.1
Top up Balance-5
amount5.1
recurring period5.2
Customer Bill-6
amount due6.1

These default mappings are supported for the TMF671 resources.

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce FieldSupported Methods
IdA string. Unique identifier of promotion.StringYesNoYesPromotionPromotioncodeGET
descriptionA string. Details about the purpose of this promotion.StringNoNoYesPromotionDescriptionPOST, GET
lastUpdateA date time (DateTime). Latest update date of promotion.DateNoNoYesPromotionLastModifiedDateGET
lifecycleStatusA string. Value of promotion status.StringNoNoYesPromotionisActiveGET, POST
nameA string. Name of promotion.StringYesYesYesPromotionNameGET, POST
promotionTypeA string. Type of promotion. The basic type is:
• Award - Gift or free unit is given to the party.
• Discount - Deduct from an account, debt or charge.
• Reduction - Bring down the quantity or value or something.
However, other types of promotion can be used.
NoNoNoPromotionrewardConfiguration → type
startDateTimeA time period. The period for which the promotion is valid.DateNoNoYesPromotionStartDateTimeGET, POST
endDateTimeA time period. The period for which the promotion is valid.DateNoNoYesPromotionEndDateTimeGET, POST
hrefAn URI. Hyperlink reference.URLYesNoYes---
patternList of patterns that defines the promotionstringNoNoYespattern--

Salesforce Mapping: Promotion → promotionConfiguration → configureTemplate → rules → priority

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce MappingSupported Methods
@typeA string. The class type of the actual resource (for type extension).StringNoNoYes--GET
actionA list of promotion actions (PromotionAction [1..*]). Action of the promotion. When the customer meets the conditions in the promotion pattern, the customer can be given the benefits in the action.ListYesYesYes[promotionAction subresource]-POST,GET
criteriaGroupA list of promotion criteria groups (PromotionCriteriaGroup [1..*]). Set of group criteria to promotion. Fulfilling these criteria, parties receive benefits.ListYesYesYes[promotionCriteriaGroup Subresource]-POST,GET
idA string. Unique identifier of promotion pattern.StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules [ {{index}} ]→ ruleNamePOST,GET
nameName of the pattern or rule.StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules [ {{index}} ]→ templateName "+ _ + "promotion → promotionConfiguration → configureTemplate →rules [ {{index}} ]→ ruleNamePOST,GET
priorityPriority of the pattern.NumberNoYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules [ {{index}} ]→ priorityPOST,GET

Salesforce Mapping: Promotion → promotionConfiguration → configureTemplate → rules → priority → rewardConfiguration

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce MappingSupported Methods
@baseTypeA string. The base type for use in polymorphic collections.StringNoNoNoGET
@schemaLocationA string. A link to the schema describing a resource (for type extension).StringNoNoNoGET
@typeA string. The class type of the actual resource (for type extension).StringNoNoYesGET
actionEntityRefAn entity reference (EntityRef). It refers to the entity that is impacted by the promotion action.
• When the Promotion type is Award, the actionEntityRef is the party account;
• When the Promotion type is Discount, it is the product offering;
• When the Promotion type is Reduction, it is the product offering also.
NoNoYespromotionActionEntityRefPOST,GET
actionTypeA string. actionTypeStringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → type

promotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountType
POST,GET
actionValueA string.
• When the Promotion type is Award, it means the amount or value of the awards decided by actionType;
• When the Promotion type is Discount, it means the value of the discount;
• When the Promotion type is Reduction, it means the value of the reduced money.
StringYesYesYesPromotionWhen actionType is 8 and 10 -
promotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountValue

When actionType is 7 -
promotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → voucherDefinition → id
POST,GET
idA string. Unique identifier.StringNoNoYesPromotionWhen actionType is 8 and 10 -
promotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountType

When actionType is 7 -
promotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → voucherDefinition → name
GET, POST

Salesforce Mapping: Promotion → promotionConfiguration → configureTemplate → rules → priority → rewardConfiguration

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce MappingSupported Methods
@baseTypeA string. When sub-classing, this defines the super-class.StringNoNoNoGET
@schemaLocationAn URI. A URI to a JSON-Schema file that defines additional attributes and relationships.StringNoNoNoGET
@typeA string. When sub-classing, this defines the sub-class Extensible name.StringNoNoYespromotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountedItems → discountedItemTypePOST, GET
@referredTypeA string. The actual type of the target instance when needed for disambiguation.NoNoNo
hrefAn URI. Hyperlink referenceStringYesYesYesGET
namename of the productStringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountedItems → discountedItemList → namePOST, GET
idA string. Unique identifier.StringNoNoYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → rewardConfiguration → rewardDetails → discountedItems → discountedItemList → idGET, POST

Salesforce Mapping: promotion → promotionConfiguration → configureTemplate → rules[] → eventConfiguration

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce MappingSupported Methods
@baseTypeA string. The base type for use in polymorphic collections.StringNoGET
@schemaLocationA string. A link to the schema describing a resource (for type extension).StringNoGET
@typeA string. The class type of the actual resource (for type extension).StringYesGET
criteriaA list of promotion criteria (PromotionCriteria [1..*]). Set of criteria to be followed by all parties.ListYesYesYespromotionCriteriaPOST,GET
criteriaLogicalRelationshipA string. Logical relation followed by all criteria.StringNoNoYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → customLogicPOST,GET
groupNameA string. Name of the group to be easily identified.StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → namePOST,GET
idA string. Unique Identifier.StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → sequenceNumberPOST,GET

Salesforce Mapping: promotion → promotionConfiguration → configureTemplate → rules[] → eventConfiguration[]

TMF FieldDescription
property
Field TypeIs Mandatory as per TMForum?Is Mandatory for Salesforce?SupportedSalesforce ObjectSalesforce MappingSupported Methods
@baseTypeA string. The base type for use in polymorphic collectionsStringNoNoNoGET
@schemaLocationA string. A link to the schema describing a resource (for type extension).StringNoNoNoGET
@typeA string. The class type of the actual resource (for type extension).StringNoNoYesGET
criteriaOperatorA string. Logic operator of this criteria instruction: '=' or '>' or '<' or '>=' or '<=' or '<>'. or 'In' or 'Not In'StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → conditionList → operatorPOST, GET
criteriaParameterA string. The parameter (factor) of the criteria. The basic factors are abstracted from these data sources. And there are several detailed parameters. For instance:
criteriaParameter
StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → conditionList → contextTagNamePOST, GET
criteriaValueA string. The value is filled for the comparison of the criteria.StringYesYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → conditionList → valueList[0]POST, GET
idA string. Unique identifier.StringNoYesYesPromotionpromotion → promotionConfiguration → configureTemplate →rules → eventConfiguration → criteriaList → conditionList → sequenceNumberPOST, GET