Field Cloning allows you specifying several similar fields with one action. This is a handy option in cases when leads in Auto vertical contain several drivers, vehicles, accidents, incidents, or claims.
Indexing lets you avoid repeating the same actions by entering the indexing tag, which automatically changes the number for each next field (driver1, driver2, etc.).
Field Cloning and Indexing are interconnected features and do not work separately.
Field Cloning
To perform the Field Cloning, put ‘{‘, start typing start to open the list of cloning tags, and select necessary Start tag.
Then put the appropriate End tag:
Place the cursor between Start and End tags and map all necessary fields using Indexing tags.
Indexing
To map the field using Indexing, follow these steps:
1. Enter the field name and replace the number by the Index tag:
driver1_gender -> driver{QuoteRequest.Drivers.Driver.Index_OneBased}_gender
2. Map all indexed fields inside Cloning tags (HTTP example):
When selecting the Index tag, you have 0-Based and 1-Based alternatives:
Sometimes buyer API requires fields to start counting from 0 or from 1. Select the necessary alternative according to the buyer specification.
Text & Number Formats
Sometimes buyers require numbers to be sent in a text format, e.g. driverOne_gender instead of driver1_gender.
To configure text formatting for indexes, follow these instructions:
1. Click on your Start cloning tag to open configurations on the Mapping Panel.
2. Click On for Answer Values and enter appropriate text name for each number:
4. Click the Index tag of the field and click On for Text View on the Mapping Panel:
If you change the formatting for the first indexed field, text formatting will be automatically configured for all next fields inside these cloning tags. However, if you change the formatting after all the fields were mapped, you will need to change the formatting for each field.
Custom Indexing
There are situations when buyer specification requires to pass the field two or more times, each with different mappings.
In this case, you need to index these fields in order to provide different mapping for them. To do that, enter the field to the Template Editor twice, and put ‘~1’ to the second tag:
Now map each field according to the Buyer Specification.
The first field can be mapped using text formatting:
The second field can be mapped using numerical formatting:
The procedure is the same for several similar fields.
Custom Indexing is not related to standard Cloning and Indexing procedures and can be used in any Vertical.
Cloning and Indexing Example
There are fields 20-22 (vehicle1_year, vehicle1_make, vehicle1_vin) from our Example Buyer Specification that require using Field Cloning and Indexing functionality.
In our example, fields are used with the following Index tags:
- vehicle1_year -> vehicle {QuoteRequest.Vehicles.Driver.Index_OneBased}_year;
- vehicle1_make -> vehicle{QuoteRequest.Drivers. Vehicles.Index_OneBased~1}_make;
- vehicle1_vin -> vehicle{QuoteRequest.Vehicles.Index_OneBased~2}_vin;
To clone fields with different indexing, follow these instructions:
1. Put Each Vehicle Start and Each Vehicle End cloning tags:
2. Map all the fields and their options that are required for vehicles with different indexes between these two tags. See examples for different format types of the Template Editor:
HTTP:
XML and SOAP:
In XML and SOAP, the tag structure may vary according to Buyer Specification requirements:
JSON:
In JSON, Indexing works differently. Instead of configuring Indexing for each field, put ID before all fields that should be indexed, and configure Indexing for it. In this case, the system will show Index 1 and a set of fields for it, Index 2 and a set of fields for it, etc.
0 comments
Please sign in to leave a comment.