MyAPI imports
Use Case: We have webforms that currently submit directly to NetSuite via their Forms. However, we need more flexibility over these forms, how they submit, and error messaging.
I have been attempting to use the MyAPI and imports to migrate the processing and mapping of these forms through Celigo. I have a passthrough Lambda function I plan on using to get the information to Celigo. However, a bit of a blocker in that ideally, I would have a listener that would listen to the Lambda and process the information, but that doesn't seem possible.
The other solution I'm working on is the MyAPI and running two different imports back to back to get the information into NetSuite. The first import maps to the customer, and the second maps to the Case form using the customer id.
I'm trying to figure out if I'm on the right track, or if there's a better solution that's been used than what I'm trying.
Comments
Chris Coppenbarger Thanks for posting to the community. It looks like invoking imports through MyAPIs should work as you explained. However it would be great to connect and go through the use case before providing any recommendations.
Meanwhile here's a help article which you could refer : https://docs.celigo.com/hc/en-us/articles/360047142012-Example-3-Configure-My-API-to-run-an-import-with-supplied-mapped-fields
Bhavik Shah
I did successfully get one import to run correctly. I'm not sure if I have the way of running the second import correctly, or not. I'm posting a screenshot of my integration, and sample code from my script. I need the customer id returned from the first import to run the second import.
I recommend using 'console.log()' in your JavaScript code to inspect all the different objects, and then it should be easy to piece it all together. To view the logs, see pic below for context.
At a very high level, if you need to mash up a bunch of different imports (i.e. API calls to different apps), and also get the results of all the API calls in the original HTTP request + response, then MyAPI is the way to go. If you do not need the results of all the different imports in the original HTTP request + response, then I would recommend sending your API requests to a "Listener" bubble in a normal flow that can do all the work behind the scenes.
Regarding your code, here is some high level guidance that might help too.
Hey Scott Henderson,
Thanks for the reply. If figured how to "listen" to my AWS Lambda as a webhook. My current issue is getting the HMAC authentication working. I got it working in Postman using one example from one of the posts here, but having an issue in my Node.js code. It's not a Celigo issue, in this case, obviously, but any ideas?
I keep getting 401 unauthorized. Secret is same as I put in my Listener on Celigo.
Well, nevermind. The test from the API Gateway was sending empty data, but from PostMan, it worked fine. Moving forward with the listeners and import.
Chris Coppenbarger - Thanks for providing the feedback.
We have published a new article on invoking multiple imports.
https://docs.celigo.com/hc/en-us/articles/9228081153435
Please sign in to leave a comment.