# Custom Event

Custom event journeys gets triggered on a specific event. You can choose from a list of events like custom ([create you own event](/chatman-enterprise-whatsapp-platform/settings/external-protocols/events.md)), Shopify, Zoho, Hubspot and more. Tap below to explore all the events:

<details>

<summary>Different Events Explained</summary>

1. **Custom events:** These are events that you define based on any action or data that is relevant to your business, such as user behavior, purchase history, location, etc.&#x20;
2. **Shopify events:** These are events that are started by Shopify. Chatman should be integrated with Shopify for all the below events to work properly.
   * **Shopify customer updated:** This event is triggered when a customer updates their profile information, such as their name, email, phone number, etc.
   * **Shopify customer deleted:** This event is triggered when a customer deletes their account or unsubscribes from your store.
   * **Shopify customer created:** This event is triggered when a customer creates an account or subscribes to your store.
   * **Shopify abandoned checkout created:** This event is triggered when a customer adds items to their cart but does not complete the checkout process within a specified time period.
   * **Shopify order fulfilled:**&#x20;
   * **Shopify order cancelled:** This event is triggered when an order is cancelled by you or the customer.
   * **Shopify order updated:** This event is triggered when an order is updated like changing the shipping address and more.
   * **Shopify order created:** This event is triggered when a customer places an order on your store.
3. **Zoho events:** These are events that are started by Zoho.
   * **Zoho customer created:** This event is triggered when a customer is added to [Zoho account integrated with Chatman](/chatman-enterprise-whatsapp-platform/settings/external-protocols/applications/zoho.md#integrate-zoho-with-chatman).
4. **Hubspot events:** These are events that are started by Hubspot
   * **Hubspot customer created:** This event is triggered when a contact is created or added to [Hubspot account integrated with Chatman](/chatman-enterprise-whatsapp-platform/settings/external-protocols/applications/hubspot.md#integrating-hubspot-with-chatman).

</details>

### Scenario

Suppose you  want to send a flash sale notification to all the new customers who logged in your clothing site.

**Explanation:** A customer support representative of your website added those leads to Hubspot to start the journey with the aim above. As soon as the customers are added they reecive a welcome template and flash sale update only if they respond to the template.

How can you create the same?

#### Steps To Create The Journey

1. Select **Custom Events** under **Business Initiated Journey**.

insert

2. Select an event from the drop-down on which the journey gets started. For the scenario above we want the journey to launch when any customer is added to Hubspot.&#x20;

So we select Hubspot>hubspot customer created.

{% hint style="info" %}
You can also select filters if you want to onboard specific customers in the journey. Say with phone numbers starting with +91 or all those who have 'Gmail' in their name.
{% endhint %}

insert

3. Choose a message template that when sent to the customers and if they respond with the desired reply, they are directed to the journey flow.

For the scenario above, we have a template called 'welcome new customer,' we select that. Tap below to see the sample template:&#x20;

<details>

<summary>Sample Template</summary>

Header: Dear {{Customer's Name}},

We're thrilled to have you as part of the {{ Company Name}} family! 🎉 As a valued member, you're in for exclusive updates and early access to our exciting flash sales.

Don't miss out on our upcoming flash sale. Tap the button below to get the details! 🌟

CTA - Interested

</details>

{% hint style="success" %}
It's **recommended** to [**create templates**](/chatman-enterprise-whatsapp-platform/chatman-functions/templates/create-template.md) with **button replies** to ease down the process of conversation and **AI can match the intent** clearly **to initiate the journey flow**.&#x20;
{% endhint %}

insert

4. Once you have opted for a template with ‘quick replies’, its **preview** will be **displayed** on the **right sid**e of the **screen** (If not, **tap** the '**edit**' button **beside** the **template** **drop**-**down**).  You can **set attributes** for the dynamic variables in the template.

Here we want to address the users with their first name so we select User Attributes>first name.

insert

{% hint style="info" %}
**You will get option to set attributes only if your template has dynamic variables**.
{% endhint %}

{% hint style="success" %}
**Attributes selected replaces the dynamic variable {{ }} in the template**. There are many attributes you can choose as per your needs and wants.
{% endhint %}

* Tap ‘**Save**’ templates.

insert

5. Enter an attribute name. This is where the user response gets saved, which **decides** whether the **journey will continue or terminate.**

For the time being, let's name our attribute as **User Message.**

{% hint style="warning" %}
**This is where the journey flow starts based on the user response to the template sent above.**
{% endhint %}

> We will use different cards like [display cards](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/display-cards.md), [rules cards](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/rule-cards.md), [utility cards](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/utility-cards.md) and [plugin cards ](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/plugin-cards.md)to create the journey.

insert

6. Creating the Journey flow

We already have the template with which user can be directed to access the flash sale detail. Now we need to add a card, so when the flow moves to it, the user can get the details.

* Send Template Card

For the same we drag and drop a [Send Template Card](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/utility-cards/send-template.md) that contains the event information.&#x20;

We already created a template with name as 'Flash Sale Info,' we select that. If you don't have a template, tap here to create.

<details>

<summary>What happens here?</summary>

When the customer responds to the template either through a text reply or the button reply the flow moves to the send template card and the customer receives the card with the event details.

</details>

{% hint style="info" %}
If you want to send the template card only if the customer tap 'Interested' button on template, add a [run-if card](/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/rule-cards/run-if-card.md) with the same attribute and value as button name.
{% endhint %}

insert

* End Conversation Card

We now add a end conversation card to complete the journey flow.

#### How does the above journey work?

As soon as a customer is added to the Hubspot, the contact is added to the workflow and receives the template.

insert chat ss

Now, when the customer taps on the template button or respond to it, the journey gets started and the customer receives the template added in the journey that informs about the flash sale details.

insert chat ss

The conversation ends automatically and gets closed as soon as the template card is sent to the customers, as the flow moves to the end conversation card.


---

# 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.makerobos.com/chatman-enterprise-whatsapp-platform/chatman-functions/journeys/business-initiated/custom-event.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.
