Pass a value to Runbook by sending email to Service Manager

Is it possible to send an email to Service Manager with a value in either the subject or message body, trigger a service offering, and then pass that value to a Orchestrator Runbook?
Currently, I can send an email that is answered by the Exchange Connector, it kicks off my Orchestrator Runbook, but I need to pass it a value.  How is this possible by sending an email?
Thanks
Paul S

How do I setup the Service Offering to pass the Work Item Title and or description?
Do I put it in the above mapping?
When I select the above, it won't launch my run book, if I leave it blank, the run book launches, but fails as it's looking for an account ID...  In my subject line of the email I would send the <USERID> for example (without the brackets)
Paul S

Similar Messages

  • An advanced solution for sending email from Solution Manager (or CRM)

    Hi all,
    did anyone use blog "An advanced solution for sending email from Solution Manager (or CRM)"
    <a href="/people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm:///people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm
    I´ve got some problems:
    I tried to implement your solution in our SAP system. I´m new to ABAP and so it´s a little bit try and error for me.
    I´ve got some errors:
    In method EXEC_SMART_FORM_WITH_TEXT (from note 935670) :
    - method string_to_soli does not exist. There is a method xstring_to_solix.
    When I change to method xstring_to_solix
    - "L_STRING" is not type-compatibly to "IP_XSTRING".
    In method ZSM_ATTACH_PHIO_DOCU:
    - field DOCUMENT is unknown
    Regadrs
    Andy

    Hi all,
    did anyone use blog "An advanced solution for sending email from Solution Manager (or CRM)"
    <a href="/people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm:///people/emmanuele.prudenzano/blog/2006/08/03/an-advanced-solution-for-sending-email-from-solution-manager-or-crm
    I´ve got some problems:
    I tried to implement your solution in our SAP system. I´m new to ABAP and so it´s a little bit try and error for me.
    I´ve got some errors:
    In method EXEC_SMART_FORM_WITH_TEXT (from note 935670) :
    - method string_to_soli does not exist. There is a method xstring_to_solix.
    When I change to method xstring_to_solix
    - "L_STRING" is not type-compatibly to "IP_XSTRING".
    In method ZSM_ATTACH_PHIO_DOCU:
    - field DOCUMENT is unknown
    Regadrs
    Andy

  • Send Email to Service Group

    Hello All,
    We have a requirement of sending an email to the service group when a service request is created.
    We are using actions and if the service group has an individual employee then we are getting the action triggered and email being sent.
    But we want to send the email to all employees in the org unit, so basically the agent selects the responsible service org unit and the email should go to all employees in the group.
    Has anybody done this configuration using Actions ? Or do we need to implement a work flow for the same.
    Any suggestions are much appreciated.
    Regards,
    Shab S

    Hi Shab,
    we have to do a small workflow change and enhancement to trigger the mail to the service group.
    Transaction Type: XXX (Service Request)
    Status Profile: Status profile in service request
    Mail should be sent to Service Employee Group (Service Team): Partner Function:
    Partner Determination Procedure:
    Status to be considered: Open & In process
    Workflow should trigger when conditions are meet:
    Service Employee Group
      Go to CRMD_ORDERADM_H table, give OBJECT ID (Transaction number) of Service Request having PROCESS_TYPE in the OBJECT_ID field, then execute you will get the corresponding GUID for this transaction.
    Take the GUID of the Service Request transaction and access table CRMV_LINKPARTNER and in GUID_HI pass the GUID and execute Query.
    Then in field PARTNER_FCT check for value , take corresponding value of PARTNER_NO , Which is Account number.
    Take the value of PARTNER_NO and access table BUT000 and pass the value in PARTNER_GUID and execute query.
    Take value from CRUSR which is Service Employee Group and pass value in PARTNER_NO of table BUT000 and take value from NAME ORG1 & NAME ORG2
    Employees of Service Employee Group
    Table: HRP1001
    Query 1:
    Input:
    OTYPE –O,PLVAR  -01, RSIGN – B, RELAT – 207 and Today’s date should be between BEGDA and ENDDA, SCLASS – BP , SOBID – Service Employee Group ID ( Refer : 1. Service Employee Group )
    Output: OBJID.
    Query 2:
    OTYPE – O, OBJID – OBJID (from query 1 output) PLVAR – 01, RESIGN: B, SCLAS – S , RELAT – 003
    Output: SOBID
    Loop:
    Input: OTYPE –S, OBJID – OBJID (from query 2 output), PLVAR -01, RSIGN – A, RELAT – 008 SCLAS – CP .
    Output: SOBID.
    Query:
    OBJID – OBJID (From pervious success query), PLVAR – 01, RSIGN – B, RELAT- 207, and Todays date should be between BEGDA and ENDDA, SCLAS –BP
    Output: SOBID
    Email id’s of all employees from Table
    Get ADDRNUMBER from table BUT000 & BUT20 by passing Employee Id , then pass ADRCCOM or ADDRNUMBER in ADR6 table and get Email id from field SMTP_ADDR .
      Service Request has status "Open" & Service Team is changed
      Workflow will Trigger.
      Service Request has status "In process" & Service Team is changed
      Workflow will Trigger.
    Regards,
    karthik J

  • Send email used output management in TM

    Dear expert,
            we has a requirement to send a email in the tm , as we know tm provide this function in the output mangement,
    but i don't know how to do this, can anyone tell how to send email used output mangement in the tm, thank you.
    Message was edited by: Michael Appleby

    Hi mansoor,
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="EMAIL">
         <EmailAccount>
              <Name>Default</Name>
              <GeneralSettings>
                   <FromName>BPEL POC</FromName>
                   <FromAddress></FromAddress>
              </GeneralSettings>
              <OutgoingServerSettings>
                   <SMTPHost>mail.oracle.com</SMTPHost>
                   <SMTPPort>25</SMTPPort>
              </OutgoingServerSettings>
              <IncomingServerSettings>
                   <Server>mail.oracle.com</Server>
                   <Port>993</Port>
                   <Protocol>IMAP</Protocol>
                   <UserName>xxxxxx</UserName>
                   <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService"></Password>
                   <UseSSL>false</UseSSL>
                   <Folder>Inbox</Folder>
                   <PollingFrequency>1</PollingFrequency>
                   <PostReadOperation>
                   <MarkAsRead/>
                   </PostReadOperation>
              </IncomingServerSettings>
         </EmailAccount>

  • Send Email using service broker

    Hi,
    i have a service broker application that i send message to the queue and a specific SP reads the message and process it, part of this processing is sending the information found on that message to a specific email accounts. this means i have two service broker applicatins, one for my business (sending messages to queue to be processed and the secound one is the SendEmail service)
    when i send email using the SP "msdb.dbo.sp_send_dbmail" the email is recieved 100% true, but when i come to send the email through the SP which recieve the messages from the SB queue, the email is not sent and i dont know where it goes.
    this means that i cant read from a queue and send to another one at the same time... can you help me in this!
    -Rana

    Activated procedures execute under an EXECUTE AS context that prevents calls into anoter database (like msdb). See
    http://rusanu.com/2006/03/07/call-a-procedure-in-another-database-from-an-activated-procedure/ for details.
    This Solved my issue. 
    My Error
    The activated proc '[dbo].[usp_SB_Rcv_ApplicationError]' running on queue 'ServerDeadLockNotification.dbo.ApplicationError_Rcv_Q' output the following:  'The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.'
    Code Causing the Error:
    CREATE PROCEDURE dbo.usp_SB_Rcv_ApplicationErrorr
    AS
    BEGIN
    SET NOCOUNT ON;
    DECLARE @Handle UNIQUEIDENTIFIER;
    DECLARE @MessageType SYSNAME;
    DECLARE @Message XML
    DECLARE @BodyTable NVARCHAR(MAX);
    RECEIVE TOP (1) @Handle = conversation_handle,
    @MessageType = message_type_name,
    @Message = message_body
    FROM [ApplicationError_Rcv_Q];
    IF(@Handle IS NOT NULL AND @Message IS NOT NULL)
    BEGIN
    -- parse the message xml to get the error details
    -- build the HTML table for send_dbmail
    SET @BodyTable = (SELECT dbo.GetErrorEmailBody(@Message));
    -- send the mail on the default profile
    EXEC msdb.dbo.sp_send_dbmail
    @recipients='[email protected]',
    @subject = 'Errors',
    @body = @BodyTable,
    @body_format = 'HTML' ;
    END CONVERSATION @Handle;
    END
    END
    The Fix:
    ALTER DATABASE [ServerDeadLockNotification]
    SET TRUSTWORTHY
    ON

  • We had a contaminated email and now we cannot send emails . our service provider thinks problem in 'mail' settings but did not want to get into that area. Can you advise how we look into this

    we had a contaminated email and now we cannot send emails.  Our service provider advises that 'Mail' settings may be compromised.  but were not willing to get into resetting.   How can this be fixed ?

    jenfromwa wrote:
    we had a contaminated email and now we cannot send emails.
    Not exactly sure what you mean by contaminated, but there is currently no known e-mail that could impact the Apple Mail application as you have described.
    Without knowing who your e-mail provider is and what type of account (IMAP or POP3) we can't advise you as to what those settings might be.
    One way to fix it would be to delete the account from Apple Mail Preferences->Accounts and add it back.

  • Runbook for decommission vm from service manager end portal

    Hi,
    I have created runbook for provision vm in VMware and it is working fine from service manager self service portal...
    Now my next requirement is end user should be able delete the vm which he provisioned from the portal....
    So, I have created one simple work flow for delete VM and only vm name is the input parameter...
    Now when create the request offering user should get the list of vms which he provisioned...How can I get the list of vms in request offering?
    Thanks in advance for your help...
    Regards,
    Sudheesh M A

    Hi,
    This blog post show you query based list
    http://blogs.technet.com/b/servicemanager/archive/2011/11/08/request-offering-wizard-overview.aspx and this
    http://www.buchatech.com/2013/11/service-manager-request-offering-multiselect-user-prompt/
    First you need to make sure you have the machines in Service Manager CMDB. If it is domain joined servers they should be in the CMDB, from the Active Directory connector. Then you need to have a way to filter out which machines to show for a user. When a
    end user browse to the SCSM portal you can access the username from the service offering by a varaible named Token Portal User Name. The Token: Portal User Name is in format CONTOSO\leni (DOMAIN\username)
    You can use it to filter which servers to show, if you add DOMAIN\username on a attribut on each server. For example if you add the owner of the VM to each server, in format DOMAIN\username you can then configure the query based list to show list all servers
    were the notes field or owners field is equal to Token Portal User Name.
    Once you have all servers in the CMDB and servers has owner in correct format you can start thinking about new runbooks.
    Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se

  • Problem while passing parameter to shell script which sends email-Ora Apps

    Hi,
    I have a pl/sql package which will call a shell script program.The shell script program is written in order to send the invoice hold details of AP as a mail.The parameters to this program are passed in the pl/sql package.
    The shell script program has
    5 parameters namely
    to - email
    from - email
    hold id - which is a number
    hold name - varchar2( free text)
    hold reason - varchar2( free text)
    the shell script looks as below.
    FROM_EMAIL=`echo $1|cut -f9 -d " "|sed 's/\"//g'`
    echo "From email id is $FROM_EMAIL" -- From email
    TO_EMAIL=`echo $1|cut -f10 -d " "|sed 's/\"//g'`
    echo "To Email id is $TO_EMAIL" -- to email
    PARAM0=`echo $1 | awk '{print $11}'|sed -e "s/\"//g"`
    echo "Param0: $PARAM0" -- hold id
    PARAM1=`echo "$1" | cut -d" " -f12-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
    echo "Param1: $PARAM1" -- hold name
    PARAM2=`echo "$1" | cut -d" " -f13-| sed -e "s/\" \"/\"^\"/g" | awk -F'^' '{print $1}'|sed -e "s/\"//g"`
    echo "Param2: $PARAM2" -- hold reason
    the values that am passinf to this program are if suppose
    from email ---- [email protected]
    to email [email protected]
    12345 ------ hold id
    test hold name ------ hold name
    test hold reason ------- hold reason
    The output for the above parameters is as follows
    from email ---- [email protected]
    to email [email protected]
    12345 ------ hold id
    test hold name ------ hold name
    hold name --------hold reason (a part of hold name parameter is displayed as hold reason.The reason being in param2 we used cut which is cutting from 13.
    the problem here is since param1 being free text we cannot predict at what position the parameter ends.i mean there might be a single word or more than 2 words in that parameter seperated by space. the question here is ... is there anyway that we can specify dynamically from which location the param2 should fetch the value.
    can we use some delimiter to identify the end of param1 and start of param2.If so... how can it be written in this scenario.
    Thanks in Advance.

    As I see, all parameters are merged into 1 at shell script.
    Please do as follow:
    1- Modify your shell script as followed:
    echo "From email id is $1" -- From email
    echo "To Email id is $2" -- to email
    echo "Param0: $3" -- hold id
    echo "Param1: $4" -- hold name
    echo "Param2: $5" -- hold reason
    2- rename your shell script file with .prog extension : CUSTOM_NAME.prog
    3- perform the following command at custom file location:
    ln -s $FND_TOP/bin/fndcpesr CUSTOM_NAME
    This approach will seperate your parameters and then it will be more easier to manipulate them.
    Regards

  • BPMOn: Is it possible to send email notification to different groups based on filter value for IDOC?

    Hi there,
                  I have setup the monitoring for idoc through interface monitoring and I am getting the alerts for the same. The alert is generated for different status values for the same idoc. Now my question is, is it possible to send email notification to two different groups based on the status values?? I mean for example , for a single idoc for some status values I want to send email notification to group1 only and for other status values I want to send notification to group2.Any help will be apperitiated.
    Thanks and regards,
    Rutvik Upadhyay

    We currently do not support that level of control for sending email notifications. If you think others are interested in this you should add an idea here: http://forums.adobe.com/community/formscentral?view=idea
    We use that to help us prioritize our work.
    Thanks,
    Randy

  • I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query parameter to report parameter i need to pass distinct values. How can i resolve this

    I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
    parameter to report parameter i need to pass distinct values. How can i resolve this

    Hi nancharaiah,
    If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
    None
    Specify values
    Get values from a query
    If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
    sample is for your reference:
    Select distinct field_name  from table_name
    If you have any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How do I email customer service? I spent an hour on the phone with a customer service rep and my issue was not remedied.

    Need to email customer service management or supervisor to get an issue resolved. I don't see any email options only chat and call and I don't have time to do another hour phone call today.

    There is no email for customer support.  Your options are phone, chat, or social media.  Or perhaps going in to a corporate store in person?  Since you haven't given a clue as to what your unresolved issue is, it's hard to know what the best approach would be.

  • Multi line values in mail forms to send emails

    Hi All,
    Ours is CRM 2007 application, as part of new capability adding to the system, we need to send email to customer with few details once service tickets saved in the system. we decided to use mail forms to create the template and send email to the customer with details. as part of this we need to send multi line values as well in the mail form - email as shown below. example field here is for working hours of the customer office.
    Saturday - Sunday 10am - 4pm
    Saturday - Sunday 10am - 4pm
    (excluding public holidays)
    Can some body tell me how to send the multiline values using mail forms - emails to customers. right now we receive the last line. I dont see any help in mail form documetation as well on this.
    I appreciate any help in this if you already have some solution.
    Regards,
    Srinivas

    Hi,
    Are you using below any FM to send mail ?
    1. CRM_IM_EMAIL_CREATE_SEND_40 2. CRM_IM_EMAIL_CREATE_SEND_51
    if so, then inside this FM there will be call to BADI CRM_IM_ADD_DATA_BADI . This badi will get the data for custom/additional attribute values. Basically it will get one value ( last value ).
    What u might need to do is after this badi call u need to loop ur values and set it . For doing that u might need to make this FM tocustomer name space or look for implicit enhancements.
    We have done similarly for sending mail duringcampaign execution. That was done in different place.
    hope it might help you to analyse more.
    Regards
    Sandeep

  • Send email when a value in the table reached a certain number

    Hello,
    I have a value in a table that when this value is equal or greater than a certain value, I want to send an email to alert. How do I accomplish this? Do I create a trigger? Do I write an o/s korn script and schedule to run continuosly and check for the value to send an email? Thanks.

    Hi, i think that the best form is create a trigger on the table, when insert o update the data send the email when the value accomplish the condition.
    Look the next code, it is a package that send emails,
    CREATE OR REPLACE
    PACKAGE oracle_administrator.dbms_mail_server
    IS
    P_SERVERNAME VARCHAR(50);
    P_RCPT VARCHAR(50);
    P_FROM VARCHAR(50);
    P_TO VARCHAR(50);
    P_SUBJECT VARCHAR(50);
    P_BODY CLOB;
    P_MAIL UTL_SMTP.CONNECTION;
    PROCEDURE INIT_SERVER;
    PROCEDURE SEND_EMAIL;
    PROCEDURE WRITE_DATA(PARAM_DATA IN CLOB);
    END;
    CREATE OR REPLACE
    PACKAGE BODY oracle_administrator.dbms_mail_server
    IS
    PROCEDURE SEND_EMAIL
    AS
    BEGIN
    UTL_SMTP.CLOSE_DATA(P_MAIL);
    UTL_SMTP.QUIT(P_MAIL);
    END;
    PROCEDURE INIT_SERVER
    AS
    BEGIN
    P_MAIL :=UTL_SMTP.OPEN_CONNECTION(P_SERVERNAME);
    UTL_SMTP.HELO(P_MAIL,'hostname');
    UTL_SMTP.MAIL(P_MAIL,'dbaoracle');
    UTL_SMTP.RCPT(P_MAIL,P_RCPT);
    UTL_SMTP.OPEN_DATA(P_MAIL);
    UTL_SMTP.WRITE_DATA(P_MAIL,
    'FROM: ' ||P_FROM || UTL_TCP.CRLF||
    'TO: ' || P_TO || UTL_TCP.CRLF ||
    'SUBJECT: ' ||P_SUBJECT || UTL_TCP.CRLF ||
    'MIME-VERSION: 1.0' ||CHR(13)|| CHR(10)||'CONTENT-TYPE: TEXT/HTML' || CHR(13)||CHR(10));
    END;
    PROCEDURE WRITE_DATA(PARAM_DATA IN CLOB)
    AS
    BEGIN
    UTL_SMTP.WRITE_DATA(P_MAIL,PARAM_DATA);
    END;
    END;
    Luck
    Have a goof day.
    Regards

  • How to send email to the peoplepicker value in Infopath?

    Hi All,
    I want send email to the People-picker value, which is in repeating table. If repeating table has four rows, then email should send to four people-picker values. How to achieve this through designer workflow?
    Thanks in advance!

    You will need to leverage the User Profile Service in order to obtain the email address of each user.  To do that in SPD, start here:  http://crayveon.com/add-infopath-data-connection-consume-userprofileservice-asmx-web-service-complete/
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • Send Email and automatically save new value into database

    Hi,
    I think this is a very unique problem, hope that anyone could help me. I tried to send email notification using pl/sql block (check_delay) as below. Please focus to this section first, from the pl/sql:
    Problem 1
    --> if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    Here, sql checks whether overdue amount is being paid in progress from payment_overdue table..then creates variables for ratio(payment_ratio) and progress payment amount(payment_progress). After that if payment_ratio < 0.1 it must sends email notification to customer_id and customer_representative_id. However, it does NOT send notification to
    customer_id! How do I amend the code so that customer_id will get the notification too?
    Problem 2
    In problem 2, please focus to :
    -->if emp_rec.OVERDUE_AMOUNT_PAID is null then
    If customer does not pay any amount, sql will first checks whether delay between scheduled payment date and current system is more than 3 days..
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
    After that, sql will counts how many times customer delays. If first time, the notification will count notification as number 1..and update remark column with the message and count value as below..
    select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
    Finally, notification to be sent to customer with the message format as below..
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notice no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    Unfortunately, no email notification being sent to customer with this message format.. Please help me to make customer to receive the notification with this format.
    Kindly, thank you so much for you guys to help me solve these two problems, Problem 1 and Problem 2....
    Thank you.
    CREATE OR REPLACE PROCEDURE TEST.check_delay AS
    NO binary_float;
    CURSOR emp_cur is
    select * from PAYMENT_OVERDUE where FLAG=3 and STATUS='OUTSTANDING';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    invoice_no varchar2(100);
    subj varchar2(4000);
    payment_progress binary_float;
    payment_ratio binary_float;
    count number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@test.com';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.OVERDUE_AMOUNT_PAID is null then
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
         select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
         email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notive no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    if payment_ratio < 0.1 then
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    email_to:=emp_rec.customer_representative_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if (payment_ratio < 0.5 && payment_ratio > 0.1) then
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
         email_to:=emp_rec.customer_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    /

    Hi BownieCross;
    If you are using a local database file in your project the following may be the cause.
    From Microsoft Documentation:
    Issue:
    "Every time I test my application and modify data, my changes are gone the next time I run my application."
    Explanation:
    The value of the Copy
    to Output Directory property is Copy
    if newer or Copy
    always. The database in your output folder (the database that’s being modified when you test your application) is overwritten every
    time that you build your project. For more information, see How
    to: Manage Local Data Files in Your Project.
    Fernando (MCSD)
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
    and unknown namespaces.

Maybe you are looking for