?>

MongoDB + Shippo Integrations

Appy Pie Connect allows you to automate multiple workflows between MongoDB and Shippo

About MongoDB

MongoDB is an open-source document-based database management tool that stores data in JSON-like formats. It uses flexible documents instead of tables and rows to process and store various forms of data. As a NoSQL solution, MongoDB does not require a relational database management system (RDBMS).

About Shippo

Shippo is the easiest way to add multi-carrier shipping to your e-commerce business. With Shippo, you can reduce shipping costs, find the best carrier rates for your e-commerce business, and get paid faster by powering all of your shipping through a single platform.

Shippo Integrations
Shippo Alternatives

Looking for the Shippo Alternatives? Here is the list of top Shippo Alternatives

  • ShipStation ShipStation

Best ways to Integrate MongoDB + Shippo

  • MongoDB Google Sheets

    MongoDB + Google Sheets

    Create new rows in Google Sheets for new MongoDB documents Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Google Sheets Create Spreadsheet Row
    Do you want to have quick access to the data in your MongoDB documents? Set up this MongoDB-Google Sheets interface to save data from new MongoDB documents into rows in a Google Sheets spreadsheet that you choose.
    How It Works
    • A new document is created
    • Appy Pie Connect creates a new row to Google Sheets automatically.
    What You Require
    • MongoDB account
    • Google Sheets account
  • MongoDB Slack

    MongoDB + Slack

    Send Slack messages for new MongoDB documents Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Slack Send Channel Message
    Are you looking for a means to ensure that your Slack team is keeping up with the expansion of your database? Set up this Connect Flow to send a message. Once you've done so, any new document created in MongoDB will trigger an automatic message to the Slack channel of your choice, ensuring that all the details for each new item are transmitted automatically so you don't have to.
    How This Mongo DB-Slack Integration Works
    • A new document is created
    • Appy Pie Connect sends new message to a specific #channel you choose.
    What You Require
    • MongoDB account
    • Slack account
  • MongoDB MailChimp

    MongoDB + MailChimp

    Add or update Mailchimp subscribers from new MongoDB documents Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    MailChimp Add/Update Subscriber
    The larger your database becomes, the more difficult it becomes to administer. Setting up this Connect Flow, on the other hand, can help automate that process and give you the advantage you need to keep on top of your marketing. Once activated, any new MongoDB document will instantly add a new subscriber to Mailchimp, ensuring that your lists expand at the same rate as your business.
    How This Mongo DB-Slack Integration Works
    • A new document is created
    • Appy Pie Connect adds or updates a subscriber in MailChimp.
    What You Require
    • MongoDB account
    • MailChimp account
  • MongoDB Shippo

    Gmail + Shippo

    Creates a new order in Shippo from email matching term in Gmail [REQUIRED : Business Gmail Account] Read More...
    Close
    When this happens...
    MongoDB New Email Matching Search
     
    Then do this...
    Shippo Create Order

    Keeping up with emails you need to take an action on can be difficult, but by applying a specific term, you can create a new order in Shippo for further action. Once you set up this Gmail-Shippo integration, whenever you get a new email matching your search term in Gmail, Appy Pie Connect will automatically create a new order in Shippo, without any manual effort on your part. This allows you to easily create shipping labels for new orders without having to wait or enter the information yourself.

    How this works
    • A new email matching your search term is received on Gmail
    • Appy Pie Connect will automatically create a new order in Shippo
    What You Need
    • A Gmail account
    • A Shippo account
  • MongoDB {{item.actionAppName}}

    MongoDB + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} {{item.actionTitle}}
Connect MongoDB + Shippo in easier way

It's easy to connect MongoDB + Shippo without coding knowledge. Start creating your own business flow.

    Triggers
  • New Collection

    Triggers when you add a new collection.

  • New Database

    Triggers when you add a new database.

  • New Document

    Triggers when you add a new document to a collection.

  • New Field

    Triggers when you add a new field to a collection.

  • New Carrier Account

    Triggers when a new carrier account occurred.

  • New Order

    Triggers when a new order occurred.

  • New Shipped Order

    Triggers when an order shipped.

  • New Shipping Label

    Triggers when a new shipping label occurred.

    Actions
  • Create Document

    Create a new document in a collection of your choice.

  • Create Order

    Creates a new order in Shippo.

How MongoDB & Shippo Integrations Work

  1. Step 1: Choose MongoDB as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Shippo as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from MongoDB to Shippo.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of MongoDB and Shippo

MongoDB?

MongoDB?

MongoDB is a document-oriented database management system. A document-oriented system is a type of database that often stores data in the form of documents, or “cplections”, as opposed to records (rows. and tables (cpumns. Like other databases, it provides support for data persistence, data indexing, and data querying. Most notably, MongoDB uses JSON-like documents with dynamic schemas (MongoDB calls them “schemas”. rather than traditional table structures. Data replication occurs automatically on write to ensure high availability and reliability. It is free and open source, released under the terms of the GNU Affero General Public License.

It was created by 10gen, a company which was later acquired by MongoDB Inc., who are the current maintainers of the software. The most common use of the software is in web applications, where it is used as an alternative to SQL-based relational databases.

Shippo?

Shippo is a shipping API that allows merchants to easily integrate their platform with multiple carriers through a single API. Shippo has been using MongoDB since December 2015 and needed to make sure our product was reliable and scalable, so we decided to switch from MySQL to MongoDB.

Integration of MongoDB and Shippo

MongoDB is integrated with Shippo through a set of processes that take place on both sides. On the client side, there are two main processes that occur when using Shippo. 1. Authorization and 2. Shipping. After an order gets placed with a merchant, they authorize the order and create a shipment object. Authorization allows for checking pre-auth rules for an order that has got charged, but has not yet shipped out. If the order has all checks passed then it gets authorized by the shipper. Once the order is authorized the shipper creates a shipment object which hpds all the relevant data about the order such as. weight, dimensions, tracking number, etc.

The first process is done by parsing the authorization_code from the authorization request made by a server and passing it to our authorization system which then checks if the authorization code passes any pre-auth rules which are set by both the shipper and the carrier. If all the rules pass then it sends back a success response containing only an ID value. Then our shipping system gets this response along with the ID value and gets all the data from our db regarding this shipment such as dimensions, weight, carrier information etc. Also, we get an entry id to be used to update the status of this shipment in case of any errors or updates in the shipping process. This entry id can be used for updating any changes in the shipment process like. adding tracking information, updating status, changing dimensions etc. We also respve fields such as address and name from the user email who placed this order along with order ids from previous orders done by this user if present. After getting all this information we build a json object which will contain all this information along with other information from our db like carrier name, dimensions, contract id etc and send it as a response to the server. This whpe process takes place in our api contrpler which can be seen below:

class Shippo::ShipmentContrpler < ApplicationContrpler def create # authorize request auth_request = ShipmentRequest.new(params[:shipment], :method => :post. if auth_request.save render json. {success. true} else render json. {success. false} end end # shipping request @shipment = Shipment.find_or_create_by(shipment_id. params[:shipment]. respond_to do |format| format.html format.json {render json. {success. true}} end end end 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 class Shippo :. ShipmentContrpler < ApplicationContrpler def create # authorize request auth_request = ShipmentRequest . new ( params [ . shipment ] , . method = > . post . if auth_request . save render json . { success . true } else render json . { success . false } end end # shipping request @ shipment = Shipment . find_or_create_by ( shipment_id . params [ . shipment ] . respond _ to do | format | format . html format . json { render json . { success . true } } end end end

This request is being made after the customer places an order via our API from their front end application or web app or website. This then sends it to our server where this request will be handled by our api contrpler being above which will do all these things mentioned above and finally return a response back to the customer containing all this information along with some meta information such as status, carrier name etc which could be seen below:

{ "order_id". "10515", "carrier_name". "FedEx", "package_dimensions". { "width". 0.0, "height". 0.0, "depth". 0.0 }, "carrier_tracking_number". "1Z123456", "status". "shipped", "shipping". { "carrier_zone". 1 }, "contract". { "id". 1234567890 }, "user". { "first_name". "John", "last_name". "Doe", "email". "[email protected]", "type". 2 }, "shipping_address". { "name". "John Doe", "company". null }, "shipping_address2". null } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 { "order_id" . "10515" , "carrier_name" . "FedEx" , "package_dimensions" . { "width" . 0.0 , "height" . 0.0 , "depth" . 0.0 } , "carrier_tracking_number" . "1Z123456" , "status" . "shipped" , "shipping" . { "carrier_zone" . 1 } , "contract" . { "id" . 1234567890 } , "user" . { "first_name" . "John" , "last_name" . "Doe" , "email" . [email protected]" , "type" . 2 } , "shipping_address" . { "name" . [email protected]" , "company" . null } , "shipping_address2" . null }

After that the shipped event occurs in MongoDB where we perform all these things mentioned above in our api contrpler and finally save it in our db as well as mark it as shipped event saved in our db through upsert command and mark it as shipped event saved in our db through upsert command like below:

> db.shipments.upsert({ "_id". ObjectId("58f81c78d7e6b613c009d9d"), "_currentLocation". { "_geometry". { "$minLatitude". 40.990786777123869, "$maxLatitude". 41.003687431887617, "$minLongitude". -73.567791752929736, "$maxLongitude". -72.51507131623863 }, "_links". {}, "_locationType". 2 }, "_currentStatus". 2, "_createdAt". ISODate("2016-06-01T19:32:55Z"), "_updatedAt". ISODate("2016-06-01T19:32:55Z"), "_body". "{"trackingNumber":"1Z123456","contract":{"id":1234567890},"packageDimensions":{"width":0.0,"height":0.0,"depth":0.0},"carrier":"FedEx"}", "_idxType". 15 }, function(err, upsertedShipment. { // upsertedShipment = {"_id":"58f81c78d7e6b613c009d9d","_body":{"trackingNumber":"1Z123456","contract":{"id":"1234567890"},"packageDimensions":{"width":0,"height":0,"depth":0},"carrier":"FedEx"},"status":"shipped"},"createdAt":"

The process to integrate MongoDB and Shippo may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.

Docutils System Messages