Versions Compared

Key

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


Tip

Available from CRM.COM R16.12.0


Excerpt

This method is used to create a purchase customer event in a posted life cycle state

...

Body

Name

Type

Description

id

(optional)

String

The customer event unique Identifier (GUID)

  • If not specified, one will be created by the system automatically

contact_id

(semi-optional)

String

The contact unique identifier (GUID) that the customer event is created for

  • Conditions: Either contact_id or cim must be specified
  • If a contact has multiple accounts, then the purchase customer event will be created against the primary one

cim

(semi-optional)

String

The value for a single contact identification medium representing the customer event is created for

  • Conditions: Either contact_id or cim must be specified
  • Customer Identification Medium will be mapped to the Access Token Authentication Code

reference_number

(mandatory)

StringThe external system’s (unique) reference number that submitted the customer event

classification

(optional)

Object
The classification of the customer event
The allowed identifier fields are the following

Name

Type

Description

id

(semi-optional)

String

The ID of the customer event classification

code

(semi-optional)

String

The code of  the customer event classification


currency_code

(optional)

String

The currency code that the customer event is created against

  • Mapped to previous intended_currency_identifier, but only the "code" attribute will be used for identification purposes

payment_medium_identifier

(optional)

String

The payment medium identifier with which the purchase customer event has been made (e.g. first credit card digits)

performed_on

(optional)

Integer

The date that the customer event was actually performed (in epoch format)

  • If not specified, then the current date-time will be set

merchant_tap

(semi-optional)

Object

The merchant that captured the purchase customer event

  • Conditions: At least merchant_tap or outlet_tap should be specified

The allowed identifier fields are the following

Name

Type

Description

id

(semi-optional)

String

The merchant identifier that captured the purchase customer event

  • Mapped to the business unit identifier

code

(semi-optional)

String

The merchant code that captured the purchase customer event

  • Mapped to the business unit code


outlet_tap

(semi-optional)

Object

The merchant's outlet that captured the purchase customer event

  • Conditions: At least merchant_tap or outlet_tap should be specified. The outlet (business unit) should have the specified merchant as parent business unit

The allowed identifier fields are the following

Name

Type

Description

id

(semi-optional)

String

The outlet identifier that captured the purchase customer event

  • Mapped to the business unit identifier

code

(semi-optional)

String

The outlet code that captured the purchase customer event

  • Mapped to the business unit code


products

(mandatory)

Array of Objects

The purchased items of this customer event

Name

Type

Description

product_sku

(mandatory)

Products IdentifierString
The purchased product sku (code)

quantity

(optional)

Number

The quantity of the specified purchase customer event product (defaults to 1, if not specified)

net_amount

(mandatory)

NumberThe net amount of the specified purchase customer event product

tax_amount

(mandatory)

NumberThe Tax amount of the specified purchase customer event product

total_amount

(mandatory)

NumberThe total amount of the specified purchase customer event product


spend_request

(optional)

Object

Information related with the spend request that should be created as part of the purchase customer event

Name

Type

Description

amount

(semi-optional)

Number
The amount in real currency that is requested to be spend

alternative_amount

(semi-optional)

Number

The amount in alternative currency that is requested to be spend


...