Skip to main content
Aria Knowledge Central

create_discount_rule_m

Creates a discount rule

Note: The previously existing input and/or output fields <client_item_id>, <client_item_id_out> and/or <filter_client_item_id> were removed from this API call in Release 47.

Input Arguments

 
Req Field Name Field Type Max Length Description
required-icon.png client_no long 22 Aria-assigned unique identifier indicating the Aria client providing service to this account.
required-icon.png auth_key string 32 Aria-assigned unique key to be passed with each method call for authenticating the validity of the requestor.
required-icon.png label string 100 Specifies Discount Rule Name. Translatable.
required-icon.png rule_id string 100 Specifies client rule id for Discount Rule
required-icon.png description string 1000 Specifies description for the Discount Rule. Translatable.
required-icon.png ext_description string 1000 Specifies description that can be added to invoice/statment and is visible to account holder. Translatable.
required-icon.png flat_percent_ind string 1 Specifies whether the discount is going to be flat or percentage based.  

Allowable values for flat_percent_ind:

required-icon.png amount float 12 Specifies the amount of discount.
required-icon.png currency string 3 Specifies the currency code of the rule
required-icon.png duration_type_ind string 1 Specifies the duration type.   

Allowable values for duration_type_ind: 

required-icon.png inline_offset_ind string 1 Specifies how the discount will be displayed in the invoice.Valid values are [I, O]
required-icon.png discount_behavior_type_ind string 1 Specifies the discount scope for a discount rule.Valid values are [G, N]
required-icon.png service_code_to_use int 1 Specifies which service code to use. Valid values are [0,1] where 0 uses the same service as the 'charge' line item and 1 uses a specific service
required-icon.png scope_no int 2 Specifies the charges eligible for the discount. 

Allowable values for scope_no: 

  max_applicable_months int 3 Specifies the duration of the discount in months. Allowable values are from 1 to 999.
    max_applicable_weeks int 8

Specifies the duration of the discount in weeks.

Allowable values are 1-999.

    max_applicable_days int 8

Specifies the duration of the discount in days.

Allowable values are 1-999.

  remainder_discount_rule_indicator int 3 When set to TRUE (1), it will prorate the discount applied on the initial invoice and apply the remaining proportion of the discount on the appropriate invoice. By default it is null. This parameter is only applicable when someone enters max_applicable_months. It will be null if no input is given, otherwise it will be stored as 1 or 0 depending upon what the user enters. In addition, be aware that this attribute only applies when a discount rule is assigned at the plan instance level for advanced recurring services.
  max_applications_per_acct int 8 Specifies the number of times the discount can be applied.
  alt_service_no_2_apply int 12 Specifies the specific service code to use.
  OR      
  alt_service_id_2_apply string 100 Specifies the specific service code to use.
  applicable_trans_scope string 1 Specifies whether the discount is applied to each or all transactions.  

Allowable values for applicable_trans_scope: 

  plans array    
  brd_arrow.gifplan_no int 12 Specifies the plan that are eligible for the discount. This is mandatory for scope 11 and 13. REST input arrays should be passed in the following format: plans[0][plan_no]=1002&plans[1][plan_no]=1003 etc
  OR      
  brd_arrow.gifclient_plan_id string 100 Specifies the plan that are eligible for the discount. This is mandatory for scope 11 and 13. REST input arrays should be passed in the following format: plans[0][client_plan_id]=1002&plans[0][client_plan_id]=1003 etc
  service array    
  brd_arrow.gifservice_no int 12 Specifies the services that are eligible for the discount. This is mandatory for scope 12 and 13. REST input arrays should be passed in the following format: For scope 12 service_no[0]=1002&service_no[1]=1003 For scope 13 service_no[0][0]=10002&service_no[0][1]=1001&service_no[1][0]=100&service_no[1][1]=103
  OR      
  brd_arrow.gifclient_service_id string 100 Specifies the services that are eligible for the discount. This is mandatory for scope 12 and 13. REST input arrays should be passed in the following format: For scope 12 service[0][client_service_id]=1002&service[1][client_service_id]=1003 For scope 13 service[0][client_service_id][0]=10002
  item array    
  brd_arrow.gifitem_no int 12 Specifies the inventory items that are eligible for the discount. This is mandatory for scope 31. REST input arrays should be passed in the following format: item[0][item_no]=1002&item[0][item_no]=103
  brd_arrow.gifclient_sku string array 100 Client SKU of the NSO/Inventory item
  use_all_or_nth_subs_rule string 5 Specifies whether to apply discount when 'all' of the plans are under the account or 'some' of the plans are are under the account.  

Allowable values for use_all_or_nth_subs_rule: 

Output Arguments

 
Field Name Field Type Description
error_code long Aria-assigned error identifier. 0 indicates no error
error_msg string Textual description of any error that occurred. "OK" if there was no error.
rule_no string Rule No
  • Was this article helpful?