Dynamically pass email id in Data alert

Hi All,

I am trying to create a stock out data alert to our stores and the alert should be sent to individual store mangers. when ever an item goes out of stock an alert should get triggered and should send a report of the item that are OOS. It should dynamically pick the store manager email _id from table and send out alerts which items specific to that store. Anyone able to parameterize data alerts to accomplish this?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • This will be an enhancement request so please log a ticket . For now I think it should be possible to write a a python script which can query incorta and then send these alert emails .

  • Sandeep,

    Here is a site that gives some direction on emailing alerts within python for the interim.  Will also iterate Amit's comment about submitting a ticket for an enhancement request.  Let me know us know if you have further questions.

  • Hi Amit Kothari Jacob Dockendorf

    Thank you i will submit an enhancement request for this. Also, will look at python script option.

    • sandeep vittalam  This is a sample code on how to query incorta via external python script using the psycopg2 module (postgres) so you can install that and try.

      import psycopg2
      import smtplib
      def get_data():
          """ query data from the  table """
          conn = None
              conn = psycopg2.connect(host="<host>",port="5436",database="<tenant>",user="admin",password="<passowrd>")
              cur = conn.cursor()
              cur.execute("SELECT vendor_id, vendor_name FROM EBS_PARTY_COMMON.AP_SUPPLIERS ORDER BY vendor_name")
              print("The number of rows: ", cur.rowcount)
              row = cur.fetchone()
              while row is not None:
                  row = cur.fetchone()
          except (Exception, psycopg2.DatabaseError) as error:
              if conn is not None:
Like Follow
  • 9 mths agoLast active
  • 4Replies
  • 42Views
  • 3 Following

Product Announcement

A new community experience is coming! If you would like to have beta access to provide feedback, please contact us at community@incorta.com.