Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Excerpt

This method creates an ad hoc discount

...

to be applied on a specific subscription or job. A  single ad hoc discount can be created by each call.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

additive_discount_definition_identifier

(mandatory)

Additive Discount Definition identifier  

The identifier of the additive discount definition that will be applied. Only additive discount definitions of type Ad Hoc can be specified, considering that they can be applied on the specified subscription or job, and by the specified user.The allowed additive discount definition identifier fields are the following:

Include Page
V4:additive_discount_definition_identifier
V4:additive_discount_definition_identifier

subscription_identifier

(mandatory on conditions)

Subscription identifier  

The identifier of the subscription on which the ad hoc discount will be applied on. This information is mandatory unless a job or account is specified. In that case it is not allowed to specified a subscription as well. The allowed subscription identifier fields are the following:

Include Page
V4:subscription_identifier
V4:subscription_identifier

job_identifier

(mandatory on conditions)

Job identifier

The identifier of the job on which the ad hoc discount will be applied on. This information is mandatory unless a subscription or account is specified. In that case it is not allowed to specified a job as well. The allowed job identifier fields are the following:

Include Page
V4:job_identifier
V4:job_identifier

discount_amount

(mandatory and applicable on conditions)

 Number

The discount amount that will be applied.

This information is applicable and mandatory  if the additive discount definition is set up to provide a range of discount based on amount

discount_percentage

(mandatory and applicable on conditions)

Number

The discount percentage that will be applied.

This information is applicable and mandatory  if the additive discount definition is set up to provide a range of discount based on percentageintended

usage_currency_identifier

(optional)

Currency IdentifierThe currency that the user amountNumber

The free usage amount that will be applied.

This information is applicable and mandatory  if the additive discount definition is set up to provide a range of discount based on free usage

Tip

Available from CRM.COM R15.0.0

intended_currency_identifier

(optional)

Currency Identifier

The currency that the user was intended to use for the ad hoc discount. If specified then it is validated against the currency of the related accounts receivable and if they don't match then an error is throw. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:

Include Page
V4:currency_identifier
V4:currency_identifier

Tip

Available from CRM.COM R11.0.0

effective_date

(optional)

DateThe date that the discount becomes effective

expiration_date

(optional)

DateThe date that the discount will expire

provided_by_identifier

(optional)

User IdentifierThe identifier of the user that provided the ad hoc discount. If not specified then it defaults to the user that submitted the request into the system. The allowed user identifier fields are the following:

Include Page
V4:user_identifier
V4:user_identifier

provided_on

(optional)

DateThe date that the ad hoc discount was provided. If not specified then it defaults to the date that the request was submitted into the system.

udf_string_1 

(optional)

String

User Defined Field of type String

udf_string_2

(optional)

String

User Defined Field of type String

udf_string_3 

(optional)

String

User Defined Field of type String

udf_string_4 

(optional)

String

User Defined Field of type String

udf_string_5

(optional)

String

User Defined Field of type String

udf_string_6 

(optional)

String

User Defined Field of type String

udf_string_7

(optional)

String

User Defined Field of type String

udf_string_8

(optional)

String

User Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1 

(optional)

Date

User Defined Field of type Date

udf_date_2 

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

discount_free_period

(mandatory and applicable on conditions)

Time Period Object

The free period that will be provided, measured in days, weeks, months or years. 

This information is applicable and mandatory if the additive discount definition is set up to provide a range of discount based on free period.

Tip

Not available from CRM.COM R15.0.0

products_set

(optional)

Set of Ad hoc Discount Products Objects The products that the discount will be applied on, considering that they are allowed by the specified subscription or job and the specified additive discount definition. If not specified then the discount will be applicable on any products that will be billed

...

Expand
titleExample 1

HTTP Method: POST 

Request:

Body:

{
Code Block
themelanguageConfluencexml
languagetitlejavascript
linenumberstrue
Body
 {
   "token":"43584180E9AB4A2C930F2E5EA53A2E0B{{token}}",
 
    "additive_discount_definition_identifier":{"name":"LuciaPricing TestAudit 4Trail"},
    
 "subscription_identifier":{"number":"S60310S0000009447"},
   
 "discount_free_periodpercentage":26,
 "products_set":[
 {
 "action":"add",
 "product_identifier":{"code":"Bronze"}
 }
 ]
 
}


Response:
{
 "data": {
 "log_information": {
 "created_by_unit": {
 "alternative_code": "adminunit",
  {
                                      "time_period_value":8,
                                      "time_period_uot":"DAYS"
                                 },
    "effective_date":"2015-09-03T12:49:59",
"udf_string_1":"udf string 1",
   "udf_string_2":"udf string 2",
   "udf_string_3":"udf string 3",
   "udf_string_4":"udf string 4",
   "udf_string_5":"udf string 5",
   "udf_string_6":"udf string 6",
   "udf_string_7":"udf string 7",
   "udf_string_8":"udf string 8",
   "udf_float_1":10,
   "udf_float_2":20,
   "udf_float_3":30,
   "udf_float_4":40,
   "udf_float_5":50,
   "udf_float_6":60,
   "udf_float_7":70,
   "udf_float_8":80,
   "udf_date_1":"2014-05-05T15:49:59",
   "udf_date_2":"2014-06-05T15:49:59",
   "udf_date_3":"2014-07-05T15:49:59",
   "udf_date_4":"2014-08-05T15:49:59",
   "products_set":[
          {
           "action":"add",
           "product_identifier":{"code":"P1"}
        },
          {
           "action":"add",
           "product_identifier":{"code":"P2"}
        }
    ]
} 

 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "cancelled_by": null,
        "effective_date": "2015-09-03T12:49:59",
        "udf_float_1": 10,
        "products_set":
        [
            {
                "id": "9B4EB64979BF4C10AAC882112BE3CA09",
                "product":
                {
                    "product_type":
                    {
                        "physical_good_type": null,
                        "service_type": "TERMED",
                        "used_for_provisioning": true,
                        "composition_method": "FLAT",
                        "classification": "SERVICES",
                        "name": "Subscription Packages",
                        "id": "BC954969D3172372D498D3BB2BA590A0",
                        "description": "Subscription main packages",
                        "alternative_code": "SP"
                    },
                    "id": "5C2DCFDD743632AC57AE8147B6EE665E",
                    "description": null,
                    "code": "P1",
                    "alternative_code": "P1"
                }
            },
            {
                "id": "603B866C8D96416DB998197973AF5751",
                "product":
                {
                    "product_type":
                    {
                        "physical_good_type": null,
                        "service_type": "TERMED",
                        "used_for_provisioning": true,
                        "composition_method": "FLAT",
                        "classification": "SERVICES",
                        "name": "Subscription Packages",
                        "id": "BC954969D3172372D498D3BB2BA590A0",
                        "description": "Subscription main packages",
                        "alternative_code": "SP"
                    },
                    "id": "B1E02AFD27BD8D28762873E9EF4880DE",
                    "description": null,
                    "code": "P2",
                    "alternative_code": "P2"
                }
            }
        ],
        "udf_float_2": 20,
        "udf_float_3": 30,
        "number": "25",
        "udf_float_4": 40,
        "udf_string_1": "udf string 1",
        "udf_string_2": "udf string 2",
        "cancelled_on": null,
        "udf_string_3": "udf string 3",
        "udf_string_4": "udf string 4",
        "udf_string_5": "udf string 5",
        "udf_string_6": "udf string 6",
        "udf_string_7": "udf string 7",
        "udf_string_8": "udf string 8",
        "discount_amount": null,
        "discount_percentage": null,
        "id": "A1B073FED79642F2956E0F3F5C50EB7A",
        "approval_method": "MANUAL",
        "subscription":
        {
            "accounts_receivable":
            {
                "account_owner":
                {
                    "last_name": "Ioannou78",
                    "life_cycle_state": "FINANCIAL",
                    "middle_name": null,
                    "company_profile": null,
                    "title": null,
                    "type": "PERSON",
                    "first_name": "Marios",
                    "name": "Marios Ioannou78",
                    "id": "2CAAE984123646F2999935E6BB0D1A90",
                    "company_name": null,
                    "demographics":
                    {
                        "gender": null,
                        "passport_issued_by_country": null,
                        "passport_number": null,
                        "social_security_number": null,
                        "country_of_residence":
                        {
                            "name": "UNITED KINGDOM",
                            "id": "126"
                        },
                        "industry_sector": null,
                        "date_of_birth":
                        {
                            "month": null,
                            "day": null,
                            "year": null
                        },
                        "name_day":
                        {
                            "month": null,
                            "day": null
                        },
                        "id_number": null,
                        "id_issued_by_country": null,
                        "industry": null
                    }
                },
                "life_cycle_state": "ACTIVE",
                "number": "558",
                "name": "mar78",
                "id": "C14A88EF0C434BA886755D8B4DCEE2F2"
            },
            "life_cycle_state": "EFFECTIVE",
            "number": "S60310",
            "type":
            {
                "name": "Normal Subscription",
                "id": "6BB2B984CC9309775D06650C7493A836",
                "description": null,
                "alternative_code": "ST"
            },
            "id": "35656546C7504EEA821A592E69E3C86F"
        },
        "additive_discount_definition":
        {
            "life_cycle_state": "EFFECTIVE",
            "classification": "SUBSCRIPTIONS",
            "type": "AD_HOC",
            "name": "Lucia Test 4 ",
            "id": "CBAE3930253AB31856D28BF34023E44E",
            "alternative_code": "lt4"
        },
        "approved_by": null,
        "applied_on": null,
        "approved_on": null,
        "udf_date_1": "2014-05-05T15:49:59",
        "udf_date_2": "2014-06-05T15:49:59",
        "udf_date_3": "2014-07-05T15:49:59",
        "udf_date_4": "2014-08-05T15:49:59",
        "log_information":
        {
          "group_name": null,
 "community_name": null,
 "name": "Admin Unit",
 "description": "admin unit",
 "id": "1"
 },
 "updated_by_unit": {
 "alternative_code": "adminunit",
 "group_name": null,
 "community_name": null,
 "name": "Admin Unit",
 "description": "admin unit",
 "id": "1"
 },
 "created_date": "2018-06-18T12:56:46",
 "updated_date": "20152018-0306-09T1418T12:2656:4846",
          
 "createdupdated_by_unituser": {
 "person_name": null,
 "id": "1",
 "email": null,
  {
                "community"username": "MPAdministrator"
 },
 "created_by_user": {
 "person_name": null,
 "id"Main: Community"1",
 "email": null,
 "username": "MPAdministrator"
 }
 },
 "applied": false,
   "groupdiscount_nameamount": "Main Group"null,
 "for":               "name": "Admin Unit",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "description": "r1",
                "alternative_code": "MG"
            },
            "created_date": "2015-03-09T14:26:26",
            "updated_by_unit":
            {
                "community_name": "Main Community",
                "group_name": "Main Group",
              null,
 "currency_rate_period": null,
 "approved_on": "2018-06-18T12:56:19",
 "discount_percentage": 26,
 "subscription": {
 "number": "S0000009447",
 "first_activated_date": "2018-06-18T10:17:06",
 "rating_state": "PENDING",
 "accounts_receivable": {
 "number": "ACR0000008718",
 "name": "ACR0000008718 Test 18062018_01",
 "id": "5DD09993C3B64A10A594494CF6211D3C",
 "life_cycle_state": "ACTIVE",
 "account_owner": {
 "company_profile": null,
 "company_name": null,
 "name": "Test 18062018_01",
 "last_name": "18062018_01",
 "id": "922DBE8C2A1046AFADC133E52DFC9E97",
 "life_cycle_state": "FINANCIAL",
 "middle_name": null,
 "title": null,
 "type": "PERSON",
 "first_name": "Test",
 "demographics": {
 "id_number": "18062018_01",
 "gender": null,
 "country_of_residence": {
 "alternative_code": "CYP",
 "three_character_code": "CYP",
 "name": "Admin UnitCYPRUS",
           
    "id": "48305F8849E3C18B227C5BE3A27BA6DF181",
              
 "descriptiontwo_character_code": "r1CY"
 },
 "date_of_birth": {
 "month": null,
 "year": null,
 "day": null
  },
 "alternativeindustry_codesector": null,
 "MGindustry": null,
 "name_day": {
 "month": null,
 "day": null
  },
 "passport_number_expiration_date": null,
 "id_number_expiration_date": null,
 "passport_number": null,
 "social_security_number": null,
  "createdid_issued_by_usercountry": null,
 "passport_issued_by_country": null
 }
 }
 },
  {
                "person_"id": "F23960758EE549FEBAEEAACE895C8BBC",
 "life_cycle_state": "EFFECTIVE",
 "type": {
 "alternative_code": "normalsub",
 "name": "Marios LannisterNormal",
                "username"description": null,
 "id": "mpadministratorD1BAE6454A2248189EBCD7ADD3B4B65F",
 "classification": "FLEXIBLE"
 }
 },
 "expiration_date": null,
    "udf_date_2": null,
 "idudf_date_1": null,
 "1udf_date_4": null,
 "products_set": [
 {
 "product": {
   }"code": "Bronze",
 "product_type": {
 "meter_reading_type": null,
    "service_type": "TERMED",
 "updatedused_byfor_userprovisioning": true,
 "alternative_code": "Main Packages",
 "udr_type": null,
 "composition_method": "FLAT",
  {
                "person_name": "Marios Lannister",
                "username": "mpadministrator",
                "id": "1"
            }
        },
        "provided_by":
        {
            "person_name": "Marios Lannister",
            "username": "mpadministrator",
            "id": "1"
        },
      "name": "Main Packages",
 "description": null,
 "id": "E186E293AAAB49EE86A729540A4287FE",
 "classification": "SERVICES",
 "physical_good_type": null
 },
 "alternative_code": "B",
 "description": "Bronze",
 "id": "F50CC52934BD4F119B6E18E215A4FC55",
 "priority_level": null
 },
 "id": "711F596A557247F5AA36CC6058CA7264"
 }
 ],
 "udf_date_3": null,
 "number": "14",
 "udf_float_3": null,
 "udf_float_4": null,
 "effective_date": null,
 "id": "C6F0301851834CBC82AA19B8437A12E4",
 "udf_float_1": null,
 "approval_method": "AUTOMATIC",
 "udf_float_2": null,
 "udf_string_2": null,
 "udf_string_3": null,
 "udf_string_4": null,
 "udf_string_5": null,
 "cancelled_by": null,
 "udf_string_1": null,
 "additive_discount_definition": {
 "alternative_code": "PAT",
 "name": "Pricing Audit Trail",
 "id": "5DCEED7D776741EFAEDE281FB797AE06",
 "life_cycle_state": "EFFECTIVE",
 "classification": "SUBSCRIPTIONS",
 "type": "AD_HOC"
 },
 "life_cycle_state": "PENDING_APPROVALAPPROVED",
 "cancelled_on": null,
   "provided_on": "2018-06-18T12:56:19",
 "discountapproved_free_periodby":
        {
 "person_name": null,
       "id": "1",
 "time_period_valueemail": 8null,
 "username": "MPAdministrator"
 },
 "applied_on": null,
 "provided_by": {
 "timeperson_period_uotname": null,
 "DAYSid": "1",
       },
        "provided_on"email": null,
 "username": "2015-03-09T14:26:34"MPAdministrator"
 },
 "renew": null,
 "udf_string_6": null,
  "appliedjob": falsenull,
 "udf_string_7": null,
 "discount_free_usage": null,
  "jobudf_string_8": null
 },
 "status": {
   "code": "OK",
 "expiration_datedescription": null"",
 "message": ""
 }
}