Hi-
Every day I find new things to love about salesforce_api. Really great work.

Dovetailing this thread #1138786: How do I preserve object relationships when using sf_notifications?, since sf_notifications hits a Drupal menu item, is there not a way to receive the SFDC Outbound Message *and* import in real-time? The only config I see in 6.x-2.x-dev is:
sf_notifications settings - cron and fieldmap
You can see I've got outbound messaging triggering only the "Amendment Status" fieldmap, but I still have to wait for cron before any fireworks can happen. Am I missing something?

Thanks
-Bronius

Comments

kostajh’s picture

Status: Active » Fixed

Sorry for the confusion:

- SF Import is for periodic, cron-based polling of Salesforce for updated records.
- SF Notifications does not rely on cron, and is real time (more or less).

So, you probably only want to use one of the two modules.

texas-bronius’s picture

StatusFileSize
new36.41 KB

Ah. The screenshot I sent was from sf_import config, good catch. However, I've got the same field mapping set for Notifications. To test what I think you are suggesting I turned off the field mapping shown in my screenshot above and kept the one under Notifications:
- Made a change remotely in SFDC which triggered an Outbound Message
- Watchdog reported my endpoint was hit
- The expected change was not made to the node content on the mapped fields.

With sf_import field mapping unchecked, even cron doesn't do the thing. My sf_notifications "conditions" block is just return TRUE; :
conditions field for sf notifications

Do I need to _disable_ sf_import? I just tried that .. same no result. Maybe it's never worked for me? :(

New outbound message received from Salesforce. Contents:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
   <OrganizationId>00DZ0000000***</OrganizationId>
   <ActionId>04kZ00000004CN***</ActionId>
   <SessionId>00DZ00000***!ARgAQEdiXA****GTivrklPjJXYER9***UH1pyk6.jy7X***PkqOyzC73IYsYPjQx***</SessionId>
   <EnterpriseUrl>https://cs11-api.salesforce.com/services/Soap/c/24.0/00DZ000000***</EnterpriseUrl>
   <PartnerUrl>https://cs11-api.salesforce.com/services/Soap/u/24.0/00DZ0000***</PartnerUrl>
   <Notification>
    <Id>04lZ0000000Ot***</Id>
    <sObject xsi:type="sf:Amendment__c" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
     <sf:Id>a04Z0000001***</sf:Id>
     <sf:Approval_Status__c>Needs Revision</sf:Approval_Status__c>
     <sf:Message__c>This should be changed. Change it!</sf:Message__c>
    </sObject>
   </Notification>
  </notifications>
 </soapenv:Body>
</soapenv:Envelope>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nicodv’s picture

Hi, sf is not importing automatically new records at cron run, how should i configure it so it does that?

thanks