Skip to main content

Initiate flow V2

How to use ?

The initiate flow API can be used to trigger a flow with the variables of your choice. Using this you can either connect an external system like a payment gateway or a google form or calendly to BIK as well as this can be used by your inhouse dev team to trigger flows.

You can call the initiate flow API along with the payload of your choice. The payload should contain atleast one identifier to identify the user. This approach is mostly no code and involves little to no programming.

Valid identifiers are

  • Shopify Order Id
  • Shopify Customer Id
  • Phone Number
  • Email

Here is a step by step guide on how to use the second version of the initiate flow API.

  1. Create a new flow and select the trigger to be webhook. If you are working on behalf of an cleint, do the below steps with the client in case you don't have access.

flow id

  1. Once you do that you will get the endpoint of the flow you want to trigger. Copy that endpoint.

flow id

  1. Paste a sample payload that you anticipate to hit the endpoint with. It will help to populate the variables which can be used in the flow.

  2. Amongst the variables sent in the payload, select the customer identifier variable.

flow id

Example if your payload is

{
"customer": {
"name": "John Doe",
"email": "john@bik.ai"
}
}

The customer identifier variable will be customer.email

Now you integration is complete, you can make a flow and call the endpoint to trigger it.

Now let us see an example how you can connect Razorpay to BIK using the initiate flow API.


Example : Razorpay integration using Initiate Flow API

  1. Make a new flow and add a sample razorpay payload for the payment.captured event. Copy the payload from the razorpay dashboard.

flow id

  1. From the above payload we next select the customer identifier variable

flow id

  1. Set up a flow with the message content we want to send on a successful payment flow id

  2. Also add the endpoint you got from razorpay to finish the integration flow_id

Congratulations! Your razorpay integration will now be complete.

As you can see we connected with a third party system without writing a line of code.