Versions Compared

Key

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


Tip

Available from CRM.COM R17.1.0


Excerpt

This method calculates an accounts receivable's value units (period and lifetime) and the (new) reward tier that should be assigned against it on the next reward tier evaluation. A single accounts receivable can be specified in each call.

...

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Accounts Receivable Identifier

The accounts receivable for which the value units will be calculated for. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier_post
V4:accounts_receivable_identifier_post

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Response Data

Include Page
V4:accounts accounts_receivable_rewards_calculate_value_units_complete
V4:accounts accounts_receivable_rewards_calculate_value_units_complete

...

Expand
titleExample 1

HTTP Method: POST


Request

Code Block
{{server}}/crmapi/rest/v2/accounts_receivable/rewards/calculate_value_units


Body

Code Block
themeConfluence
linenumberstrue
{
     "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c3IiOiJtcGFkbWluaXN0cmF0b3IiLCJvcmciOiJzdGFnaW5nIiwib3VuIjoiMSIsImV4cCI6IjE1Njc1MDgzMDAiLCJpYXQiOiIxNTY3NTAxMTAwIiwianRpIjoiM0JFODBCRTMyNTgwNERERDk1NEVBMTY3MEM2OTdGQTcifQ.nqwHwSXyyQPrIV3SRZhOgrXztGvdn5RXUa9C5YziPC4",
    "accounts_receivable_identifier":{"number":"470"}
}


Response

Code Block
{
    "data": {
        "lifetime_value_units": 4200,
        "next_tier_progression": 1.551,
        "reward_tier": {
            "code": "C",
            "name": "Cobalt",
            "id": "04FDAA9119654BCEA223122AF5CE3707",
            "marketing_information": {
                "tier_color": "3eafd1"
            }
        },
        "period_value_units": 4200
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}