ERPNext
Frappe CRM, while a standalone application, offers seamless integration with ERPNext to streamline your business processes. This integration allows you to create quotations and customers directly from deals within Frappe CRM, enhancing efficiency and reducing manual data entry.
Creating Quotation from Deals
The integration introduces a Create Quotation button on the Deal header. Clicking this button initiates the quotation creation process in your ERPNext instance, pre-filling relevant data from the Deal. You can then provide any additional information required and complete the quotation process within ERPNext.
Creating Customer automatically
Upon marking a Deal as "Won" (or a specified status, configurable in ERPNext settings), a new customer will be created in your ERPNext instance. The Deal's contacts and organization address will be automatically linked to this newly created customer.
Once the customer is created, you'll find a "View Customer" button on the deal header, allowing you to easily access the customer from deal page.
Currently ERPNext Integration is only supported for Deal Page
ERPNext Setup
There are two primary scenarios for integrating Frappe CRM with ERPNext:
Same Site
Both Frappe CRM and ERPNext are installed on the same site
- Navigate to Settings -> ERPNext -> Enable -> Set Company.
- Create Customer when status change -> Set Deal Status (Optional)
Separate Site
Frappe CRM and ERPNext are installed on different sites
- Navigate to Settings -> ERPNext -> Enable -> Set Company.
- Create Customer when status change -> Set Deal Status (Optional)
- Check the "Is ERPNext installed on a different site?" checkbox.
Provide Credentials:
- ERPNext Site URL: The URL of your ERPNext instance.
- API Key: The API Key generated from your ERPNext instance.
- API Secret: The API Secret generated from your ERPNext instance.
Obtaining API Key and API Secret
- Log in to your ERPNext Instance
- Create a User with System Manager role
- Navigate to Settings -> API Access
- Click the Generate Keys button and Copy API Secret and save it for future use
Now you have API Key & API Secret
You can generate new API Secret if needed but you cannot create new API Key
Customizations
Create Quotation and View Customer button both are getting rendered by Standard Form Script which gets created once you enable ERPNext Integration.
async function setupForm({ doc, call, $dialog, updateField, createToast }) {
let actions = [];
let is_erpnext_integration_enabled = await call(
"frappe.client.get_single_value",
{ doctype: "ERPNext CRM Settings", field: "enabled" }
);
if (
!["Lost", "Won"].includes(doc?.status) &&
is_erpnext_integration_enabled
) {
actions.push({
label: __("Create Quotation"),
onClick: async () => {
let quotation_url = await call(
"crm.fcrm.doctype.erpnext_crm_settings.erpnext_crm_settings.get_quotation_url",
{ crm_deal: doc.name, organization: doc.organization }
);
if (quotation_url) {
window.open(quotation_url, "_blank");
}
},
});
}
if (is_erpnext_integration_enabled) {
let customer_url = await call(
"crm.fcrm.doctype.erpnext_crm_settings.erpnext_crm_settings.get_customer_link",
{ crm_deal: doc.name }
);
if (customer_url) {
actions.push({
label: __("View Customer"),
onClick: () => window.open(customer_url, "_blank"),
});
}
}
return {
actions: actions,
};
}
What if you need to render these buttons based on your business requirements?
You cannot edit Standard Form Script as you can see in the screenshot it is not editable. But you can Disable it and create a Duplicate of it and you can change the conditions or add more actions based on your requirement.