Create or update an array of product rules

put

https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRules

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: array
Minimum Number of Items: 1
Maximum Number of Items: 50
Show Source
  • ProductRules
    Title: ProductRules
    Discriminator: { "propertyName":"@type", "mapping":{ } }
    The Product Rule resource represents a set of rules and relationships.
Nested Schema : ProductRules
Type: object
Title: ProductRules
Discriminator: @type

Discriminator Values

The Product Rule resource represents a set of rules and relationships.
Show Source
Nested Schema : customProfileSpec
Type: array
Show Source
Nested Schema : ProjectRef
Type: object
Title: ProjectRef
Project Reference
Show Source
Nested Schema : ruleCondition
Type: array
Show Source
Nested Schema : SubjectRef
Type: object
Title: SubjectRef
Subject Reference
Show Source
Nested Schema : CustomProfileSpecRefOracle
Type: object
Title: CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
Nested Schema : RuleConditionOracle
Type: object
Title: RuleConditionOracle
A product rule condition
Show Source
Nested Schema : productRuleExpression
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleResultOracle":"#/components/schemas/RuleResultOracle", "RecommendationRuleResultOracle":"#/components/schemas/RecommendationRuleResultOracle", "MigrationRuleResultOracle":"#/components/schemas/MigrationRuleResultOracle" } }
Nested Schema : TimePeriodOracle
Type: object
Title: TimePeriodOracle
Validity period of the related party
Show Source
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Back to Top

Response

Supported Media Types

200 Response

Your request is successful and the resources have been created or updated.
Body ()
Root Schema : schema
Type: array
Show Source
  • ProductRules
    Title: ProductRules
    Discriminator: { "propertyName":"@type", "mapping":{ } }
    The Product Rule resource represents a set of rules and relationships.
Nested Schema : ProductRules
Type: object
Title: ProductRules
Discriminator: @type

Discriminator Values

The Product Rule resource represents a set of rules and relationships.
Show Source
Nested Schema : customProfileSpec
Type: array
Show Source
Nested Schema : ProjectRef
Type: object
Title: ProjectRef
Project Reference
Show Source
Nested Schema : ruleCondition
Type: array
Show Source
Nested Schema : SubjectRef
Type: object
Title: SubjectRef
Subject Reference
Show Source
Nested Schema : CustomProfileSpecRefOracle
Type: object
Title: CustomProfileSpecRefOracle
Custom Profile specification reference.
Show Source
Nested Schema : RuleConditionOracle
Type: object
Title: RuleConditionOracle
A product rule condition
Show Source
Nested Schema : productRuleExpression
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleExpressionOracle":"#/components/schemas/RuleExpressionOracle", "EntityRuleExpressionOracle":"#/components/schemas/EntityRuleExpressionOracle", "EligibilityRuleExpressionOracle":"#/components/schemas/EligibilityRuleExpressionOracle" } }
Nested Schema : productRuleResult
Type: array
Show Source
  • Discriminator: @type
    Discriminator: { "propertyName":"@type", "mapping":{ "RuleResultOracle":"#/components/schemas/RuleResultOracle", "RecommendationRuleResultOracle":"#/components/schemas/RecommendationRuleResultOracle", "MigrationRuleResultOracle":"#/components/schemas/MigrationRuleResultOracle" } }
Nested Schema : TimePeriodOracle
Type: object
Title: TimePeriodOracle
Validity period of the related party
Show Source
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

400 Response

Your request couldn't be processed because it contains missing or invalid information, such as a validation error on an input field, a missing required value, and so forth.
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

401 Response

Your request isn't authorized. The authentication credentials included with this request are missing or invalid.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

404 Response

Your request includes a resource URI that doesn't exist.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

405 Response

HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source

500 Response

The server encountered something unexpected that prevented it from completing the request.
Body ()
Root Schema : Error
Type: object
Title: Error
Show Source
Back to Top

Examples

The following example shows how to create or update an array of product rules by submitting a PUT request on the REST resource using cURL.

cURL Command

curl -u username:password -X PUT \ 'https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/productCatalogManagement/v1/productRules' -H 'Content-Type: application/json' -D @put_productrules.json | json_pp

Example of Request Body

The following shows an example of the request body in JSON format.

[
{
    "id": "RECOMMEDTESTQARULE020",
    "name": "RECOMMENDTESTQA-RULE-020",
    "lifecycleStatus": "In design",
    "version": "1.0",
    "ruleType": "RECOMMENDATION",
    "description" : "12345Test",
    "project": {
        "name": "Test 22A Project",
        "id": "Test22AProject"
    },
    "subject": {
        "id": "Oracle_CHEN02021",
        "name": "Oracle_CHEN02021",
        "@referredType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "validFor": {
                "endDateTime": "2023-03-31T00:00:00.000Z"
            },
            "description": "Rule condition1",
            "name": "Rule condition1",
            "id": "Condition1",
            "productRuleResult": [
                {
                    "id": "Result001",
                    "value": "Oracle_CHEN02022",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "UPSELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for iPhone12 device update",
                    "@type": "RecommendationRuleResultOracle"
                },
                {
                    "id": "Result002",
                    "value": "Oracle_CHEN02024",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "CROSS_SELL_RECOMMEND",
                    "score": 5,
                    "message": "Recommended for Apple device update",
                    "@type": "RecommendationRuleResultOracle"
                }
            ]
        }
    ]
},
{
    "id": "RECOMMEDTESTQARULE021",
    "name": "RECOMMENDTESTQA-RULE-021",
    "lifecycleStatus": "In design",
    "version": "1.0",
    "ruleType": "RECOMMENDATION",
    "description" : "12345Test",
    "project": {
        "name": "Test 22A Project",
        "id": "Test22AProject"
    },
    "subject": {
        "id": "Oracle_CHEN02021",
        "name": "Oracle_CHEN02021",
        "@referredType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "validFor": {
                "endDateTime": "2023-03-31T00:00:00.000Z"
            },
            "description": "Rule condition1",
            "name": "Rule condition1",
            "id": "Condition1",
            "productRuleResult": [
                {
                    "id": "Result001",
                    "value": "Oracle_CHEN02022",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "UPSELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for iPhone12 device update",
                    "@type": "RecommendationRuleResultOracle"
                },
                {
                    "id": "Result002",
                    "value": "Oracle_CHEN02024",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "CROSS_SELL_RECOMMEND",
                    "score": 9,
                    "message": "Recommended for Apple device update",
                    "@type": "RecommendationRuleResultOracle"
                }
            ]
        }
    ]
}
]

Example of Response Body

The following shows an example of the response body in JSON format.

[
   {
       "id": "RECOMMEDTESTQARULE020",
       "name": "RECOMMENDTESTQA-RULE-020",
       "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule/RECOMMEDTESTQARULE020",
       "lifecycleStatus": "In design",
       "version": "1.0",
       "created": "2021-10-04T21:25:04.000Z",
       "createdBy": "booth",
       "lastUpdate": "2021-10-06T17:30:44.823Z",
       "lastUpdatedBy": "booth",
       "ruleType": "RECOMMENDATION",
       "description" : "12345Test",
       "project": {
           "name": "Test 22A Project",
           "id": "Test22AProject",
           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/project/Test 22A Project"
       },
       "subject": {
           "id": "Oracle_CHEN02021",
           "name": "Oracle_CHEN02021",
           "@referredType": "ProductOfferingOracle",
           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOffering/Oracle_CHEN02021"
 
       },
       "ruleCondition": [
           {
               "validFor": {
                   "endDateTime": "2023-03-31T00:00:00.000Z"
               },
               "description": "Rule condition1",
               "name": "Rule condition1",
               "id": "Condition1",
               "productRuleResult": [
                   {
                       "id": "Result001",
                       "value": "Oracle_CHEN02022",
                       "valueType": "PRODUCT_OFFERING",
                       "messageType": "UPSELL_RECOMMEND",
                       "score": 1,
                       "message": "Recommended for iPhone12 device update",
                       "@type": "RecommendationRuleResultOracle"
                   },
                   {
                       "id": "Result002",
                       "value": "Oracle_CHEN02024",
                       "valueType": "PRODUCT_OFFERING",
                       "messageType": "CROSS_SELL_RECOMMEND",
                       "score": 5,
                       "message": "Recommended for Apple device update",
                       "@type": "RecommendationRuleResultOracle"
                   }
               ]
           }
       ]
   },
   {
       "id": "RECOMMEDTESTQARULE021",
       "name": "RECOMMENDTESTQA-RULE-021",
       "lifecycleStatus": "In design",
       "created": "2021-10-04T21:25:04.000Z",
       "createdBy": "booth",
       "lastUpdate": "2021-10-06T17:30:44.823Z",
       "lastUpdatedBy": "booth",
       "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule/RECOMMEDTESTQARULE021",
       "version": "1.0",
       "ruleType": "RECOMMENDATION",
       "description" : "12345Test",
       "project": {
           "name": "Test 22A Project",
           "id": "Test22AProject",
           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/project/RECOMMEDTESTQARULE021"
 
       },
       "subject": {
           "id": "Oracle_CHEN02021",
           "name": "Oracle_CHEN02021",
           "@referredType": "ProductOfferingOracle",
           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOffering/Oracle_CHEN02021"
       },
       "ruleCondition": [
           {
               "validFor": {
                   "endDateTime": "2023-03-31T00:00:00.000Z"
               },
               "description": "Rule condition1",
               "name": "Rule condition1",
               "id": "Condition1",
               "productRuleResult": [
                   {
                       "id": "Result001",
                       "value": "Oracle_CHEN02022",
                       "valueType": "PRODUCT_OFFERING",
                       "messageType": "UPSELL_RECOMMEND",
                       "score": 1,
                       "message": "Recommended for iPhone12 device update",
                       "@type": "RecommendationRuleResultOracle"
                   },
                   {
                       "id": "Result002",
                       "value": "Oracle_CHEN02024",
                       "valueType": "PRODUCT_OFFERING",
                       "messageType": "CROSS_SELL_RECOMMEND",
                       "score": 9,
                       "message": "Recommended for Apple device update",
                       "@type": "RecommendationRuleResultOracle"
                   }
               ]
           }
       ]
   }
   ]

Recommendation product rule

cURL Command

curl -u username:password -X PUT \ 'https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule -H 'Content-Type: application/json' -D @put_recommendproductrule.json | json_pp

Example of Request Body

The following shows an example of creating a product rule based on compatibility rule in JSON format.

{
    "id": "RECOMMENDRULE001",
    "name": "RECOMMEND-RULE-001",
    "lifecycleStatus": "In design",
    "version": "1.0",
    "ruleType": "RECOMMENDATION",
    "subject": {
        "id": "iPhone12Pro",
        "name": "iPhone12 Pro",
        "@referredType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "validFor": {
                "startDateTime": "2022-02-01T00:00:00.000Z",
                "endDateTime": "2023-03-31T00:00:00.000Z"
            },
            "description": "Rule condition1",
            "name": "Rule condition1",
            "id": "Condition1",
            "productRuleResult": [
                {
                    "id": "Result001",
                    "value": "iPhoneProMaxCre234455",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "UPSELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for iPhone12 device",
                    "@type": "RecommendationRuleResultOracle"
                },
                {
                    "id": "Result002",
                    "value": "Apple-redwood",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "CROSS_SELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for Apple device",
                    "@type": "RecommendationRuleResultOracle"
                }
            ]
        }
    ]
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "id": "RECOMMENDRULE001",
    "name": "RECOMMEND-RULE-001",
    "lifecycleStatus": "In design",
    "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule/RECOMMENDRULE001",
     "version": "1.0",
   "created": "2021-08-30T06:30:50.000Z",
   "createdBy": "booth",
   "lastUpdate": "2021-08-31T12:21:12.377Z",
   "lastUpdatedBy": "booth",      "ruleType": "RECOMMENDATION",
    "subject": {
        "id": "iPhone12Pro",
        "name": "iPhone12 Pro",
        "@referredType": "ProductOfferingOracle"
    },
    "ruleCondition": [
        {
            "validFor": {
                "startDateTime": "2022-02-01T00:00:00.000Z",
                "endDateTime": "2023-03-31T00:00:00.000Z"
            },
            "description": "Rule condition1",
            "name": "Rule condition1",
            "id": "Condition1",
            "productRuleResult": [
                {
                    "id": "Result001",
                    "value": "iPhoneProMaxCre234455",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "UPSELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for iPhone12 device",
                    "@type": "RecommendationRuleResultOracle"
                },
                {
                    "id": "Result002",
                    "value": "Apple-redwood",
                    "valueType": "PRODUCT_OFFERING",
                    "messageType": "CROSS_SELL_RECOMMEND",
                    "score": 1,
                    "message": "Recommended for Apple device",
                    "@type": "RecommendationRuleResultOracle"
                }
            ]
        }
    ]
}

Migration product rule

cURL Command

curl -u username:password -X PUT \ 'https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule' -H 'Content-Type: application/json' -D @put_migrateproductrule.json | json_pp

Example of Request Body

The following shows an example of creating a product rule based on compatibility rule in JSON format.

{
   "id": "RULE-MG-2428711991-16303049976",
   "name": "Migration3008"
   "lifecycleStatus": "In design",
   "ruleType": "MIGRATION",
   "@type": "ProductRuleOracle",
   "version": "1.0",
   "subject": {
       "id": "ID-2748943967-1630348319691",
       "name": "Test30Aug",
        
       "@referredType": "ProductOfferingOracle"
   },
   "ruleCondition": [
       {
             
           "stringExpression": "UPG_TO ENTITY(Oracle_DPFTEB6S,ProductOfferingOracle)",
           "description": "Rule Condition1",
           "name": "Rule Condition1",
           "id": "Condition1"
       },
       {
           "productRuleResult": [
               {
                   "@type": "MigrationRuleResultOracle",
                   "productOfferingPrice": [
                       {
                           "id": "MG_PP-1245125592-1630339279419",
                           "name": "MG_PP-1245125592-1630339279419",
                            
                           "@referredType": "ProductOfferingPriceOracle",
                           "@type": "ProductOfferingPriceRef",
                           "@baseType": "ProductOfferingPriceOracle"
                       },
                       {
                           "id": "MG_PP-3357907241-1630339279419",
                           "name": "MG_PP-3357907241-1630339279419",
                          
                           "@referredType": "ProductOfferingPriceOracle",
                           "@type": "ProductOfferingPriceRef",
                           "@baseType": "ProductOfferingPriceOracle"
                       }
                   ],
                   "duration": "ORIGINAL_DURATION",
                   "id": "Result-1590826115-163041247168"
               }
           ],
           "validFor": {
               "startDateTime": "2021-08-30T00:00:00.000Z",
               "endDateTime": "2021-09-02T23:59:55.000Z"
           },
           "description": "MG-GRP-2293485690-163030499981",
           "name": "MG-GRP-2293485690-163030499981",
           "id": "MG-GRP-2293485690-163030499981"
       },
       {
           "productRuleResult": [
               {
                   "@type": "MigrationRuleResultOracle",
                   "commitmentStart": "ORIGINAL_END",
                   "duration": "NEW_DURATION",
                   "id": "Result-1476786685-163041247168"
               }
           ],
           "validFor": {
               "startDateTime": "2021-09-03T00:00:00.000Z",
               "endDateTime": "2021-09-30T00:00:00.000Z"
           },
           "description": "MG-GRP-1709107837-163033923660",
           "name": "MG-GRP-1709107837-163033923660",
           "id": "MG-GRP-1709107837-163033923660"
       }
   ],
   "project": {
       "id": "Summer-Initiative",
       "name": "Summer Initiative",
        
   }
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
   "id": "RULE-MG-2428711991-16303049976",
   "name": "Migration3008",
   "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/productRule/RULE-MG-2428711991-16303049976",
   "lifecycleStatus": "In design",
   "ruleType": "MIGRATION",
   "@type": "ProductRuleOracle",
   "created": "2021-08-30T06:30:50.000Z",
   "createdBy": "booth",
   "lastUpdate": "2021-08-31T12:21:12.377Z",
   "lastUpdatedBy": "booth",
   "version": "1.0",
   "subject": {
       "id": "ID-2748943967-1630348319691",
       "name": "Test30Aug",
       "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOffering/ID-2748943967-1630348319691",
       "@referredType": "ProductOfferingOracle"
   },
   "ruleCondition": [
       {
             
           "stringExpression": "UPG_TO ENTITY(Oracle_DPFTEB6S,ProductOfferingOracle)",
           "description": "Rule Condition1",
           "name": "Rule Condition1",
           "id": "Condition1"
       },
       {
           "productRuleResult": [
               {
                   "@type": "MigrationRuleResultOracle",
                   "productOfferingPrice": [
                       {
                           "id": "MG_PP-1245125592-1630339279419",
                           "name": "MG_PP-1245125592-1630339279419",
                           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOfferingPrice/MG_PP-1245125592-1630339279419",
                           "@referredType": "ProductOfferingPriceOracle",
                           "@type": "ProductOfferingPriceRef",
                           "@baseType": "ProductOfferingPriceOracle"
                       },
                       {
                           "id": "MG_PP-3357907241-1630339279419",
                           "name": "MG_PP-3357907241-1630339279419",
                           "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/productOfferingPrice/MG_PP-3357907241-1630339279419",
                           "@referredType": "ProductOfferingPriceOracle",
                           "@type": "ProductOfferingPriceRef",
                           "@baseType": "ProductOfferingPriceOracle"
                       }
                   ],
                   "duration": "ORIGINAL_DURATION",
                   "id": "Result-1590826115-163041247168"
               }
           ],
           "validFor": {
               "startDateTime": "2021-08-30T00:00:00.000Z",
               "endDateTime": "2021-09-02T23:59:55.000Z"
           },
           "description": "MG-GRP-2293485690-163030499981",
           "name": "MG-GRP-2293485690-163030499981",
           "id": "MG-GRP-2293485690-163030499981"
       },
       {
           "productRuleResult": [
               {
                   "@type": "MigrationRuleResultOracle",
                   "commitmentStart": "ORIGINAL_END",
                   "duration": "NEW_DURATION",
                   "id": "Result-1476786685-163041247168"
               }
           ],
           "validFor": {
               "startDateTime": "2021-09-03T00:00:00.000Z",
               "endDateTime": "2021-09-30T00:00:00.000Z"
           },
           "description": "MG-GRP-1709107837-163033923660",
           "name": "MG-GRP-1709107837-163033923660",
           "id": "MG-GRP-1709107837-163033923660"
       }
   ],
   "project": {
       "id": "Summer-Initiative",
       "name": "Summer Initiative",
       "href": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/tmf-api/productCatalogManagement/v4/project/Summer-Initiative"
   }
}
Back to Top