This tool works like a pair of scissors, allowing you to cut data from any set of values. You can cut half of the line (e.g. from the beginning to the middle) or a value in the middle of the line (e.g. from the 3rd to the 5th character).
Let's look at the functionality of the tool using the following example.
We receive information about Google's click ID (called GCLID) from some source (e.g. an online store, InSales). The information comes in the form of the following string: http://www.site.com/?gclid=1234
From this string, we just need to get the numeric value - 1234 - which we'll pass to SendPulse. To do this, we will use the "Data Cropping" tool.
Step 1. Add the tool
First you need to open your automation, click the + button between the steps and select the "Tool" option. Then select the "Data cropping" tool.
Step 2. Configure the tool
In this step we will configure the tool.
- Create a name for the data set you want to format.
- Select a value for the data processing. In our case, we will select the "URL from where they came to the website" field of the InSales trigger as the value.
- Select the data extraction direction, i.e. choose where to start the extraction: from the beginning or from the end. Let's follow the direction from the beginning. This will make the system run the algorithm from left to right. If we choose the "from the end" option, the algorithm will be mirrored and run from right to left.
- Select the type of data cropping. There are 2 types: "By number of characters" and "By a specified character". In our case we will choose the "By a specified character" type.
Next we configure the data cropping algorithm.
- Here you need to specify "From which character to start cropping" (i.e. the beginning of the data we want to transfer later).
For our example, based on the InSales and SendPulse integration, we entered the following configuration: specify the value "d=". So the result of the tool will be 1234
- We do not enter a value in the "Up to which character to cut" field, but we mark the "Cut to end" field. Thus, for this parameter the algorithm will understand that it is necessary to get the data from the position specified in topic 5 to the end of the string.
To use the result of the Data Cropping tool, you must go to the settings of the next step and select the "Result" value for the field from the previously configured Albato step.
You can use this tool to solve a variety of tasks.
For example, extract a country or operator code from a phone number, extract a region code from a car license plate, extract a token from a request string, etc.