# Operations And Actions

#### 1. Establish Connections and Secure Credentials

* **Connections**: Determine which external platforms or services (Razorpay, Stripe, WooCommerce, Shopify) you need to integrate with.
* **Credentials**: Securely gather and store the necessary API keys, secrets, or tokens provided by these services for authentication.

#### 2. Define API Calls and Bot Flow

* **API Calls**: Decide on the HTTP method (GET, POST, PUT, PATCH, DELETE) needed for interacting with each service's API.
* **URLs**: Specify the URLs of Ownchat or other applications/services where data needs to be sent or retrieved.
* **Content Type and Headers**: Set the content type (typically JSON) and include headers (such as API key and secret) required for authentication and authorization.
* **Query Parameters and Body**: Determine what data needs to be sent via query parameters (e.g., customer details, product information) or through the request body.
* **Response Handling**: Store the response from API calls as variables to use in subsequent actions within the workflow.

#### 3. Trigger Actions Based on Events

* **Event Trigger**: Define the specific events or actions within Ownchat that will initiate the workflow, such as a user making a payment or placing an order.
* **Actions**: After receiving a trigger event, set up actions to be executed. This could involve sending approved template messages or text messages to users or updating data in external systems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ownchat.app/work-flows/operations-and-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
