Shopping cart

Integrate Pipedrive with Magento 2 With Webhook

Pipedrive is a fairly popular application built on the foundation of CRM. With the support of Pipedrive, salespeople, agents or traders can manage sales statistics, set goals and thereby identify opportunities to grow their businesses. Pipedrive makes customer relationships management more comfortable and interesting. Currently, Magento 2 does not support integration with Pipedrive. To solve this problem, Mageplaza develops Webhook extension which allows Magento 2 to integrate with Pipedrive. As a result, store owners can easily manage and grow their business.

What Is Webhook?

Webhook is a helpful tool which allows online stores to configure to send an API request to a configurable destination (URL) such as other servers or applications in cases trigger events including new order, customer login, abandoned carts, etc occur. As a result, store owners can instantly update important notifications and have suitable activities shortly.

Table of Content

These entities of Magento which Webhook supports:

  • Customer
  • Order
  • Invoice
  • Shipment
  • Credit Memo
  • Product
  • Category
  • Abandoned Cart

These entities which Pipedrive supports:

  • Activities
  • Deals
  • Files
  • Message
  • Notes
  • Organizations
  • Person
  • Product
  • Roles
  • User

How To Integrate Pipedrive With Magento 2 With Webhook

Instructions For Registering And Using Pipedrive

Access to here, then click the Try it free button to register

Instructions For Registering And Using Pipedrive 1

Fill in all fields with information > Click the Get access button to complete the registration or you can use your Google account to register your Pipedrive account.

Instructions For Registering And Using Pipedrive

After registering successfully, please click on your account icon on the top right corner of the screen and select Settings.

Instructions For Registering And Using Pipedrive 2

Select API to get key API

Instructions For Registering And Using Pipedrive 3

You will see Your personal API token as below:

Instructions For Registering And Using Pipedrive 4

These Fields Of Pipedrive

To view the latest fields of Pipedrive, you can click here.

Instructions For Creating Hook

How to create a new user in Pipedrive via Magento 2

Required fields

  • name
  • email
  • active_flag

In this part, I will give detail instructions on how to configure Webhook which helps Magento 2 integrate with Pipedrive.

From the Admin Panel, go to System > Webhook > Manage Hooks, select Add New on the right corner, then you will see many options including New Order, New Customer, Update Customer, Delete Customer, etc.

Step 1: Fill all information in the General Information tab

Instructions For Creating Hook image 1

Step 2: Enter the data on the Action tab

Instructions For Creating Hook Instructions For Creating Hook image 2

Note:

Payload URL: Using the link which has below form:

  • POST Method: https://api.pipedrive.com/v1/users?api_token={key_api}. Where “key_api” is the API getting from Pipedrive, according to the above instruction.
  • Other methods: Same as above

Headers: Click the Add button to add values of headers such as Name and Value, according to requests of servers.

  • With POST method, you need to add: Name = Accept and Value = application/json

Body: With POST or PUT method, you need to add content on the Content section to send the request. Click the Insert Variable button to choose variable. For example: You have a new_customer hook in Magento 2. Now, you want a new user will be created compatibly in Pipedrive when you add a new customer in Magento 2. To make it, You need to insert the following content into the body section:

{
      "name": "mageplaza",
      "email": "[email protected]",
      "active_flag": "1"
  }

Note: If you want to get any data field, you need to change the value of this data field with variable coming from Insert Variable.

The results of creating a hook:

Instructions For Creating Hook image 4

Click Select > View to redirect to View log page where you can view the data information.

Instructions For Creating Hook image 5

The Result Shown In Pipedrive:

The Result Shown In Pipedrive

These Available Body Templates

New Person

End point: POST/persons

  • Required fields:

    • name
  • Optional fields:

    • owner_id
    • org_id
    • email
    • phone
    • Visible_to
    • add_time

Payload URL: https://api.pipedrive.com/v1/persons?api_token={key_api} where “key_api” is your API Key.

With POST method, you need to insert the following content into body section:

{
    "name": "Mageplaza",
    "email": "[email protected]",
    "phone": "101010101",
    "add_time": "null",
    "visible_to": "1"
}

New Deals

End Point: POST /deals

  • Required fields:

    • title
  • Optional fields:

    • value
    • status
    • probability
    • lost_reason
    • add_time
    • visible_to

Payload URL: https://api.pipedrive.com/v1/deals?api_token={key_api} where “key_api” is your API Key.

With POST method, you need to insert the following content into body section:

{
	"title": "Test API",
	"value": "1",
	"probability": "5",
	"lost_reason": "null",
	"add_time": "null",
	"status": "open",
	"visible_to": "1"
}

Note: If you want to get any data field, you need to change the value of null with variable coming from Insert Variable.

Conclusion

In this tutorial, we introduce how to register Pipedrive, create Hook with Mageplaza Webhook Extension to integrate Pipedrive with Magento 2. In addition, you can refer to other useful extensions for your store here.

Explore Mageplaza Webhook extension now!





Back Ask Mageplaza

magento-2-tutorial
webhook