?>

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

Connect the apps you use everyday and find your productivity super-powers.

  • ShipStation ShipStation

Best MongoDB and Shippo Integrations

  • MongoDB Shippo

    Gmail + Shippo

    Creates a new order in Shippo from email matching term in Gmail [REQUIRED : Business Gmail Account] Read More...
    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 Shippo

    {{item.triggerAppName}} + {{item.actionAppName}}

    {{item.message}} Read More...
    When this happens...
    MongoDB {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppImage}} {{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 Select "Trigger" from the Triggers List.

    (30 seconds)

  2. Step 2: Authenticate MongoDB with Appy Pie Connect.

    (10 seconds)

  3. Step 3: Select Shippo as an action app.

    (30 seconds)

  4. Step 4: Pick desired action for the selected trigger.

    (10 seconds)

  5. Step 5: Authenticate Shippo with Appy Pie Connect.

    (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". "john@example.com", "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.