Whatsapp sender for Tally(dll)

Discussion in 'Tally Integration' started by teja varma, Dec 20, 2019.

    
?

Do you want Whatspp Sender for tally ?

Poll closed Dec 27, 2019.
  1. Intrested

    100.0%
  2. Not Intrested

    0 vote(s)
    0.0%
  3. Its already available

    0 vote(s)
    0.0%
  1. teja varma

    teja varma Active Member


    hello people
    i got an idea to create a Whats-App dll which send invoice and message to ledger contact
    it will open chrome window and automatically navigate to Whats-App site then wait until you scan the qr
    then it will send message or attached PDF that was exported previously and send to the ledger contact in the invoice

    i already have an application which do this
    it works by controlling the browser using web-scrapping and chromium driver
    but i want to integrate with tally
    we no need to buy any API and we can send attachments too
    so let me know how many people are interested in this
    so i will know weather it will be useful or not
     
    Last edited: Dec 20, 2019
    Aashish Chaudhari likes this.


  2. Murali.R

    Murali.R Member


    i am interested sir
     


  3. MithunN

    MithunN Member


    i am interested sir
     


  4. teja varma

    teja varma Active Member


    Hello People ,hope it will help you
    You Can Send Sales Invoice to whats-app from Tally
    it is a COM DLL which send attachments to whats-app by controlling the chrome browser

    IT IS AN OPEN SOURCE PROJECT
    FOR INDIVIDUALS AND EDUCATION PURPOSE ONLY
    NOT FOR COMMERCIAL USE
    ANY COMMERCIAL USAGE IS OFFENSIVE ACCORDING TO THE LICENSING POLICIES

    IF ANY ONE INTERESTED TO CONTRIBUTE OR DEVELOP THIS PROJECT ? LET ME KNOW I WILL ADD YOU TO MY GITHUB REPO


    Requirements:

    1)You Must have latest Version of Google Chrome browser installed on your system or update existing one
    2)Required Chrome Version :79.x.x.xx
    you can check the version of chrome by open chrome ->go-to settings->help->click on about chrome (see the image below)
    3)Microsoft.net framework version 4
    4)Make sure to place all the downloaded files in tally folder


    Registering DLL:

    1) Download the files from the link below
    2)place all the files into Tally folder
    3)Open CMD in administrator Mode (Elevated mode)
    4) Type cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 ;; change directory
    5)Type without quote "regasm TallyWhatsappsender.dll /codebase" ;;Give Full path of the TallyWhatsappsender.dll file
    6)you will get success message after it registered
    7) Load WhatsappSenderTally.txt in Tally ;;tdl file for sending whats-app



    Working:
    1)After Registering and Loading the TDL open or create a sales voucher
    2)Ledger(Party) Mobile Number Should be filled and it should be 12 digits including country code(see the image below)
    3) On Saving the voucher it will it will ask to send whats-app then it will export the invoice
    4)Then Chrome Browser will open Automatically and Navigate to Whats-app site
    5) It will wait until you scan the QrCode
    6)Then it send the attachment to the contact and Close


    Errors:
    1) "contact number is invalid " - this is due you didn't filled the mobile number in ledger and it should be 12 digit including country code (Ex 911234567890)
    2)"chrome driver not find " - this is due you didn't place all the files in tally folder or chromedriver.exe file is missing or deleted
    3)"attachment not found" - this is due invoice not exported properly after saving, check weather invoice is exported after save or not
    4)"Classification not found" - this is due to contact number doesn't have whats-app account check weather party has whats-app account linked to that number or not
    5)"vertical page breaks are too high" - this is a tdl error, make sure page size is to A4 and orientation is portrait , you can check this by pressing ALT+E in voucher and accept it once


    If you face any trouble please post your queries here i will try to help you..

    Limitations:

    1)Currently you can only send to single contact number (multiple contact support will be added in next update)
    2)you can only send sales invoices (You can customize the tdl to send whatever the reports you want)

    Files Download Link : https://github.com/tejavarma-aln/TallyWhatsappSender


    This Project has been moved to Git-hub for version control so you can downloaded latest files whenever you want....

    chromeversion.PNG ledcontact.PNG
     
    Last edited: Dec 30, 2019


  5. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Thanks Dear.
    Keep it Up.:)
     


  6. balajimg

    balajimg Active Member


    It says the RAR file is damaged
     


  7. Ria

    Ria Member


    It isn't, works fine

    Thank you @tejavarma
     


  8. teja varma

    teja varma Active Member



  9. Jay kumar tailor

    Jay kumar tailor Well-Known Member

    Last edited: Dec 21, 2019


  10. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Code For Ledger

    Code:
    
    ;;===============================================Code For Ledger As image==============================================
    
    [#Form: Ledger Vouchers]
    Add : Button : WLedimg
    
    [Button:WLedimg]
    Title:"Whatsapp (Image)"
    Key:Alt+J
    Action:call:SendWhatsappLedimg
    
    [Function: SendWhatsappLedimg]
    
        Variable: PrintFileName    :String
        Variable: defaultfilepath  :String:$$String:"D:\Tally Exported Vouchers\IMAGE\"+$$String:($$Machinedate) +"_"    +$$String:#Ledgername+$$String:".Jpg" 
        Variable: ReceiverContact  :String
        Variable: Exportedfilepath :String
        01 :Query Box:"Do you want to Whatsapp the Ledger (JPEG)?":Yes:No
        02 :If:$$LastResult
     
        03    : SET : PrintFileName : $$String:"D:\Tally Exported Vouchers\IMAGE\"+$$String:($$Machinedate) +"_"    +$$String:#Ledgername ; Export Location path
        04      : SET : ReceiverContact :$LedgerMobile:Ledger:#Ledgername
        10    : SET : SVExportLocation : "D:\Tally Exported Vouchers"
        20    : SET : SVExportFormat     : $$SysName:Jpeg(image)
        40    : SET : SVPrintFileName    : $$MakeExportName:##PrintFileName:##SVExportFormat
        50    : SET : SVOpenFileAfterExport : No
        60    : EXPORT REPORT :.: TRUE
        65  : SET :Exportedfilepath:$$GetFileFullPath:##defaultfilepath
        70  : Exec COM Interface:WhatsappEngine:##ReceiverContact:##Exportedfilepath :@@Msgtitle:@@waitseconds
        80  : Log:$$LastResult
        100 : End If
        101 : Return
    
    
    ;;=========================================Code For Ledger (PDF)=========================================
    
    
    [#Form: Ledger Vouchers]
    Add : Button : WLedpdf
    
    [Button:WLedpdf]
    Title:"Whatsapp (PDF)"
    Key:Alt+W
    Action:call:SendWhatsappLed
    
    [Function: SendWhatsappLed]
    
        Variable: PrintFileName    :String
        Variable: defaultfilepath  :String:$$String:"D:\Tally Exported Vouchers\PDF\"+$$String:($$Machinedate) +"_"    +$$String:#Ledgername+$$String:".pdf"
        Variable: ReceiverContact  :String
        Variable: Exportedfilepath :String
        01 :Query Box:"Do you want to Whatsapp the Ledger (PDF)?":Yes:No
        02 :If:$$LastResult
        03    : SET : PrintFileName : $$String:"D:\Tally Exported Vouchers\PDF\"+$$String:($$Machinedate) +"_"    +$$String:#Ledgername ; Export Location path
        04      : SET : ReceiverContact :$LedgerMobile:Ledger:#Ledgername
        20    : SET : SVExportFormat     : $$SysName:PDF
        40    : SET : SVPrintFileName    : $$MakeExportName:##PrintFileName:##SVExportFormat
        50    : SET : SVOpenFileAfterExport : No
        60    : EXPORT REPORT :.: TRUE
        65  : SET :Exportedfilepath:$$GetFileFullPath:##defaultfilepath
        70  : Exec COM Interface:WhatsappEngine:##ReceiverContact:##Exportedfilepath :@@Msgtitle:@@waitseconds
        80  : Log:$$LastResult
        100 : End If
        101 : Return
    
     
    Last edited: Dec 27, 2019
    Vikram Bhat and teja varma like this.


  11. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    1. Can Set A Field For Custom Timer For Closing Browser.
    2. Field for Message To Customer/Receiver With Document.
     
    Last edited: Dec 22, 2019


  12. teja varma

    teja varma Active Member


    here the updated dll (see the attachment below) for sending title and time in seconds to wait before it closes the window . replace this dll with the existing one..


    tdl code:

    Code:
    [#Form: Sales Color]
      
    
        On : Form Accept : Yes : CALL : SendWhatsapp
    
    [Function: SendWhatsapp]
    
        Variable: PrintFileName    :String
        Variable: defaultfilepath  :String:$$String:$Vouchertypename+"_"+$$String:$vouchernumber +$$String:".pdf"
        Variable: ReceiverContact  :String
        Variable: Exportedfilepath :String
        01 :Query Box:"Do you want to Whatsapp the invoice?":Yes:No
        02 :If:$$LastResult
        03    : SET : PrintFileName : $$String:$Vouchertypename+"_"+$$String:$vouchernumber ; Export Location path
        04  : SET : ReceiverContact :$LedgerMobile:Ledger:$PartyLedgerName
        20    : SET : SVExportFormat     : $$SysName:PDF
        40    : SET : SVPrintFileName    : $$MakeExportName:##PrintFileName:##SVExportFormat
        50    : SET : SVOpenFileAfterExport : No
        60    : EXPORT REPORT :.: TRUE
        65  : SET :Exportedfilepath:$$GetFileFullPath:##defaultfilepath
        70  : Exec COM Interface:WhatsappEngine:##ReceiverContact:##Exportedfilepath:@@Msgtitle:@@waitseconds
        80  : Log:$$LastResult
        100 : End If
        101 : Return
              
          
    [COM Interface:WhatsappEngine]
      
        Project:TallyWhatsappsender
        Class:Class1
        Interface:InitProcess
        Parameter:p1:String:In
        Parameter:p2:String:In
        Parameter:p3:String:In
        Parameter:p4:String:In
        Return: String
      
    [System:Formulae]
        Msgtitle:"your title"
        waitseconds :10 ;; time  in seconds to wait before closing the window
    
     

    Attached Files:

    Last edited: Dec 22, 2019


  13. teja varma

    teja varma Active Member


    please fallow the above mentioned process
     


  14. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Thanks Dear.
    Now It Is Working Fine.:)
     


  15. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    1. EveryTime Asking For QR Scanning.

    Last One

    Is It Safe For Us ?
     
    sattam likes this.


  16. teja varma

    teja varma Active Member


    yes it is secure
    it is just like normally what we do with the browser but things are automated
    it will send key strokes and button clicks like as we physically do
    apart from this there is nothing to do


    there are some drawbacks for this, as you said it will open new window every time and wait for scanning
    this is because it doesn't store any information about previous session and instances
    so it start as new every time it runs
     


  17. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    I Believe That Ask For Any Issue is Good.
    As we Know Data Security Is Must For Everyone Today.
    Then Everyone Has Doubt's Before Using New Things.
    In this Case,It is a Necessary thing to Clear Doubts .

    Thanks For Clarifying.

    If Possible Please Solve QR Scanning Issue.

    Thanks Again.
     


  18. teja varma

    teja varma Active Member


    Suggestion:
    logout from Whatsappweb in your Whats-app Mobile application after sending invoice
    you can do this by open whats-app in your mobile -> click on three dots at top ->click Whatsappweb->click logout from all devices
    it is not mandatory as after the window closes the chrome session will be closed so it is not available next time
    but it is a good practice to do
     
    Jay kumar tailor likes this.


  19. teja varma

    teja varma Active Member


    folder names should not contain spaces
    Program Fils , Whatsapp tdl - > incorrect so it unable to find the proper location
    try changing to other folders
     


  20. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    For 3B With Ledger Name Selection (select Contect Ledger)


    Code:
    [#Form: Gstr3BTrgl]
    Add : Button : jkTWpdf1
    
    [Button: JKTWpdf1]
    Title: "Whatsapp PDF"
    Key : Alt+W
    Action List :Bcontpdf,bfuncpdf
    
    
    [Button: Bcontpdf]
    Key: Alt+W
    Action: Alter: WRpt3Bpdf
    
    [Button: bfuncpdf ]
    Key: Alt+W
    Action: Call : wjkpdfb
    
    [Report: WRpt3Bpdf]
    Title : "Select Contect For Whatsapp"
    Form : WRpt3Bpdf
    Auto : Yes
    
    [Form: WRpt3Bpdf]
    Part : WRpt3Bpdf
    Width: 35% Screen
    Height: 8% Screen
    
    [Part:WRpt3Bpdf]
    Line: WRpt3Bpdf
    
    [Line: WRpt3Bpdf]
    
    Field : Long Prompt ,WRpt3Bpdf
    Local : Field: Long Prompt : Set As: "Ledger Name"
    
    [Field : WRpt3Bpdf]
    Use : Short Name Field
    Modifies : WRpt3Bpdf
    Border : Thin Box
    Width : 15
    Table:Ledger Vouchers
    Show Table:Always
    
    [System : Variable]
    WRpt3Bpdf : " "
    
    
    [Variable : WRpt3Bpdf]
    Type : String
    Persistent : Yes
    
    [Function: wjkpdfb]
    
    
    Variable: PrintFileName    :String
        Variable: defaultfilepath  :String:$$String:"D:\Tally Exported Vouchers\3B\"+$$String:($$Machinedate)  + "_Gstr 3B_" +#DspmaindateTitle+$$String:".pdf"
        Variable: ReceiverContact  :String
        Variable: Exportedfilepath :String
        01 :Query Box:"Do you want to Whatsapp 3B (PDF)?":Yes:No
        02 :If:$$LastResult
        03    : SET : PrintFileName : $$String:"D:\Tally Exported Vouchers\3B\"+$$String:($$Machinedate)  + "_Gstr 3B_" +#DspmaindateTitle ; Export Location path
        04      : SET : ReceiverContact :$LedgerMobile:Ledger:#WRpt3Bpdf
        20    : SET : SVExportFormat     : $$SysName:PDF
        40    : SET : SVPrintFileName    : $$MakeExportName:##PrintFileName:##SVExportFormat
        50    : SET : SVOpenFileAfterExport : No
        60    : EXPORT REPORT :.: TRUE
        65  : SET :Exportedfilepath:$$GetFileFullPath:##defaultfilepath
        70  : Exec COM Interface:WhatsappEngine:##ReceiverContact:##Exportedfilepath:@@Msgtitle:@@waitseconds
        80  : Log:$$LastResult
        100 : End If
        101 : Return
     


  21. teja varma

    teja varma Active Member


    Qr code issue and is it possible to keep logged In?

    No, there are some challenges
    it designed to make one transaction only
    originally it was designed to send bulk message, promotional messages etc
    that means it should receive all the data at once (contacts , attachments) then loop through data until it finish sending to all contacts and quit
    so it should not wait for next call instead it start from new
    and we cannot know when we are going to make next voucher or transaction to make it alive
    also when ever we make a call to dll it will start a new request, there is no connection with previous call

    actually iam trying to make an external application which will send messages , attachments to all ledger contacts at once
    which will be useful send ledger statements ,GST reports, outstanding messages, promotional and other wishes at single click
    but it is still on paper I will let you once it is completed
     


  22. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Then Contect @drive For Discussion
    (Exe File Method)
     
    Last edited: Dec 23, 2019


  23. teja varma

    teja varma Active Member


    Yes
    Hello Mr @drive please share your thoughts and ideas about how we can approach towards the design and architecture of the application
    your suggestions are welcomed!
     
    Last edited: Dec 23, 2019



  24. Getting Error Error.jpg

    [​IMG]
     


  25. teja varma

    teja varma Active Member


    show the tdl code you are using..
     


Share This Page