File size: 816 Bytes
b5ce9e8
2abc114
b5ce9e8
 
 
0bd0d08
2abc114
b5ce9e8
0bd0d08
b5ce9e8
 
2abc114
b5ce9e8
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
from salesforce_integration import get_quote_data  # Import Salesforce integration
from generate_pdf import create_pdf  # Import PDF generation function
from send_email import send_email  # Import email sending function
from send_whatsapp import send_whatsapp  # Import WhatsApp sending function

# Title of the app
st.title('Generate and Send Quote Invoice')

if st.button('Generate PDF and Send'):
    # Fetch the quote data from Salesforce
    quote_data = get_quote_data()
    
    # Generate the PDF
    pdf_file = create_pdf(quote_data)
    
    # Send email with PDF
    send_email(pdf_file, "customer_email@example.com")
    
    # Send WhatsApp message with PDF
    send_whatsapp(pdf_file, "whatsapp:+1234567890")
    
    st.success("PDF generated and sent via email and WhatsApp.")