function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Irene SlessIrene Sless 

Notification of Errors in API integration upload

We have an integration running hourly from our accounting system to upload data into Salesforce. What I would like to know is, other than manually checking log files, is there an automated way to receive notification if an error occurred, and what the error is?

Currently the only way we can tell is if a user picks up that data which should be in SF isn't there, because they have a document from the accounting system (ie a reference to a quote), and this quote is not in SF (but should be).

Debug logs in SF stop after 20 runs, then one has to refresh, and this can't be reset automatically either, which would be a great thing if it did, as with hourly runs the sync uses up the 20 limit more than once a day!

It would be great if an email could be sent to the Administrator if there were any errors in the sync process. Is this possible to do?
buyan thyagarajanbuyan thyagarajan
Hi Irene,
 This is a classical integration design problem in your integration solution. I am not sure how your integration solution is setup and how it works. But your integration solution should check once a record is pushed to salesforce and if there is an api error or issue, it should create an error in a log file or database and send an email with the error to the admin for notification. It should also send a summary email on how many records were pushed to salesforce , how many failed with error message. Now this can be done in your integration solution as well.
1. Are you using data loader, jitterbit or informatica to push data from acocunting system to salesforce or is this some custom code some body created which runs on your server to push to salesforce?
2. Can you also tell me what is the accounting system you use?
Thanks
Buyan
Irene SlessIrene Sless
Hi Buyan
That is what was hoping to hear :). The integration was outsourced to another company (FuseIT), so we don't control it, but are requesting this from them.
1. No, it's a .NET based app - see http://www.fuseit.com/en/Solutions/SFAccredo.aspx
2. Accredo (http://www.accredo.co.nz/products - we use Saturn)

Thanks!
Irene SlessIrene Sless
Hi Buyan
That is what was hoping to hear :). The integration was outsourced to another company (FuseIT), so we don't control it, but are requesting this from them.
1. No, it's a .NET based app - see http://www.fuseit.com/en/Solutions/SFAccredo.aspx
2. Accredo (http://www.accredo.co.nz/products - we use Saturn)

Thanks!
buyan thyagarajanbuyan thyagarajan
HI Irene,
Thanks for your reply. You should follow up with FuseIt to have them send you a summary email every day on the status of the uploads and failures. Just curious. Are you the salesforce admin for your org and how many users do you have in your org? If my answer solves your question, can you please click like and mark it as solved as well..
Thanks
Buyan
Irene SlessIrene Sless
The log file is handled by Apache log4net, and this is our .xml file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    <section name="salesforceSync" type="System.Configuration.NameValueSectionHandler" />
    <section name="accredo" type="System.Configuration.NameValueSectionHandler" />
    <section name="G4S" type="System.Configuration.NameValueSectionHandler" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <accredo>
    <!-- Accredo DB and login -->
    <add key="AccredoDB" value="xxxxx" />
    <add key="AccredoUser" value="xxxx" />
    <add key="AccredoPassword" value="xxxx" />
    <add key="AccredoProcessUser" value="xxxxx" />
    <add key="StandardPriceBookId" value="xxxxxx" />
  </accredo>
  <salesforceSync>
    <!--These keys store the last time that the Sync was run for an object-->
    <!--Format: 30/09/2014 3:17:22 p.m. -->
    <add key="SyncTimeCustomer" value="8/05/2015 1:40:28 p.m." />
    <add key="SyncTimeContact" value="8/05/2015 1:40:31 p.m." />
    <add key="SyncTimeProduct" value="8/05/2015 1:40:37 p.m." />
    <add key="SyncTimePriceList" value="5/04/2015 8:53:05 a.m." />
    <add key="SyncTimeQuote" value="8/05/2015 1:49:30 p.m." />
    <add key="SyncTimeQuoteLine" value="8/05/2015 1:45:04 p.m." />
    <add key="SyncTimeInvoice" value="8/05/2015 1:48:00 p.m." />
    <add key="SyncTimeInvoiceLine" value="8/05/2015 1:48:04 p.m." />
    <add key="SyncTimeOrderEntry" value="8/05/2015 1:45:25 p.m." />
    <add key="SyncTimeOrderEntryLine" value="8/05/2015 1:47:55 p.m." />
    <!--
      Format = "frequency hours~start hour~finish hour"
      e.g. 2~7~19 = every 2 hours between 7am and 7pm
      24 = every 24 hours, so no finish hour is required  
      polling of Sync frequencies will occur every hour
    -->
    <add key="SyncFrequencyCustomer" value="1~7~19" />
    <add key="SyncFrequencyContact" value="1~7~19" />
    <add key="SyncFrequencyProduct" value="1~7~19" />
    <add key="SyncFrequencyPriceList" value="24~8" />
    <add key="SyncFrequencyQuote" value="1~7~19" />
    <add key="SyncFrequencyOrderEntry" value="1~7~19" />
    <add key="SyncFrequencyInvoice" value="1~7~19" />
  </salesforceSync>
  <G4S>
    <add key="LicenseFileLocation" value="D:\AccredoSalesforce\G4S\G4SLicense.lic" />
  </G4S>
  <connectionStrings>
    <add name="G4S" connectionString="G4S:user id=xxxxx;password=xxxxxxxxxxx" />
  </connectionStrings>
  <log4net>
    <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
      <file value="logs/log." />
      <PreserveLogFileNameExtension value="true" />
      <appendToFile value="true" />
      <rollingStyle value="Composite" />
      <maxSizeRollBackups value="100" />
      <maximumFileSize value="10000KB" />
      <staticLogFileName value="false" />
      <datePattern value="yyyyMMddhhmmss'.log'" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d %-2p  %c - %m%n" />
      </layout>
      <!--<filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="FuseIT.G4S.SalesforceConnector" />
        <AcceptOnMatch value="false" />
      </filter>-->
    </appender>
    <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d - %m%n" />
      </layout>
    </appender>
    <root>
      <!-- Use ALL, DEBUG, INFO, WARN, ERROR, FATAL or OFF -->
      <priority value="DEBUG" />
      <appender-ref ref="TraceAppender" />
      <appender-ref ref="FileAppender" />
      <appender-ref ref="RollingFile" />
    </root>
  </log4net>
</configuration>
buyan thyagarajanbuyan thyagarajan
Hi Irene,
 If this service is running in your server and you guys have access to the folder, you should see  
yyyyMMddhhmmss'.log like 200150514xxx.log file. This should have errors in it and this might help you guys to be notified in advance on errors.
Thanks
Buyan
 
Irene SlessIrene Sless
I have access to the log files, but they aren't the easiest to read. There are several per sync and they are named log20150508014200.txt - not like you had it. Does this mean there is a log file missing or did you mean these? What I want to avoid though is having to check a log file every hour to see if there were errors. We really need an email to alert us if there were errors, then we can go and check the log. Is that possible?
buyan thyagarajanbuyan thyagarajan
Hi Irene,
We can create custom code which can check the log files and send an email alert. This would be on the assumption that fuseit logs the error in the file and i understand the log file is cumbersome. Where are you based and is there a good time to talk to you tomorrow? I am in Delaware USA and available between 9 to 12 EST?
Thanks
Buyan