Initiate flow
Triggers a chatbot flow for a specified user. An example chatflow is shown below.

info
Either email or phoneNumber must be provided; both cannot be empty at the same time.
Get your sessionId using externalAPI block in the journey builder and scope of the sessionId is with in the flow.
Request parameters
| Name | Type | Required/Optional | Description |
|---|---|---|---|
medium | string | Required | Channel through which messages are sent |
flowId | string | Required | Chatbot flow identifier |
phoneNumber | string | Optional | Phone number of the user |
email | string | Optional | Email address of the user |
name | string | Optional | Name of the user |
nodeName | string | Optional | Name of the target node in the chatbot flow |
businessPhoneNumber | string | Optional | Business phone number from which the flow is triggered |
sessionId | string | Optional | BIK session ID |
carryPayload | [key: string]: string[] | Optional | Key-value payload to pass into the flow |
payload | AbandonedCartPayload | Optional | Abandoned cart payload |
AbandonedCartPayload Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
checkoutId | string | Required | Checkout identifier |
phoneNumber | string | Required | Customer phone number |
email | string | Optional | Customer email address |
abandonedCart | AbandonedCart | Required | Abandoned cart details |
AbandonedCart Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
id | string | Required | Cart identifier |
phoneNumber | string | Required | Customer phone number |
converted | boolean | Required | Whether the cart was converted to an order |
cartPrice | number | Required | Total cart value |
partnersData | PartnerData | Required | Partner integration data |
cart | BikOrderItem[] | Required | Array of order items |
BikOrderItem Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
name | string | Required | Product name |
price | number | Required | Product price |
quantity | number | Required | Product quantity |
productId | number | Required | Product identifier |
variantId | number | Optional | Product variant identifier |
Request Information
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-initiateFlow |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-initiateFlow' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"medium": "whatsapp",
"flowId": "test_flow_id",
"phoneNumber": "+919090909090",
"carryPayload: {
"id": "1234"
}
}'
JSON response example:
{
"status": 200
}
Abandoned Cart
To trigger an abandoned cart flow, include the abandoned cart context in the request payload.
{
"medium": "whatsapp",
"flowId": "test_flow_id",
"phoneNumber": "+919090909090",
"payload": {
"checkoutId": "CHECKOUT_ID",
"abandonedCart": {
"id": "ID",
"phoneNumber": "PHONE_NUMBER",
"cart": [{
"name": "NAME";
"price": 2000;
"quantity": 2;
"productId": 1234;
"variantId": 7890;
}],
"converted": true,
"cartPrice": 1000,
"partnersData": {
id: "PARTNER_ID";
source: "shopify";
customerId?: 1111;
},
},
"phoneNumber": "PHONE_NUMBER",
"email": "EMAIL",
}
}
Response parameters
| Name | Type | Description |
|---|---|---|
status | number | HTTP status code indicating flow initiation result |