How do I trigger data to be sent from our third-party application to NetSuite - api

I am trying to do an API integration of our third party application with NetSuite. I want to be able to import sales invoice details generated from our third party system (which uses REST API) into the NetSuite invoice form.
The frequency of import is not too crucial- an immediate import will be ideal, but sending data once a day is fine as well.
Furthermore, the invoice on NetSuite needs to be filled with details of which some are already available on NetSuite (ex: tax code, billing address, etc.) and some which need to be imported from the third party application (ex: item name, price, etc.)
How would I go about doing so? Would I need to use our API to get the item and price details, use an API to get the details from NetSuite, merge them together somehow and push that into NetSuite? Is there a less complex way of doing so?
I have heard of user events that trigger when a change occurs on NetSuite, and scheduled scripts that trigger every x period of time, but I have only seen these being used from the POV of sending data FROM Netsuite into a third party system. How would I trigger data to be sent to NetSuite when an invoice is created on our external application?
To summarize, I would like to know how to go about integrating when data is needed from 2 sources (NetSuite itself, and the external application) and how to trigger the data to be imported into NetSuite.
I am a complete beginner to APIs and NetSuite. Tips on what I should look into researching, and any/all help is much appreciated!

In my opinion, the easiest way to implement what you need here, is to use a NetSuite scheduled script to GET the data from the third party API, and then create the invoices required from that data. Instead of thinking about it as the third party application sending data to NetSuite, think about it as NetSuite fetching the data from the third party application.
The scheduled script would need to connect to the third party, authenticate and run a query to get any new invoices using whatever filters make sense (for example, 'date created'). It would then need to iterate over the records returned to create corresponding records in NetSuite.
Scheduled scripts can be set up to run on schedule at any time interval down to 15 minutes, or can be called from another script using the N/task module. They can also be triggered manually for testing.

You can use the Scheduled Script if you are fine with running batch processes at set intervals to pull in updates from the 3rd party, and the third party application has the necessary REST API (or gives you the ability to create new ones). You will need to create a mechanism to only ask for new/updates from a cutofftime and maintain that in NetSuite to avoid pulling in the same data each time.
If you want the third party application to push the data in realtime to NetSuite, you would need to write some code on the 3rd party app that either triggers on specific events (or is timed like the first approach). This can then call a custom RESTLET you would create on NetSuite, and pass along all the information NetSuite needs {itemname, price, etc} in JSON format. The RESTLET code would take the JSON data, add the missing pieces it needs to source from NetSuite objects{taxcode, billing address, etc} and create the invoice. Depending on your design, you could also have it such that the JSON could be a single invoice, or a list of invoices that you club together for performance.
Finally, you may also want to look at iPAAS platforms like Dell Boomi, Celigo, Jitterbit, etc. All of these support NetSuite as one of their endpoints. If they also natively support the 3rd party application you are using, you could achieve your objective with far less coding. All these platforms also support connecting to a REST API though.

Related

How do I integrate third party APIs with Shopify to find and create products?

I have created a Shopify Store which needs to contact another outside web service to send a query and then build the products based on the query response data.
Is it possible to do with Shopify?
If yes, then how should I go about implementing it?
I have tried looking into the docs but it seems like the only option is to connect with Admin API to add products. However, I don't want to store product data but instead rely on the API.
You do want to use Admin API calls. The reason is simple. They let you create products in Shopify, in bulk. Why fight the power! Using the Admin API has nothing to do with storing products, not sure why you're afraid.
So you get your product info from wherever, format it into Shopify-compatible data, inform Shopify of your data, and sit back and relax. The bulk building is really quite simple for a pattern. You can also build yourself a CSV to import where you also format the data to be compatible with Shopify. So there are two options for you right there.

How would I go about developing a program that automatically sends an email with the tracking number to a customer using EasyPost API?

I'm a fairly new web developer and I have an ecommerce website that integrates EasyPost to create and print shipping labels.
EasyPost has an API. Also, in each shipping label, I see a JavaScript object (I think) that displays buyer_address... "email": "example#gmail.com",, which tells me that the email information is there.
My question is somewhat general in scope: What steps would I need to take to go about creating this automation? The website is built in Webflow, so I don't really have a "codebase" or "repository" to store whatever code is needed to build the automation.
Since the buyer email is making it into EasyPost with integrations already in place, I feel that I could create a simple program that emails the tracking number to the buyer email every time a label is generated, or perhaps when package is shipped, without the program needing to interact with Webflow or other integrations.
I attempted using Zapier, as well as Make.com. Neither worked, and OrderDesk doesn't have a way to send tracking number emails.
It looks like Webflow has some kind of support for Webhooks (https://webflow.com/feature/create-webhooks-from-project-settings). EasyPost offers webhooks for free as an add-on service. Basically, with webhooks, EasyPost would send tracking events to Webflow proactively, but Webflow (or you) would need to manage the logic for what to do with those tracking events after they are delivered.
EasyPost Webhook Guide
I'm unaware of any off the shelf products that could do this for you without writing any code. We have a guide that details how you might accomplish this with Ruby (you could then follow this as an example for any other language): https://www.easypost.com/email-tracking-tutorial
A few suggestions:
Integrate something into Webflow if possible (I'm unfamiliar with the platform so couldn't say).
Build a simple script that runs on a schedule (cronjob) that retrieves your trackers from EasyPost and sends an email to customers if they have not yet received one. To your point, this approach wouldn't require interacting with Webflow at all and could be done with some local code running on a server and just your EasyPost API key.
I've created a simple UI for EasyPost: https://github.com/Justintime50/easypost-tools-ui, it could be interesting to add this particular use-case as a feature to that project. If you're interested, feel free to open an issue on GitHub for the repo listed here and I'd consider it.
You'd use easypost's API webhooks, to detect when shipment tracking information is provided, or package information is updated.
https://www.easypost.com/docs/api#trackers
It looks like it has a lot of states, so you can keep the client updated regarding the package status from the moment the tracking # is assigned;
EZ1000000001 pre_transit
EZ2000000002 in_transit
EZ3000000003 out_for_delivery
EZ4000000004 delivered
EZ5000000005 return_to_sender
EZ6000000006 failure
EZ7000000007 unknown
You can install webhooks from these docs.
To send the email, you can use an automation service e.g. Make to capture those webhook events, and then compose and send an email to that customer. I like MailJet for that purpose, because it has excellent template support and you can send from your own company domain. But there are many email-sending options.
A bigger challenge, maybe, is getting the email address to send to. I didn't spot it glancing through the Trackers or Shipments data structures, and I am primarily seeing physical address info.
If EasyPost is not tracking the customer's email with the shipment, you may have some challenge in that you'd need to capture the client info through Webflow's order webhooks, and then associate that with EasyPost's shipmentid, and store those in a reference table.
Many automation services offer database-like functionality for this purpose, or you could use e.g. google sheets ( columns webflow OrderID, easypost ShipmentID, customer Email ) or airtable for that purpose.
But you'd have to look into the Easypost integration as well, and you may need to make that integration manual so that you can acquire all 3 of those pieces of information at the same point in your business data flow.

Shopify app for altering the default checkout procedure

I need to create a solution for altering the checkout process.
Better said, I need to add some functionality to it with a remote app (I am not sure if this is the right way to do it).
Mainly, what is needed represents a process that calls an external API, using a private API key from a delivery company, that registers a pick-up from the buyers house and sends the product to our headquarters.The process should be started when the user completes the entire checkout system from shopify, after payment.
After that, some AWB should be returned to the users checkout page, or some response regarding the creation of the pick up.
My question is, let's say, using some language like javascript with node and Koa or express, how one can achieve that? I can't find any tutorials or something that would help me do this.

Docusign Basic API Limitations

<--------- UNNECESSARY BACKGROUND INFO --------->
I have a client who wanted a simple contract run through docusign. I created a form, he fills the form with basic information, and then docusign sends a contract to his customer with the information populated. So I sign up with a demo API account and get everything going. After about a week, I have everything perfect and am ready to roll with a live account. I sign up for the Basic API for $50/month and upload the template from the demo account. It doesn't let me do it, because my account is not allowed to use calculated fields. Fine, I remove the 3 calculated fields and try again. Now it says I can't use conditional fields (which isn't mentioned in the API pricing on the website). Then I look to see that the Basic API doesn't even have data labels! I can't pay for the Advanced API for this one form that will get used maybe 10 times per month.
<--------- QUESTION STARTS HERE --------->
Can I pre-populate documents with the Docusign API using "settexttabs" if I have a Basic API account? If so, how can it be done without data labels available?
Is there an alternative option that doesn't require a higher level API purchase?
I'm not sure which plan and which feature you are referring to (https://www.docusign.com/products-and-pricing) but I every plan allows for API use. I suspect you need advanced fields and that is only available in the $40 plan (not $50) but I'm not clear on which feature exactly you are trying to use.

VirtoCommerce Integration with eBay and Amazon

I have been working on import modules for eBay and Amazon. The idea is that if you have an existing storefront at either of these providers, you can import your inventory and sell them at your own custom storefront. The concern I have is, after selling an item on VC, I would have to make sure to adjust the inventory at eBay. And likewise, if an item is sold on eBay, the VC inventory would not be updated until the next scheduled import (perhaps run hourly).
With these concerns in mind, I wonder if I might be going about this the wrong way. Would it be possible for me to author a custom "catalog provider" class, that, instead of retrieving catalog items from the database, would retrieve them real-time via the eBay/Amazon APIs? (Perhaps backed by a cache)
So I guess in summary my question is, is there support/guidance for creating a custom catalog type in VirtoCommerce?
Import/export is a preferred approach for getting a listing data. eBay also provides client alerts https://developer.ebay.com/devzone/client-alerts/docs/Concepts/ClientAlertsAPIGuide.html, which allows you to pull the data every minute about various alerts, like when item is sold. You can use that to get the inventory. So in case it is critical for you to get up to date inventory information, I would use combination of more realtime inventory APIs and import/export.
As of creating an external catalog provider, it is possible but will be much more effort than doing import/export.
Also, we have a parter who is developing integration with eBay/amazon, the project is open source: http://spreadbot.net.