Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R10.0.0


Excerpt

This method is used to create multiple purchase customer events within a single Web API method call. Note that the maximum number of purchase customer events that can be created is 1000

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

purchase_customer_events_set

(mandatory)

Set of Purchases Customer Event Objects

The set of purchases customer events that will be created by this Web API method. Note that the maximum number of purchases customer events that can be specified within a single Web API call is 1000

intended_currency_identifier

(optional)

Currency Identifier

The currency that the user was intended to use for the customer events. If specified then it is validated against the currency of the related performed by unit (i.e. the default currency) 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


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

Anchor
bulk create purchases parameters
bulk create purchases parameters
Referred Parameter Objects

...

User Defined Field of type Date
Expand
titlebulk purchase customer event parameter object data


Name

Type

Description

request_unique_identifier

(mandatory)

StringA unique identifier of the request, provided by the caller, in order to identify the successful or failed results. Note that this information should be unique and is not stored within CRM.COM

accounts_receivable_identifier

(semi-optional)

Accounts receivable Identifier

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

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

rewards_participant_identifier

(semi-optional)

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

Include Page
V4:rewards_participants_identifier
V4:rewards_participants_identifier

classification_identifier

(optional)

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

Include Page
V4:customer_event_classification_identifier
V4:customer_event_classification_identifier

performed_by_unit_identifier

(mandatory)

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

Include Page
V4:unit_identifier
V4:unit_identifier

performed_on

(mandatory)

DateThe date that the customer event was actually performed

description

(optional)

StringA description of the customer event

reference_number

(mandatory)

StringThe reference number of the retrieved purchase customer event

payment_medium_brand_identifier

(optional)

Payment Medium Brand Identifier

The identifier of the payment medium brand with which the purchase customer event has been made. The allowed payment medium brand identifier fields are the following:

Include Page
V4:payment_medium_brand_identifier
V4:payment_medium_brand_identifier

payment_medium_type_identifier

(optional)

Payment Medium Type Identifier

The payment medium type with which the purchase customer event has been made. The allowed payment medium type identifier fields are the following:

Include Page
V4:payment_medium_type_identifier
V4:payment_medium_type_identifier

payment_medium_identifier

(optional)

String

The payment medium identifier with which the purchase customer event has been made

invoice_identifier

(optional)

Invoice IdentifierThe CRM.COM invoice related with the purchase. The allowed invoice identifier fields are the following:

Include Page
V4:invoice_identifier
V4:invoice_identifier

external_system

(optional)

StringThe third party system that generates the customer event

external_system_reference_number

(optional)

String

The unique reference number of the customer event in the external system

Tip

Available from CRM.COM R10.1.0


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_string_9

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_10

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_11

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_12

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_13

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_14

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_15

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


udf_string_16

(optional)

String

User Defined Field of type String

Tip

Available from CRM.COM R10.1.0


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

4

(optional)

Date

User Defined Field of type Date

spend_request

(optional)

Spend Request Object

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

Tip

Available from CRM.COM R17.0.0


 products_set

(mandatory)

Set of  Purchase Product ObjectsThe purchased products, along with the total amount, net amount and VAT amount for each product

Anchor
create purchase customer event referred parameters
create purchase customer event referred parameters
Referred Parameter Objects

Include Page
V4:purchase_customer_event_spend_request_parameters
V4:purchase_customer_event_spend_request_parameters

Include Page
V4:purchase_customer_event_product_parameters
V4:purchase_customer_event_product_parameters

...

Expand
titleExample 1

HTTP Method: POST

 


Request:

Body:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
   "token":"{{token}}",
  "purchase_customer_events_set":
   [
        {
            "request_unique_identifier":"31",
            "accounts_receivable_identifier":{"number":"ACR0000000228"},
            "performed_by_unit_identifier":{"name":"Admin Unit"},
            "performed_on":"2016-06-22T15:00:00",
            "reference_number":"RF01",
    
        "products_set":
        [
            {
            "product_identifier":{"code":"Serendipity"},
            "total_amount":60,
            "net_amount":50,
            "vat_amount":10
            },
            {
            "product_identifier":{"code":"Bronze"},
            "total_amount":180,
            "net_amount":160,
            "vat_amount":20
            }
        ]
      }
      ,
        {
            "request_unique_identifier":"32",
            "accounts_receivable_identifier":{"number":"ACR0000000228"},
            "performed_by_unit_identifier":{"name":"Admin Unit"},
            "performed_on":"2016-06-22T15:00:00",
            "reference_number":"RF01",
    
        "products_set":
        [
            {
            "product_identifier":{"code":"Serendipity"},
            "total_amount":60,
            "net_amount":50,
            "vat_amount":10
            },
            {
            "product_identifier":{"code":"Bronze"},
            "total_amount":180,
            "net_amount":160,
            "vat_amount":20
            }
        ]
      },
       {
            "request_unique_identifier":"33",
            "accounts_receivable_identifier":{"number":"ACR00008"},
            "performed_by_unit_identifier":{"name":"Admin Unit"},
            "performed_on":"2016-06-22T15:00:00",
            "reference_number":"RF01",
    
        "products_set":
        [
            {
            "product_identifier":{"code":"Serendipity"},
            "total_amount":60,
            "net_amount":50,
            "vat_amount":10
            },
            {
            "product_identifier":{"code":"Bronze"},
            "total_amount":180,
            "net_amount":160,
            "vat_amount":20
            }
        ]
      },
       {
            "request_unique_identifier":"34",
            "accounts_receivable_identifier":{"number":"ACR0000058"},
            "performed_by_unit_identifier":{"name":"Admin Unit"},
            "performed_on":"2016-06-22T15:00:00",
            "reference_number":"RF01",
    
        "products_set":
        [
            {
            "product_identifier":{"code":"Serendipity"},
            "total_amount":60,
            "net_amount":50,
            "vat_amount":10
            },
            {
            "product_identifier":{"code":"Bronze"},
            "total_amount":180,
            "net_amount":160,
            "vat_amount":20
            }
        ]
      }
    ]
}


Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
  "data": {
    "unprocessed_customer_events_set": [
      {
        "error_description": "Error:Account (ACR00008) Not Found. - Description:The specified API value was not found.",
        "error_code": "NotFoundAPIValueException",
        "request_unique_identifier": "33"
      },
      {
        "error_description": "Error:Account (ACR0000058) Not Found. - Description:The specified API value was not found.",
        "error_code": "NotFoundAPIValueException",
        "request_unique_identifier": "34"
      }
    ],
    "processed_customer_events_set": [
      {
        "number": "123",
        "id": "C6F33A7C8A38446FA1A58ACDF105AFE8",
        "request_unique_identifier": "31"
      },
      {
        "number": "124",
        "id": "DFB1ED07A8DB45F6A9205E3CCFCDC14E",
        "request_unique_identifier": "32"
      }
    ]
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...