Howinibs
  • Introduction
    • Introduction
    • Do I Need Howinibs?
    • Getting Started with Howinibs
    • The Project Champion
    • Flow Chart
    • Concepts and Terms
  • Basic Setup
    • Setting Up
    • Company Setup
    • Setting Up Taxes
    • Setting Company Sales Goal
    • Global Defaults
    • System Settings
    • Letter Head
    • Holiday List
    • Implementation Strategy
  • Data Import
    • Data Management
    • Data Import Tool
    • Data Export
    • Chart Of Accounts Importer
    • Downloading Backups
  • Users and Permissions
    • Adding Users
    • Users And Permissions
    • Role and Role Profile
    • Role Based Permissions
    • User Permissions
    • Role Permission for Page and Report
    • Sharing
    • Limited User
    • Administrator
    • Difference Between System User and Website User
    • Change existing user's email ID
    • Change User Password
    • Disable Any User
    • Setting Up Email Signature in Howinibs
    • User Restriction
    • Managing Perm Level in Permission Manager
    • Field Level Permission Management
    • Edit Export/Print permissions for reports
  • Printing
    • Printing and Branding
    • Print Settings
    • Print Format
    • Print Format Builder
    • Print Style
    • Print Headings
    • Address Template
    • Terms And Conditions
    • Cheque Print Template
    • Custom Translations
    • Raw Printing
  • Workflows
    • Workflows
    • Workflow Actions
    • Workflow State
  • Email
    • Email setup
    • Email Domain
    • Email Account
    • Email Inbox
    • Email Template
    • Sending Email from any Document
    • Linking Emails to Documents
    • Email Digest
    • Auto Email Reports
    • SMS Settings
    • Notification
    • Document Follow
    • Email Dropbox
  • System Configuration
    • Settings
    • Show or Hide Modules
    • Document Naming Settings
    • Session Defaults
    • Bulk Renaming of Records
    • Bulk Update
    • Domain settings
    • Energy Point System
  • Data Privacy
    • Personal Data Download
    • Personal Data Deletion
  • Configurations
    • Manage Tree Structure Masters
    • Set default values for any field
    • Set Precision
    • Set Language
    • Edit Submitted Document
    • Delete Submitted Document
    • Disable Notification Emails
    • Set Current Value for Naming Series
    • Remove Link at the Bottom of the Print Page
    • Remove Line Breaks in Print Formats
    • Easy steps to setup Workflow
    • To-Do Auto Creation
    • Tree Master Renaming
    • Letter Head in the Report
    • Sync DocTypes with Events Calendar
    • Merging Accounts
    • Changing Parent Account
    • Fiscal Year Creation
    • Freeze an Account
    • Freeze Accounting Entries
    • Common Receivable Account
    • Common Party Accounting
    • Freeze Exchange Rate
    • Linking stock warehouse and accounts
    • Print Cancelled Invoice
    • Default Receivable / Payable Account
    • Mode of Payment
    • Maintaining Supplier's Item Code In the Item master
    • Purchasing in Different UoM
    • Amending Purchase Order after Submit
    • Setting Employee-wise Leave Approver
    • User Permission based on Hierarchy
    • Selling in Different UoM
    • Shipping Rule
    • Adding Margin
    • Print Settings
    • Change the Rate of Items in the Sales Cycle
    • Howinibs for Service Organization
    • Allow Over Delivery/Billing
    • Auto Creation of Material Request
    • Item Codification
    • Serial Number Naming
    • Track Items Using Barcode
    • Managing Fractions in UOM
    • Item Valuation Setup and Transactions
    • FIFO and Moving Average calculation difference
    • Serialised Item Valuation Rate calculation
    • Raw material valuation
  • Advanced
    • Setting Workflows on Masters
    • Include Document Link in Notification Email
    • Export Data in Excel/CSV
    • Setup Two Factor Authentication
    • Configuring A Reply-To Email Address
    • Setting up Sendgrid SMTP Email in Howinibs
    • Bank Guarantee
    • Loyalty Program
    • Budgeting
    • Discount Accounting
    • Invoice Discounting
    • Semi-Auto Payment Reconciliation
    • Payment Ledger
    • Manage Foreign Exchange Difference
    • Immutable Ledger
    • Allocating Credit Note and Payment
    • Reconcile Advance Payment made to the Supplier
    • Balance in Temporary Account
    • Perpetual Inventory for Non-stock Item
    • Landed cost Voucher
    • Calculating Freight in taxes in Howinibs
    • Create Supplier Quotation through Supplier Portal
    • Using Auto Attendance
    • Integrating Howinibs With Biometric Attendance Devices
    • Project Costing
    • Project Profitability
    • Project and Managing Expenses
    • Project from Customer Portal
    • Drop Ship
    • Drop Ship Between Subsidiary Companies
    • Loyalty points redemption in POS
    • Inventory Dimension
    • Delivery Trip
    • Projected Quantity
    • Perpetual Inventory
    • Stock Reservation
    • Material Transfer from Delivery Note and Purchase Receipt
    • Managing Batch wise Inventory
    • Migrate To Perpetual Inventory
    • Purpose of Stock Received but not Billed
    • Opening Stock Balance Entry for Serialized and Batch Item
    • Item Alternative
    • Subcontracting
    • Capacity Planning based on Work Order
    • Capacity Planning based on Production Order
    • Subcontracting in Howinibs
    • Fetch child table values using Jinja tags
    • Change Custom Field Datatype After Field Creation
    • Company-wise Naming Series
    • Feedback Request Using a Web Form
  • Error and Reports
    • Email Error in Sending or Receiving
    • Maximum User Limit Issue
    • Import Error due to Workflow
    • Perm Level Error
    • Permission Error Problems
    • Using Prepared Report
    • What if Emails are not being received by the Recipients?
    • Purchase Invoice - Account Type Error
    • Fixing Fiscal Year Error
    • Round off Account Validation Message
    • Delete entries linked with GL entries
    • Invoice rounding issue
    • Customise Cash Flow Report
    • Procurement Tracker Report
    • Brandwise Items and Profitability Report
    • Open Work Order Report
    • Maximum Number of Fields in a Form
    • Making Custom Reports
    • Deleting Custom Reports
    • Report Showing Multiple Lines for One Document
    • Add columns in Standard Report and Export
    • Export Data for Specific Year or Filter
  • Using Howinibs
    • Introduction
  • Tools
    • To Do
    • Notes
    • Video
    • Calendar
    • Dashboard
    • Global Search
    • Desktop
    • Bank Reconciliation
    • Payment Reconciliation
    • UnReconcile
    • Period Closing Voucher
    • Payment Order
    • Howinibs QuickBooks Migrator
    • Process Statement Of Accounts
    • Quality Inspection
    • Stock Reconciliation
    • Quick Stock Balance
    • Student Attendance Tool
    • Assessment Result Tool
    • Course Scheduling Tool
  • Collaboration Tools
    • Assignment
    • Tags
    • Kanban Board
    • Filter by
    • Save Filter
    • Search Filter
    • Collaborating Around Forms
    • Delete Company Transactions
  • Transactions
    • Checking Link Between Documents
    • Duplicate Records
    • Restore Deleted Documents
    • Deleting and Restoring Documents
    • Bulk Rename
    • Renaming Documents
    • Copy Pasting Multiple Records From Excel
    • Adding Attachments to Outgoing Messages
    • Document Versioning
    • Access Log
    • Difference Entry
    • Post Dated Cheque Entry
    • Adjusting Withhold Amount
    • Bulk Payment Entry
    • Withdrawing Salary from Owner's Equity Account
    • Invoice Discount in Payment Entry
    • Adding reference to Journal Entry
    • Book discount allowed and received separately
    • Accounting for Bad Debts
    • Book Petty Cash Entry
    • Debit Note for price adjustment
    • Payment Entry for Capital Account
    • Fetch shipping charges based item's value or weight
    • Purchase invoice for Services
    • Procurement Cycle Overview
    • Request for Raw Materials from Sales Order
    • Applying a Discount
    • Amending Sales Order after Submit
    • Close Sales Order
    • Short Close Multiple Orders
    • Taxes and Charges
    • Incoterm and Named Place
    • Payment Terms
    • Record Commission to Sales Partner
    • Sales Persons in the Sales Transactions
    • Stock Entry Purpose
    • Repack Entry
    • Delivery from Sales Invoice
    • Return Rejected Items
    • Sales Return Management
    • Material consumption
    • Manufacturing without creating BOM
    • Multiple finished goods with single raw material
    • Customer Provided Items
    • Serialised inventory tracking
    • Production Scrap Management
  • Automation
    • Automation
    • Assignment Rule
    • Milestone Tracking
    • Auto Repeat
    • Event Streaming
  • API s
    • Sales Cycle Integration
  • Accounts
    • Introduction
  • Setup And Opening
    • Accounting Entries
    • Accounts Settings
    • Chart Of Accounts
    • Opening Balance in Accounts
    • Opening Invoice Creation Tool
    • Cost Center
    • Cost Center Allocation
    • Fiscal Year
    • Accounting Period
    • Finance Book
    • Accounting Dimensions
    • Accounting Dimensions Filters
    • Bank
    • Bank Account
  • Journals and Payments
    • Payment Terms Status Report
    • Journal Entry
    • Journal Entry Template
    • Payment Entry
    • Dunning
    • Payment Request
    • Mode of Payment
    • Payment Terms
    • Payment Terms Template
    • Advance Payment Entry
    • Inter Company Journal Entry
  • Billing
    • Page Sales Invoice
    • Purchase Invoice
    • Inter Company Invoices
    • Credit Note
    • Debit Note
    • Credit Limit
    • Sales Invoice without an Item
  • Taxes
    • Item Tax Template
    • Tax Withholding Category
    • Tax Rule
    • Tax Category
    • Include Tax or Charge in Valuation or Total?
    • Tax Inclusive Accounting
    • Types in Tax Template
    • Apply Tax on Another Tax or Charge
    • Tax on another tax amount
    • Additional Charges in Payment
    • Stock Transfer with GST
    • GST for multiple branches
    • Naming Series as Per GST Rules
    • Generate GSTR-1 JSON File
  • Pricing
    • Pricing Rule
    • Promotional Scheme
    • Currency
    • Setting up "Buy 1 Get 1 Free" Pricing Rule
  • Multi Currency
    • Currency Exchange
    • Exchange Rate Revaluation
    • Multi Currency Accounting
    • Country
  • Retail Operations
    • Point of Sale Profile
    • Point of Sale
    • POS Invoice Consolidation
  • Accounting Reports
    • Accounting Reports
  • Deferred Accounts
    • Deferred Revenue
    • Deferred Expense
    • Process Deferred Accounting
    • Deferred Revenue/Expense Report
  • Subscription
    • Subscription
    • Subscription Plan
    • Subscription Settings
  • Shareholder Management
    • Shareholder
    • Share Transfer
    • Share Reports
  • Asset
    • Asset
    • Asset Reports
    • Asset Value Adjustment
    • Asset Category
    • Assets
    • Asset Maintenance
    • Asset Maintenance Team
    • Asset Location
    • Asset Repair
    • Asset Capitalization
    • Scrapping an Asset
    • Asset Shift Allocation
    • Selling an Asset
    • Asset Movement
    • Asset Depreciation
    • Asset Maintenance Log
    • Purchasing an Asset
  • Articles
    • Depreciation Entry
    • Moving Asset from Stock Item to Fixed Asset Item
    • Automate Lead Creation
    • CRM Analytics
    • Difference between Lead, Contact, and Customer
    • Installing RediSearch to enable super fast E-commerce Search
    • Loan Management Process
    • Articles
    • Make A Colorful Gantt Chart
    • Bulk Assign Tasks in a Project
    • Automating Issue Assignments in ERPNext
    • Disable Signup on ERPNext Website
    • Website Security
    • Website Home Page
    • Website Banner Resizing
    • 3 Step SEO for your ERPNext Website
    • 2 Step 301 Redirect in your ERPNext Website
    • Integrating ERPNext with other Applications
  • Buying
    • Buying
    • Request for Quotation
    • Purchase Order
    • Purchase Taxes and Charges Template
    • Supplier
    • Supplier Quotation
    • Supplier Scorecard
    • Buying Reports
  • Setup
    • Buying Settings
    • Supplier Group
    • CRM Settings
    • Lead Source
    • Opportunity Type
    • Sales Stage
    • Sales Person
    • Customer Group
    • Email Group
    • Contract
    • Appointment Booking Settings
    • Human Resource Setup
    • HR Settings
    • Payroll Settings
    • Daily Work Summary Group
    • Selling Settings
    • Product Bundle
    • Sales Person Target Allocation
    • Sales Taxes and Charges Template
    • Shipping Rule
    • Party Specific Item
    • Item Price
    • Item Group
    • Unit of Measure (UoM)
    • Manufacturer
    • Program
    • Course
    • Topic
    • Instructor
    • Room
    • Student Category
    • Academic Term
    • Academic Year
    • Education Settings
    • Basics of Manufacturing
    • Manufacturing Settings
    • Manufacturing Dashboard
  • CRM
    • Introduction to CRM
  • Sales
    • Lead
    • Opportunity
    • Customer
    • Contact
    • Address
    • Appointment
  • Reports
    • CRM Reports
    • Human Resources Reports
    • Delayed Tasks Summary
    • Project Profitability Report
    • Project Reports
    • Manufacturing Reports
    • Demand Driven Forecasting
    • Production Planning Report
    • Work Order Summary
    • Job Card Summary
    • Quality Inspection Summary
    • Production Analytics
    • BOM Search
    • BOM Stock Report
    • BOM Operations Time
    • Downtime Analysis
    • Work Order Consumed Materials
    • Returned Materials Against Work Order
    • Issued Items Against Work Order
  • Marketing
    • Campaign
    • Email Campaign
    • Newsletter
    • LinkedIn Settings
    • Twitter Settings
  • E-commerce
    • Set Up E-commerce
    • E Commerce Settings
    • Website Item
    • Product Listing
    • Item Group-wise Product Listing
    • Shopping Cart
    • Shop by Category
    • Coupon Code
    • Wishlist
    • Reviews and Ratings
    • E-commerce Search
    • Store Landing Page
  • Employee
    • Employee
    • Employment Type
    • Branch
    • Department
    • Designation
    • Employee Grade
    • Employee Group
    • Employee Health Insurance
  • Attendance
    • Attendance
    • Employee Attendance Tool
    • Attendance Request
    • Upload Attendance
    • Employee Checkin
    • Auto Attendance
    • Integrating Frappe HR With Biometric Attendance Devices
  • Recruitment
    • Recruitment
    • Job Opening
    • Job Applicant
    • Interview Round
    • Job Offer
    • Appointment Letter
    • Employee Referral
  • Training
    • Training Program
    • Training Event
    • Training Result
    • Training Feedback
  • Employee Lifecycle
    • Employee Lifecycle Management
    • Employee Onboarding
    • Employee Promotion
    • Employee Separation
    • Employee Transfer
  • Payroll
    • Payroll Setup
    • Payroll Management
    • Payroll Period
    • Income Tax Slab
    • Salary Component
    • Salary Structure
    • Salary Structure Assignment
    • Salary Slip
    • Payroll Entry
    • Employee Incentive
  • Employee Tax and Benefits
    • Setting Up Income Tax Deduction
    • Employee Tax Exemption Declaration
    • Employee Tax Exemption Proof Submission
    • Employee Other Income
    • Employee Benefit Application
    • Employee Benefit Claim
  • Performance
    • Appraisal
    • Appraisal Template
    • Appraisal Overview Report
  • Travel and Expense Claim
    • Employee Advance
    • Expense Claim
    • Travel Request
  • Gratuity
    • Gratuity
    • Gratuity Rule
  • Fleet Management
    • Fleet Management
    • Vehicle
    • Vehicle Log
  • Loan Management
    • Loan Management
    • Loan Type
    • Loan Application
    • Loan
    • Loan Security Type
    • Loan Security
    • Loan Security Price
    • Loan Security Pledge
    • Loan Disbursement
    • Loan Interest Accrual
    • Loan Repayment
    • Loan Write Off
    • Loan Security Shortfall
    • Loan Security Unpledge
    • Process Loan Interest Accrual
    • Process Loan Security Shortfall
  • Projects
    • Projects
    • Introduction
  • Project Management
    • Project
    • Tasks
    • Project Template
    • Project Type
    • Project Update
    • Project Views
  • Time Tracking
    • Timesheet
    • Sales Invoice from Timesheet
    • Salary Slip from Timesheet
    • Activity Type
    • Activity Cost
  • Quality Management
    • Quality Management System
    • Quality Meeting
    • Quality Procedure (Standard Operating Procedure)
    • Quality Goal
    • Quality Action
    • Quality Feedback
    • Quality Review
    • Non Conformance
    • Quality Feedback Template
  • Selling
    • Selling
    • Quotation
    • Sales Order
    • Sales Partner
    • Brand
    • Blanket Order
    • Territory
  • Customer Portal
    • Customer Portal
    • Customer Orders Invoices And Shipping Status
    • Portal Login
    • Sign Up
    • Issues
  • Selling Reports
    • Sales Reports
  • Stock
    • Introduction
  • Basics
    • Introduction
    • Warehouse
    • Item
    • Opening Stock
    • Accounting Of Inventory Stock
    • Price Lists
    • Stock Settings
  • Item Variants
    • Item Variants
    • Item Attribute
  • Stock Transactions
    • Material Request
    • Purchase Receipt
    • Delivery Note
    • Stock Entry
    • Packing Slip
    • Shipment
    • Retaining Sample Stock
    • Landed Cost Voucher
    • Pick List
    • Putaway Rule
  • Serial and Batch Number
    • Serial Number
    • Serial and Batch Bundle
    • Batch
    • Installation Note
  • Return
    • Sales Return
    • Purchase Return
  • Stock Reports
    • Stock Ledger Report
    • Stock Level Report
    • BOM Explorer
    • Stock Value and Account Value Comparison Report
    • Closing Stock Balance
  • Errors and Reports
    • Delivery Note Negative Stock Error
    • Maintain Stock field Frozen in the Item master
    • Cannot enable Serial and Batch Number
    • Stock Balance and Stock Account Balance Syncing
  • Support
    • Support
    • Warranty Claim
    • Support Settings
    • Issue
    • Issue Type
    • Service Level Agreement
    • Maintenance Visit
    • Maintenance Schedule
    • Support Reports
  • Website
    • Website
    • Homepage
    • Web Page
    • Blog Post
    • Web Forms
    • Website Settings
    • Website Theme
    • Website Route Meta
    • Web Page Builder
  • Analytics
    • Analytics
  • Education
    • Introduction
    • Education Domain
    • Examination
    • Tracking the Progress
  • Student
    • Student
    • Guardian
    • Student Log
    • Student Batch
    • Student Group
    • Student Group Creation Tool
  • Admission
    • Student Applicant
    • Program Enrollment
    • Program Enrollment Tool
    • Student Admission
  • Fees
    • Fees
    • Fee Structure
    • Fee Category
    • Fee Schedule
  • Schedule
    • Course Schedule
    • Scheduling Tool
  • Assessment
    • Assessment
    • Assessment Criteria
    • Assessment Group
    • Assessment Plan
    • Assessment Result
    • Assessment Plan Status
    • Final Assessment Grades
    • Grading Scale
  • Assessment Reports
    • Course wise Assessment Report
  • Hospitality
    • Hospitality
    • Restaurant
    • Restaurant Menu
    • Restaurant Reservations
    • Restaurant Order Entry
    • Hotel Room
  • Manufacturing
    • Manufacturing
  • Bill of Materials
    • Workstation Type
    • Bill Of Materials
    • Operation
    • Workstation
    • Routing
    • BOM Update Tool
    • BOM Comparison Tool
    • BOM Costing in different Currency
    • Managing Multi-level BOM
    • Multi-level BOM Creator
  • Production and Material Planning
    • Work Order
    • Job Card
    • Production Plan
    • Plant Floor
    • Capacity Planning
    • Downtime Entry
  • Non Profit
    • Introduction
    • Donation
    • Tax Exemption 80G Certificate
  • Membership
    • Member
    • Membership Type
    • Membership
  • Volunteer
    • Volunteer Type
    • Volunteer
  • Donor
    • Donor
    • Donor Type
  • Grant Application
    • Grant Application
  • Chapter
    • Chapter
  • Customize Howinibs
    • Customize Howinibs
  • Records
    • Custom Field
    • Customize Form
    • Document Title
    • DocType
    • Server Script
    • Customize Print Format
    • Authorization Rule
  • Navigation
    • Desk Page
    • Customizing Module Visibility
  • Custom Field
    • Field Types
    • Geolocation Field
    • Table MultiSelect Field
    • Dynamic Link Fields
    • Signature Field
    • Fetching Data from a Document
    • Edit a Field after Submission
    • Creating Custom Link Field
    • Fetching data from a linked master
  • Customize Form
    • Data Visibility in Child Tables
    • Sorting Order in List View
    • Search Record by Specific Field
    • Disable Rounded Total
    • Document Title with multiple fields
  • Customize Print Format
    • Add/Remove Fields from Print Format
    • Customize tables within your Print Format Builder
    • Customizing Field Visibility in Print Format
    • Remove Description in Print Format
    • Print "Centavo" in Words for USD
  • Client Scripts
    • Client Scripts
  • Custom Buttons
    • Add a Custom Button
    • Rename Buttons in Form View
    • Hide Buttons in Form View
  • Fetch Values
    • Update Date Field Based On Value In Other Date Field
    • Fetch value in a child table field from Master
    • Generate Item Code Based On Custom Logic
    • Sales Invoice ID Based On Sales Order ID
    • Fetching Values From Master
    • Fetch the entire address text on a custom field
  • Restrictions
    • Date Validation
    • Restrict Cancel Rights
    • Restrict User Based On Child Record
    • Restrict Purpose Of Stock Entry
    • Lock Time Sheets Based on Date
  • Miscellaneous
    • Filter Options in Select Field
    • Make Read Only After Saving
    • Calculate Incentive For Sales Team
  • Howinibs Integrations
    • Howinibs Integrations
  • Authentication Integration
    • Setting up LDAP
    • Setting up fairlogin
  • Backup Integration
    • Setting Up Dropbox Backups
    • Google Drive Integration
    • Upload Backups to Amazon S3
  • Bank Integration
    • Plaid Integration
  • E-Commerce Integration
    • Shopify Integration
    • WooCommerce Integration
    • Amazon SP-API Integration
    • Zenoti Integration
  • Shipping Integration
    • Howinibs Shipping
  • Google Integration
    • Google Settings
    • Google Calendar Integration
    • Google Contacts Integration
    • Page 1
    • Google Maps Integration
  • Payment Integration
    • Setting up PayPal
    • RazorPay Integration
    • Setting up GoCardless
    • Setting up Stripe
    • Setting up Braintree
    • Paytm Integration
    • M-Pesa Integration
  • Telephony Integration
    • Exotel Integration
  • Regional
    • Regional
  • France
    • Requirements for France
    • Sales and Payment Transactions
    • Le Fichier des Écritures Comptables [FEC]
  • India
    • India Compliance App
    • Lower Deduction Certificate
    • TDS Setup for India
  • Italy
    • Requirements for Italy
    • Importing e-Invoice from Supplier
  • United States of America
    • Taxjar Integration
  • United Arab Emirates
    • Requirements for United Arab Emirates
    • UAE Regional Fields
    • UAE VAT 201 Report in Howinibs
    • VAT/EXCISE Tax Implementation for UAE/KSA
  • South Africa
    • Requirements for South Africa
    • VAT Audit Report
  • Saudi Arabia
    • KSA VAT Management and Reporting
  • Howinibs Subscription
    • Upgrade Subscription Plan and Buy Add-ons
    • Update Subscription Payment Method
  • Student Portal
    • Student Portal
Powered by GitBook
On this page
  • 1. Prerequisites
  • 2. How to set up Event Streaming
  • 3. Features
  1. Automation

Event Streaming

Introduced in Version 13

PreviousAuto RepeatNextAPI s

Last updated 1 year ago

Introduced in Version 13

Event Streaming enables inter site communications between two or more sites. You can subscribe to Document Types and stream Documents between different sites.

For Example: Consider you have more than one Company hosted on different sites, one among them is the main site where you want to do ledger posting and on other sites, the Sales Invoices are generated. You can use Event Streaming in this case. For this, your child company sites can subscribe to the main company site for Item, Customer, and Supplier Document Types. The main Company in turn can subscribe to the child companies for Sales Invoices.

To access Event Streaming, go to:

Home > Automation > Event Streaming

1. Prerequisites

Before creating an Event Producer, a common user needs to be created on both the sites which will be used to access the site and will act as an Event Subscriber. Make sure the user is a System Manager and has the necessary permissions for creation, updation, and deletion of the subscribed DocTypes.

2. How to set up Event Streaming

Let's take two sites for explaining the process. http://testsite:8000 (Consumer site) and http://testsite_producer:8000 (Producer site)

2.1 Obtain the Event Subscriber's keys from the Producer Site

  1. On http://testsiteproducer:8000 (producer site), go to the User list.

  2. Open the user document you are going to use as an Event Subscriber. Scroll down to the section labelled "API Access". In that section, generate keys for the user by clicking on Generate Keys button. You will get a prompt with the user secret, copy the user secret and save it with you. It will also generate an API key.

2.2 Generate Keys for the Event Subscriber on the Consumer Site

  1. On http://test_site:8000 (consumer site), go to the User list and follow the same process specified in the previous step.

2.3 Create an Event Producer on the Consumer Site

  1. The site which you want to subscribe to, is called as the Event Producer. Create an Event Producer document for the site you wish to get the updates from.

  2. On http://test_site:8000 (consumer site), go to Home > Automation > Event Streaming > Event Producer.

  3. Enter the URL of the site you want to subscribe to (in this case http://testsiteproducer:8000), in the Producer URL field.

  4. Add all the Document Types you want to subscribe to, in the Event Producer Document Types table.

  5. If you want to have the created documents with the same name as it is on the remote Event Producer site, check the 'Use Same Name' checkbox in the table against the required Document Type.

  6. Set the Event Subscriber field to the user that will be used to create the documents fetched from the Event Producer. You need to create the same user both ways, i.e. on the Event Consumer as well as the Event Producer site before creating the Event Producer.

  7. Paste the API key and API Secret you generated in the first step (2.1) in the API key and API secret fields respectively.

  8. Save.

  9. After saving, an Event Consumer is created on the producer site (http://testsiteproducer:8000). The keys of the user on the consumer site are automatically copied to the Event Consumer document on the producer site in this process.

Note: If at all the API Secret is changed for the users on any of these sites, you will have to manually update the keys in the Event Producer as well as the Event Consumer on both the sites.

  1. After the Event Producer has been created, an Event Consumer automatically gets created on the producer site. By default, all the Subscribed Document Types have the status as 'Pending'. In order to enable the Event Consumer to consume the documents of these Document Types, their Status needs to be updated to 'Approved'.

  2. Go to: Home > Automation > Event Streaming > Event Consumer.

  3. Once you open the Event Consumer document you will see all the Document Types that the consumer has subscribed to. Change the status from 'Pending' to 'Approved' for all the Document Types that you want to approve to be consumed. You can change the status to 'Rejected' if you do not want the documents of that Document Type to be consumed.

  4. Save.

Note: Document updates for Subscribed Document Types won't be synced unless they are Approved.

If you have some places where internet connectivity is low, for example, a store in a remote area where sales invoices are generated and you want to sync these invoices from the store to the hosted account, you could setup offline syncing using the following steps:

  1. You need to have hosted account with your company set up.

  2. Now create an Event Producer on the hosted account and set the producer URL to the URL of your local account.

  3. Add whatever doctypes you want to sync in the Event Producer Document Types child table.

  4. Approve the doctypes.

As an Event Consumer, if you wish to unsubscribe from the updates for any doctypes you had previously subscribed to, check unsubscribe against the doctype. You will not receive any more updates from the producer site for that particular doctype once you have unsubscribed.

"Event Update Log" logs every create, update, and delete action for documents that have consumers on the Event Producer site. In order to view the Event Update Log:

Go to: Home > Automation > Event Streaming > Event Update Log.

  • For 'Create' type the Update Type, Document Type, Document Name and the entire document (as JSON) is logged.

  • For 'Update' type the Update Type, Document Type, Document Name and the updated data (difference between the previous state and current state of the document) is logged.

  • For 'Delete' type only the Update Type, Document Type, and Document Name is logged.

Like the Update Log, Event Sync Log logs every document synced from the Event Producer on the Event Consumer site. In order to view the Event Sync Log:

Go to: Home > Automation > Event Streaming > Event Sync Log.

A successfully synced event generates a log document with:

  • Update Type: Create, Update or Delete

  • Status: Sync Status

  • DocType

  • Event Producer: The site URL from where the document was created

  • Document Name

  • Remote Document Name: If 'Use Same Name' is unchecked

  • Use Same Name

  • Data: The document data as JSON

A failed event generates a log doc with the above fields along with:

Certain Document Types have dependencies. For example, before syncing a Sales Invoice, the Item and Customer need to be present in the current site. So, Item and Customer are dependencies for Sales Invoice. Event Streaming handles this by on-demand dependency syncing. Whenever any document is to be synced, it first checks whether the document has any dependencies (Link fields, Dynamic Link fields, Child Table fields, etc.). If that dependency is not fullfilled i.e. the dependent document (eg: Item) is not present on your consumer site, it will be synced first and then the Sales Invoice will be synced.

Check the 'Use Same Name' checkbox to let the documents have same name on both Event Producer and Event Consumer sites. If this is not checked, then the document will be created using the naming conventions of the current site.

Note: For Document Types that have naming series, it is advised to keep the 'Use Same Name' checkbox unchecked, to prevent naming conflicts. If this is unchecked, the Documents are created by following the naming conventions on the current site and the 'Remote Site Name' and 'Remote Document Name' custom fields are set in the synced document to store the Event Producer site URL and the document name on the remote site respectively.

If you want to stream documents between an ERPNext instance and another Frappe app for a particular Document Type with same or different structures, or if field names are different in both the sites, you can use Event Streaming with Mapping Configuration.

For this you need to first set up a Document Type Mapping.

To access Document Type Mapping, go to:

Home > Automation > Event Streaming > Document Type Mapping.

  • Mapping Name: Give a unique name to the mapping

  • Local Document Type: The Document Type in your current site

  • Remote Document Type: The Document Type on the Event Producer site which you want to sync

In the Field Mapping child table:

  • Local Fieldname: The fieldname in the Local Document type of your current site.

  • Remote Fieldname: The fieldname in the Remote Document type of the Event Producer site which you want to map to the Local Fieldname. During the sync, the value of the remote fieldname gets copied to the local fieldname.

If your field is not mapped to any other remote fieldname and you always want the field to have the same value, set the set the same in the default value field. Event if you have set the remote fieldname, in case during the sync, remote field's value is not found and if the "Default Value" has been specified, it will be set.

If the field you are trying to map is a child table, you need to create another Document Type Mapping for the child table fields.

  • Mapping Type: Select the Mapping Type as Child Table.

  • Mapping: Select the Document Type Mapping document you created for the child table.

If the DocTypes you are trying to map have any kind of dependencies like Link or Dynamic Link fields, you need to set up another Document Type Mapping for syncing the dependencies.

For example, let's assume that the local doctype is Opportunity and the remote doctype is ERPNext Opportunity. The field party_name (Link field for DocType Lead) in Opportunity is mapped to full_name (Data field) in ERPNext Opportunity. During the sync, this Lead has to be created for the main Opportunity to sync. So you need to set up a mapping for this Link Field too.

  • Mapping Type: In this case, the Mapping Type is Document.

  • Mapping: Select the mapping you just created.

  • Remote Value Filters: You need to specify the filters that will fetch the exact remote document to be mapped. Like in this case, the remote DocType is ERPNext Opportunity which can be uniquely fetched using name, phone number and country.

The format is:

{ "remote fieldname": "field or expression from where we will get the value for that fieldname"}

If you want to fetch the value from somewhere, start the expression with eval:

Like in this case it is: eval:frappe.db.get_value('Global Defaults', None, 'country')

Lastly, enable the 'Has Mapping' option in the Event Configuration child table in Event Producer against the required Document Type and select the Document Type Mapping you just created.

If you are in scenario when you do not want to send over all the documents in a doctype over to the consumer, you can specify the conditions for them.

For example, if you would like to emit only those Note documents that are public, you can specify them within the Producer/Consumer document.

If a document satisfies a condition down the line in its lifetime, all the old Event Update Logs are synced to the consumer

Let's consider another example. You want to sync only those Sales Invoices that are submitted. You can specify doc.docstatus == 1 as the condition. The invoices will not be synced until they are submitted.

For each update log, you can see its Consumers within the Update Log document.

If you need more fine control over the conditions, you can hook up a custom function. Your function will be executed with parameters consumer, doc & update_log. For example, you want to sync only those Notes that are odd

def is_odd_note(consumer, doc, update_log):
    return frappe.db.sql("""
        SELECT
            COUNT(*)
        FROM `tabNote`
        WHERE creation <= %(creation)s
    """, { "creation": doc.creation })[0][0] % 2 != 0

Then, you could specify the condition:

cmd: my_custom_app.note.is_odd_note

Was this article helpful?Give Feedback.


Event Producer

2.4 Approve Event Consumer on the Event Producer site

Event Consumer

2.5 Offline access with single site

Set up an ERPNext local instance. You can refer for local setup.

3. Features

3.1 Unsubscribe from the updates

Unsubscribe

3.2 Event Update Log

Event Update Log

3.3 Event Sync Log

Event Sync Log
Event Sync Log

Error: The error because of which the document was not synced.

Resync Button: It also provides a 'Resync' button in order to resync the failed event.

3.4 Dependency Syncing

For example: Sales Invoice syncing with Item dependency:

3.5 Naming Configuration

Use Same Name Config
Subscribed Document

3.6 Mapping Configuration

3.6.1 Mapping for DocTypes with similar structure

Document Type Mapping

3.6.2 Default value for some field

Child Table Mapping Link

3.6.3 Mapping for DocTypes having child tables

Child Table Mapping Link
Child Table Mapping Link

3.6.4 Mapping for DocTypes having dependencies (Link, Dynamic Link fields)

Lead Dependency Creation
Document Mapping Type
Mapping Configuration

3.6 Conditional Events Configuration

Child Table Mapping Link
this guide