Skip to end of banner
Go to start of banner

POST customer_events/achievements/preview

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Available from CRM.COM R15.0.0

This method is used to preview the amount that will be awarded for an achievement customer event, prior to submitting the achievement customer event.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(semi-optional)

Accounts receivable Identifier

The related accounts receivable. The allowed accounts receivable identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the accounts receivable

number

(semi-optional)

String

The number of the accounts receivable

name

(semi-optional)

String

The name of the accounts receivable

rewards_participant_identifier

(semi-optional)

Rewards Participant IdentifierThe related rewards participant. The allowed rewards participant identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the rewards participant

number

(semi-optional)

String

The number of the rewards participant

classification_identifier

(mandatory)

Customer Event Classification IdentifierThe classification of the customer event. The allowed customer event classification identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the customer event classification

name

(semi-optional)

String

The name of the customer event classification

alternative_code

(semi-optional)

String

The alternative code of  the customer event classification

product_identifier

(optional)

Product Identifier

The product of the customer event. Any type of products can be specified. The allowed product identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the product

code

(semi-optional)

String

The code of the product

alternative_code

(semi-optional)

String

The alternative code of  the product

payment_medium_type_identifier

(optional)

Payment Medium Type Identifier

The payment medium type of the customer event. Only payment medium types which are allowed in the related accounts receivable can be specified. The allowed payment medium type identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the payment medium type

name

(semi-optional)

String

The name of the payment medium type

alternative_code

(semi-optional)

String

The alternative code of  the payment medium type

payment_medium_brand_identifier

(optional)

Payment Medium Brand Identifier

The payment medium brand of the customer event. Only payment medium brands which are allowed in the related accounts receivable can be specified. The allowed payment medium brand identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the payment medium brand

name

(semi-optional)

String

The name of the payment medium brand

alternative_code

(semi-optional)

String

The alternative code of  the payment medium brand

payment_medium_identifier

(optional)

String

The payment medium identifier of the customer event.

amount

(optional)

Number

The achievement customer event's amount

performed_by_unit_identifier

(mandatory)

Unit IdentifierThe unit that initiated the customer event. The allowed unit identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the Unit

name

(semi-optional)

String

The name of the Unit

alternative_code

(semi-optional)

String

The alternative code of  the Unit

performed_on

(mandatory)

DateThe date that the customer event was actually performed

description

(optional)

StringA description of the customer event

external_system

(optional)

String

The third party system that generates the customer event

external_system_reference_number

(optional)

String

The external system's unique reference number of customer event

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

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

Name

Type

Description

total_award_amountNumberThe total amount that will be awarded for that achievement customer event in system currency
total_award_alternative_amountNumber

The total amount that will be awarded for that achievement customer event in alternative currency and only if the awarded amount will be in alternative currency

rewards_participant_id

String

The ID of the achievement customer event's rewards participant

rewards_participant_nameString

The full name of the retrieved rewards participant

wallet_balanceNumber

The current wallet balance of the customer in wallet currency

wallet_alternative_balanceNumber

The current wallet balance of the customer in wallet alternative

voucher_types_setSet of Voucher Types Objects

The set of type of the voucher that will be awarded instantly if such an achievement customer event is performed

 

Referred Objects Response Data

 voucher_type response data object
NameType Description
IdStringThe ID of the retrieved voucher type
nameStringThe Name of the retrieved voucher type
alternative_codeStringThe Alternative Code of the retrieved voucher type
value_optionsString

Defines if the value should be fixed, as defined in the voucher type, or a variable, as defined during the creation of the vouchers. The supported options are FIXED and VARIABLE

From CRM.COM R13.1.0 and onwards for voucher types of classification equal to "Electronic Voucher" the supported option is VARIABLE

From CRM.COM R14.0.0 and onwards for voucher types of classification equal to "Refund Voucher" the supported option is VARIABLE

classificationString

The Classification of the retrieved voucher type

Available from CRM.COM R13.1.0

descriptionStringThe Description of the retrieved voucher type

Examples

 Example 1

HTTP Method: POST

 

Request:

Body:

 {
   "token":"{{token}}",
  "rewards_participant_identifier":{"number":"RP0000000126"},
   "classification_identifier":{"name":"Customer Feedback 3"},
   "performed_by_unit_identifier":{"name":"Admin Unit"},
   "performed_on":"2018-09-24T09:49:59",
   "description":"first purchase event",
    "payment_medium_brand_identifier":{"name":"PMB Test"},
   "payment_medium_type_identifier":{"name":"PMT Test"},
   "payment_medium_identifier":"PI000001",
"product_identifier":{"code":"Gold"},
"amount":"5",
   "external_system":"UserA21 54 45 "
    
}


Response:

 {
    "data": {
        "total_award_alternative_amount": 0,
        "rewards_participant_id": "C0AC5F16E9DB4057BAAEFC9DAA12FF3D",
        "wallet_balance": 1440,
        "wallet_alternative_balance": 0,
        "rewards_participant_name": "Ekaterini  Financial Statement",
        "total_award_amount": 0
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}
  • No labels