Customer Update Profile: eventUpdateProfile

The Customer Update Profile event API tracks updates to an existing customer's profile. This event captures modifications to personal information such as the name, email, and other relevant details.

Setting Up Customer Profile

You need to set the customer's information using the rcdp.setCustomer(customerObj); method, before calling the eventUpdateProfile 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({}, 'eventUpdateProfile');

API Endpoint and Method

URL

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

Example URL

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

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

customerCode

String

 

Unique code identifying the customer.

Example: "111"

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”

customerEmailId String Required

Specifies the email ID of the customer.

Example: "john.smith@example.com"

Note: Either customerEmailId or mobileNo is required.

mobileNo String Required

Specifies the mobile number of the customer.

Example: "1234567890"

Note: Either customerEmailId or mobileNo is required.

gender

String

Optional

Specifies the gender of the customer.

Example: "Male"

dob

String

Optional

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

Example: ”12-30-2000”

Request Body Schema

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

Example Request

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

Example Response

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

HTTP Response Codes

Response Code

Description

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