elasticio / salesforce-component

elastic.io component that connects to Salesforce API (node.js)
Apache License 2.0
3 stars 7 forks source link

Error message is shown in Action: Query after retrieve sample try when object is not found #40

Closed stas-fomenko closed 5 years ago

stas-fomenko commented 5 years ago

Description: Error message Error! Sorry! The component did not provide any sample data. is shown in Action: Query after retrieve sample try when object is not found

Preconditions: Use PS Salesforce creds

STR:

  1. Create flow Timer -> SF
  2. Choose Action: Query in SF.
  3. Input query that will not find any object (for example: "SELECT ID, Name from Contact where Name like 'tttt%'" )
  4. Click on "Retrieve Sample" button
  5. See error message.

AR: Error message Error! Sorry! The component did not provide any sample data. is shown in Action: Query after retrieve sample try when object is not found

ER: When Lookup failed (we were not able to find any parent object), In this case Lookup action should emit a single message with empty body.

jhorbulyk commented 5 years ago

When Lookup failed (we were not able to find any parent object), In this case Lookup action should emit a single message with empty body.

I'm not sure if I agree with this approach. Based on the Component Behavoir Standards, there are cases when components would work correctly and not emit any data. I think that in this case, the salesforce component is working correctly but we should perhaps write up a platform issue so that our UI messaging is clearer and responds faster.

stas-fomenko commented 5 years ago

@jhorbulyk yea, I pasted it from here, but actually missed date of comment: 20 Nov 2017, what was much before our components meetings. @zubairov what do you think? ☝️ what do we want component to do if query did not find any object?

jhorbulyk commented 5 years ago

Related to component standards, the Lookup Objects (plural) action describes the concept of fetchAll mode vs emitIndividually mode. (It also describes fetchPage that likely isn't applicable to this case). It may make sense to add these two modes to the action which will then have a clearer definition for the no matching results case.

A3a3e1 commented 5 years ago

It is a not standardized Query action. Not a standardized Lookup

jhorbulyk commented 5 years ago

It is a not standardized Query action. Not a standardized Lookup

@A3a3e1 Correct. The idea is applicable right?

stas-fomenko commented 5 years ago

fix may be implemented as in Exact-Online-component -> Action: Lookup Objects

stas-fomenko commented 5 years ago

DoD

Component development prerequisites:

Development:

After QA:

QA: