Overview

  • Available billing customers as of now:
    1. Watsons
    2. TFP
  • The name field is what to render in the selector for user to choose which bulk import function to use



  • The description should briefly explain what it does. It will be shown under the selector once a function is selected



  • The bulk import operation is sending a HTTP request to a serverless function


Creating Bulk Import Functions

Step 1: Go to manage panel and find Bulk Import Functions in the integrate section


Step 2: Fill in the form to create a bulk import function


The structure of the HTTP request and its destination is determined by the parameters of the URL and the Options.


1. URL

The URL determines which serverless function will be called when the user submit their uploaded .csv.


Example: https://asia-southeast1-shipx-203101.cloudfunctions.net/connect-watsons-r64i2t4ddqdxt?customer=tfp&billToUuid=xxxxxxxxxxxxxx&shipperUuid=xxxxxxxxxxxxxxxxx&shipperAddressUuid=xxxxxxxxxxxx


Anatomy of the URL:

  1. base URL: https://asia-southeast1-shipx-203101.cloudfunctions.net/connect-watsons-r64i2t4ddqdxt
    This is the URL where the HTTP request is being sent to.
  2. indicates start of query parameters: ?
  3. customer: customer=tfp
    This determines which csv format are we submitting. It can either be tfp or watsons as of now.
  4. billToUuid: billToUuid=xxxxxxxxxxxxxx
    This will fill in the Bill To company when creating the bookings
  5. shipperUuid=xxxxxxxxxxxxxx
    This will fill in the Shipper company when creating the bookings
  6. shipperAddressUuid=xxxxxxxxxxxxxx
    This will fill the the Shipper address when creating the bookings
  7. separator between different query parameters: &


2. Options


Example: {"method":"POST","headers":{"Content-Type":"application/json"}}


Anatomy of the Options:

  1. method: 'POST'
    The HTTP request method. Using POST allows us to send the request with a body.
  2. headers
    Will be programmatically appended to the other headers. Mainly to make sure the sender and the receiver understands the context of the request.
    1. Content-Type: "application/json"
      Indicates that the body being sent is in JSON format