Building Your First Orchestration¶
This walkthrough guides you through creating a simple orchestration that decodes a VIN (Vehicle Identification Number) using a public API. By the end, you will have a working orchestration you can run and monitor.
Prerequisites¶
Before you start, ensure you have:
- At least one active connection (the NHTSA VPIC connector works well for this example, as it requires no credentials)
- Enterprise Admin or higher role in DIBOP
Step 1: Create a New Orchestration¶
- Navigate to BUILD > Orchestrations in the sidebar
- Click New Orchestration
- Fill in the basics:
| Field | Value |
|---|---|
| Name | VIN Decode Example |
| Description | Decodes a VIN using the NHTSA VPIC API and returns vehicle details |
- Click Create
You are now in the orchestration editor with an empty workflow.
Step 2: Define Input Parameters¶
Your orchestration needs a VIN as input. Add an input parameter:
- In the Parameters panel, click Add Parameter
- Configure:
| Field | Value |
|---|---|
| Name | vin |
| Type | String |
| Required | Yes |
| Description | The 17-character Vehicle Identification Number to decode |
- Click Save Parameter
Step 3: Add an API Call Step¶
Now add a step that calls the NHTSA VPIC API to decode the VIN.
- Click Add Step
- Select step type: API Call
- Configure the step:
| Field | Value |
|---|---|
| Step Name | decode_vin |
| Description | Call NHTSA VPIC to decode the VIN |
| Connection | NHTSA VPIC |
| Operation | Decode VIN |
| Parameters | vin: ${parameters.vin} |
The ${parameters.vin} syntax references the input parameter you defined in Step 2. When the orchestration runs, it will be replaced with the actual VIN value.
- Click Save Step
Step 4: Add a Transform Step¶
The NHTSA API returns a large response with many fields. Add a transform step to extract only the fields you care about.
- Click Add Step
- Select step type: Data Transform
- Configure:
| Field | Value |
|---|---|
| Step Name | extract_vehicle_details |
| Description | Extract key fields from the NHTSA response |
- In the transform editor, define the mapping:
{
"make": "${decode_vin.response.Results[0].Make}",
"model": "${decode_vin.response.Results[0].Model}",
"year": "${decode_vin.response.Results[0].ModelYear}",
"body_class": "${decode_vin.response.Results[0].BodyClass}",
"engine_type": "${decode_vin.response.Results[0].EngineModel}",
"fuel_type": "${decode_vin.response.Results[0].FuelTypePrimary}",
"plant_country": "${decode_vin.response.Results[0].PlantCountry}"
}
- Click Save Step
Step 5: Review the Orchestration¶
Your orchestration now has:
- Input: A VIN parameter
- Step 1 (
decode_vin): Calls the NHTSA API with the VIN - Step 2 (
extract_vehicle_details): Extracts key fields from the response
Review the step order and parameter mappings in the orchestration editor. The flow should read naturally from top to bottom.
Step 6: Test with Sample Data¶
Before activating, test the orchestration with a sample VIN.
- Click Test Run in the toolbar
- Enter a sample VIN in the parameters panel:
- Click Execute
- Watch the execution trace in real time:
- Step 1 (
decode_vin) calls the NHTSA API and shows the raw response - Step 2 (
extract_vehicle_details) transforms the data and shows the extracted fields
- Step 1 (
If everything looks correct, you will see a green Success status.
Test with Multiple VINs
Try a few different VINs to make sure the orchestration handles various vehicle types correctly. If a VIN is invalid, the NHTSA API will return empty results -- this is a good opportunity to add error handling later.
Step 7: Activate the Orchestration¶
- Click Activate in the toolbar
- Confirm the activation
Your orchestration is now Active and can be:
- Run manually from the Orchestration Runner
- Triggered by other systems via the API
- Scheduled to run at regular intervals
Running Your Orchestration¶
From the Orchestration Runner¶
- Navigate to BUILD > Orchestration Runner
- Select your "VIN Decode Example" orchestration
- Enter the VIN parameter
- Click Run
- Watch the Execution Trace in the results panel
From the API¶
You can also trigger orchestrations via the DIBOP API:
curl -X POST "https://<your-instance>.dibop.ca/api/v1/orchestrations/<id>/execute" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{"parameters": {"vin": "1HGCM82633A004352"}}'
Enhancing Your Orchestration¶
Now that you have a working orchestration, consider these enhancements:
Add Error Handling¶
What if the VIN is invalid or the API is down? Add error handling to the decode_vin step:
- On Error: Continue (instead of Abort)
- Retry: 2 attempts with 1-second delay
- Fallback: A transform step that returns a "VIN not found" response
Add a Conditional Step¶
Add a conditional step that checks whether the decode was successful before proceeding:
Write to Another System¶
Add a final step that writes the decoded vehicle data to your DMS or CRM using another connected system.
What You Have Learned¶
In this walkthrough, you have:
- Created an orchestration with input parameters
- Added an API Call step that calls an external system
- Added a Transform step that reshapes the response
- Tested the orchestration with sample data
- Activated the orchestration for production use
Next Steps¶
- Explore all step types -- API Call, Transform, Conditional, Error Handler
- Master parameter mapping -- reference data from any previous step
- Try the AI Composer -- describe your next orchestration in plain English
- Set up monitoring -- track execution success and latency