cancel
Showing results for 
Search instead for 
Did you mean: 

SDK help

yonexgade14
Deputy Chef I
Deputy Chef I

Hi Community,


I am applying for a position in workato, and this is my first time to create a custom connector. This is the last task i need to do and i cant seem to complete it. The connector is a trigger event from Stripe New customer to Salesforce.

My issue is that when i actually use the connector, it cant see my new user, and i cant seem to put values on a data pill when building a recipe. Another thing is when i use the test button on the SDK builder, its working fine and an output is seen on the result.


Ive already checked sdk doc and still find it hard to solve.


I have attached the source code for reference.



3 REPLIES 3

gary1
Executive Chef I
Executive Chef I

I haven't worked with triggers in the SDK, but I believe the problem is the response of your API call does not match the definition of your output fields. If they don't match, the output tab will still show the API response, but the the output fields (datapills) will be empty when used in a recipe.


I'm assuming we're talking about triggers.new_customers....


The API output according to your screenshot is a single object:


{staged_events: [array of objects],

events: [array of objects]}


But your output fields are structured differently:


{id: int,

email: text,

subject: text,

description: text}


You'll need to update your outputs field definitions to match the exact schema of the API call. It can be a bit tedious to do, but there are some shortcuts.


Here's a start to the output fields I think you need. I would test the "id" datapill first to ensure it returns data, and then work on building out the rest of the output schema:


[{

"name": "events",

"type": "array",

"of": "object",

"properties": [{

"name": "id",

"type": "object",

"properties": [{

"id": "text"

}]

}]

}]


Here's a link with formatting: https://pastebin.com/nhPVFtRr


(Edit: I had to update the above sample and the link, so please grab the latest : )

yes it also crossed my mind and tried different values on the output_fields but no lock. I would check your reccomendation. Really appreaciate it! Thank you!

chris-wiechmann
Workato employee
Workato employee

Please make sure, you have the dedup method in your connector.


Without, it behaves as you describe, not getting any data.


Hope this helps and good luck.

Chris