Overview
- Available billing customers as of now:
- Watsons
- 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.
Anatomy of the URL:
- base URL: https://asia-southeast1-shipx-203101.cloudfunctions.net/connect-watsons-r64i2t4ddqdxt
This is the URL where the HTTP request is being sent to. - indicates start of query parameters: ?
- customer: customer=tfp
This determines which csv format are we submitting. It can either be tfp or watsons as of now. - billToUuid: billToUuid=xxxxxxxxxxxxxx
This will fill in the Bill To company when creating the bookings - shipperUuid=xxxxxxxxxxxxxx
This will fill in the Shipper company when creating the bookings - shipperAddressUuid=xxxxxxxxxxxxxx
This will fill the the Shipper address when creating the bookings - separator between different query parameters: &
2. Options
Example: {"method":"POST","headers":{"Content-Type":"application/json"}}
Anatomy of the Options:
- method: 'POST'
The HTTP request method. Using POST allows us to send the request with a body. - headers
Will be programmatically appended to the other headers. Mainly to make sure the sender and the receiver understands the context of the request.- Content-Type: "application/json"
Indicates that the body being sent is in JSON format
- Content-Type: "application/json"