Customer Login: eventLogin

The Customer Login event API captures data when a customer logs into the system. It records the date and time of the login, which is useful for tracking user activity and engagement.

Setting Up Customer Profile

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

API Endpoint and Method

URL

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

Example URL

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

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

eventType

String

Optional

Specifies the type of event.

Example: "eventLogin"

login String Optional

Specifies the date and time of the login in UTC format.

Example: "2022-08-02 23:14 UTC"

Request Body Schema

Copy
{
  "eventData": {
    "eventType":"String",
    "login":"String"
  }
}

Example Request

Copy
{
  "eventData": {
    "eventType":"eventLogin",
    "login":"2022-08-02 23:14 UTC"
  }
}

Example Response

Copy
{
  "status": "success",
  "message": "Customer login event captured successfully."
}

HTTP Response Codes

Response Code

Description

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