A JSON API performs the OASIS function of creating an OASIS project. The following areas will be covered:
- Connectivity
- Request Content
- Response Content
Requirements
- Users must have O4. To learn more about moving forward with O4, contact OASIS Sales at sales@oasissalessoftware.com or 501-843-6750.
- Users must create bearer tokens in O4 to authorize the call in their external API software.
Connectivity
An OASIS web service that receives web client requests via JSON.
Call
Software-based call
URL: <O4 Database URL>/API?&ajax=QuoteTSCreate
JSON POST method
Example:
java.net.http.HttpRequest request = java.net.http.HttpRequest.newBuilder()
.uri(java.net.URI.create(“http://localhost:8080/OASIS/API?ajax=QuoteTSCreate”))
.header(“Content-Type”, “application/json”)
.header(“User-Agent”, “OASIS”)
.header(“Authorization”, “Bearer the token value”)
.method(“POST”, java.net.http.HttpRequest.BodyPublishers.ofString(JSON request content))
.build();
java.net.http.HttpResponse<String> response = java.net.http.HttpClient.newHttpClient().send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
Request Content
The OASIS web service handles the creation of one OASIS project at a time.
QuoteTS
The request content must start with {“QuoteTS”:{…}}
Sending the request {“QuoteTS”:{}} creates a project in OASIS.
- Project name by default is "New Project".
- Two phases named ‘Initial Phase’ and ‘New Phase’ are created.
- Each phase contains a bid name of ‘Initial Bid’.
Other default characteristics:
- Workgroup assignment is the default workgroup of the login user (based on bearer token).
- Create date and update date are the time of OASIS project creation.
- The project is active
- Update User is the login user (based on bearer token)
- Quoter is the login user (based on bearer token)
- Quote Status is ‘New’
- Bid Date is the date of creation
- Filed On is the date of creation
Additional parameters of “QuoteTS”:
- QuoteHeader
- PhaseHeader
- Specifiers
- Customers
- Alias
- UserTags
- Followups
- QuoteLines
QuoteHeader
QuoteHeader provides information used in the creation of the overview and the quote of the OASIS project.
Format
“QuoteHeader”:{“Project”:”value”,”Location”:”value”,”LocationState”:”value”,…}
Supported Fields
|
|
PhaseHeader
PhaseHeader provides information used in the creation of the phase named ‘New Phase’ of the OASIS project.
Format
“PhaseHeader”:{“PhaseName”:”value”,”Active”:”value”,”Valuation”:”value”,…}
Supported Fields
|
|
Specifiers
Specifiers provides information to create specifiers within the OASIS quote.
Format
“Specifiers”:[{“action”:”add”,”CustomerID”:”value”,”Role”:”value”},”Influence”:”value”},”SalesUserID”:”value”}]
JSON Keys
Required:
- Action – “add”
- CustomerID – value must match the internal ID of an OASIS customer entry
Optional:
These values are used to override the default values defined for an OASIS customer entry.
- Role – value match to customer roles defined in OASIS
- Influence – Integer value required
- SalesUserID – value match to sales account entry defined in OASIS
Customers
Customers provides information to add customers to the OASIS quote.
Format
“Customers”:[{“action”:”value”,”CustomerID”:”value”,” IncludeLamps”:”value”,…}]
A JSON array format is required for the Customers JSON key.
Supported Fields
Required:
- action – valid values are “add”
- CustomerID – value must match the internal ID of an OASIS customer entry
Optional:
These values are used to override the default values defined for an OASIS customer entry.
- IncludeLamps– Boolean value– true}false or “Y”|”N”
-
WinLoss – Integer value
- -1 to signify loss
- 0 to signify no choice
- 1 to signify win
- LotPrice – numerical value
- Column – set price level 0, 1, 2, or 3
- Markup – numerical value
Alias
Alias provides information to add an alias entry from an OASIS project’s project alias entry.
Format
“Alias”:[{“action”:”value”,”Alias”:”value”}]
A JSON array format is required for the Alias JSON key.
Supported Fields
Required:
- action – valid values are “add”
- Alias – value of project name alias
UserTags
UserTags provides information to create user tags within the OASIS quote.
Format
“UserTags”:[{“action”:”value”,”TagKey”:”value”,”TagValue”:”value”}]
A JSON array format is required for the UserTags JSON key.
Supported Fields
Required:
- action – valid values are “add”
- TagKey – value of the tag key
- TagValue – value to assign to the user tag
FollowUps
FollowUps provides information to create followup entries within the OASIS quote.
Format
“FollowUps”:[{“action”:”add”,”Notes”:”value”,…}]
A JSON array format is required for the FollowUps JSON key.
Supported Fields
Required:
- action – valid values are “add”
Optional:
- Notes – the note content of the followup.
- UserID – ID of the user creating the followup. The user account must be present in OASIS.
- DistributorID – ID of the customer/specifier of the followup.
- ContactDBID – Database ID of the contact for the followup. The contact account must be present in OASIS.
- ContactID – ID of the contact for the followup. The contact account must be present in OASIS.
QuoteLines
QuoteLines provides information to create bill of material lines within the OASIS quote.
Format
“ QuoteLines”:[{“action”:”value”,”ManufacturerID”:”value”,”Catalog”:”value”,…}]
A JSON array format is required for the QuoteLines JSON key.
Supported Fields
Required:
- action – valid values are “add”
Optional:
- Code
- Quantity
- Type
- ManufacturerID
- Catalog
- Description
- Note
- INote
- Cost
- Sell
- SellCommission
- Level1
- Level1Commission
- Level2
- Level2Commission
- Level3
- Level3Commission
- OBase
- OBaseCommission
- Base
- BaseCommission
Response Content
A successful response code is 200.
The response will contain a JSON structure of the data that was successfully applied.
Example:
Request
{
“QuoteTS”:{}
}
Response
{
“QuoteTS”: [
{
“UpdateDate”: “YYYY-MM-DD HH.MM.SS”,
“QuoteID”: “186001637”,
“DBID”: “MY O4 OASIS DBID”,
“CreateUser”: “DEMO”,
“UpdateUser”: “DEMO”,
“CreateDate”: “YYYY-MM-DD HH.MM.SS”
}
]
}
Comments
0 comments
Please sign in to leave a comment.