Customize shooting flow
You can customize the shooting flow by configuring a shooting template. Shooting templates allow you to define the sequence of overlays based on different requirements — for example, new cars may require more overlays than used cars.
1. Key Terminology
To customize the shooting experience, you’ll need to pass the templateId in the ShootData object when starting a shoot. The SDK will then load the corresponding overlay sequence based on the selected template.
1.1 ShootData
The ShootData object contains vehicle details and an optional templateId parameter that defines the overlay sequence for the shoot.
Field | Type | Required? | Description |
---|---|---|---|
vin | String? | ❌ | Vehicle Identification Number (17 characters if provided). |
stockNumber | String? | ❌ | Vehicle stock number in your internal system. |
registrationNumber | String? | ❌ | Vehicle registration number. |
templateId | String? | ❌ | Shooting template ID used to control the sequence of overlays. For example, a new car may require 8 overlays, while a used car may require 6 overlays. |
If templateId is not provided, the SDK uses the default shooting template.
2. Example: Starting a Shoot with Custom Template
let shootData = ShootData(
vin: vin,
stockNumber: stockNumber,
registrationNumber: registrationNumber,
templateId: "NEW_CAR_TEMPLATE" // Pass custom template ID here
)
let spyneSDK = SpyneAutomobileSDK.Builder(
viewController: self,
delegate: self
)
.setUserData(UserData(userId: "\(user_id)"))
.setShootData(shootData)
.setEnvironment(.staging) // or .production
.setLocale("en") // Pass preferred language code
.build()
spyneSDK.startShoot()
3. When to Use Templates
Scenario | Template ID Example | Overlays Required |
---|---|---|
New Car Shoot | NEW_CAR_TEMPLATE | 8 overlays |
Used Car Shoot | USED_CAR_TEMPLATE | 6 overlays |
Custom Campaign Shoot | CAMPAIGN_TEMPLATE | Variable |
4. Benefits of Using Templates
- Customize overlay sequences per vehicle type
- Enable different flows for campaigns, used cars, and new cars
- Maintain flexibility without hardcoding overlay counts
Updated 3 days ago