Customer Create: eventCustomerCreate

The Customer Create event API captures details when a new customer profile is created. It records important customer information such as name, email, mobile number, and other personal details. This data is essential for identifying and registering new customers in the system.

Setting Up Customer Profile

You need to set the customer's information using the rcdp.setCustomer(customerObj); method, before calling the eventCustomerCreate API:

The following example shows how to use setCustomer:

Copy
let customerObj = {
    customerCode: "100",
    email: "user@example.com",
    mobile: "9876543210",
    eyeColor: "blue"
};

// Set customer details
rcdp.setCustomer(customerObj);

// Trigger the event
rcdp.executeEventByData({}, 'eventCustomerCreate');

API Endpoint and Method

URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/{APP_API_KEY}/eventCustomerCreate

Example URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/BESQILOBZCGHVLZTCNTGJMYGQEARWVZVCUPYVUGNCZPJRSUDAR/eventCustomerCreate

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

customerCode String Required

Unique code identifying the new customer.

Example: "111"

customerEmailId String Required

Email address of the customer.

Example: "john.smith@example.com"

Note: Either customerEmailId or mobileNo is required.

firstName

String

Optional

Specifies the first name of the customer.

Example: "John"

middleName

String

Optional

Specifies the middle name of the customer.

Example: "D"

lastName

String

Optional

Specifies the last name of the customer.

Example: ”Smith”

gender

String

Optional

Specifies the gender of the customer.

Example: "Male"

mobileNo

String

Required

Specifies the mobile number of the customer.

Example: "1234567890"

Note: Either customerEmailId or mobileNo is required.

dob

String

Optional

Specifies the date of birth of the customer in the MM-dd-yyyy format.

Example: ”12-30-2000”

joiningDate String Optional

Specifies the joining date in the MM-dd-yyyy format.

Example: "07-30-2022"

Request Body Schema

Copy
{
  "eventData": {
    "eventType":"String",
    "customerCode":"String",
    "firstName":"String",
    "middleName":"String",
    "lastName":"String",
    "customerEmailId":"String",
    "mobileNo":"String",
    "gender":"String",
    "dob":"String"",
    "joiningDate":"String"
  }
}

Example Request

Copy
{
  "eventData": {
    "eventType":"eventCustomerCreate",
    "customerCode":"111",
    "firstName":"John",
    "middleName":"D",
    "lastName":"Smith",
    "customerEmailId":"john.smith@example.com",
    "mobileNo":"1234567890",
    "gender":"Male",
    "dob":"12-30-2000",
    "joiningDate":"07-30-2022"
  }
}

Example Response

Copy
{
  "status": "success",
  "message": "Customer profile created successfully."
}

HTTP Response Codes

Response Code

Description

202 Accepted The request has been received and validated, but processing is asynchronous and not yet complete.