Adjusting Builder Time July 29, 2024 17:13 Updated Blip's Builder has some native variables that return date and time. However, by default, the GMT-0 timezone is used, as shown in the image below. Note: The business hours verification script provided by Blip already has an adjustment for the desired use. If you want to use the Brazilian timezone (GMT-3) or any other preferred timezone for, for example, custom reports, just follow the instructions below. 1. Access the builder, go to the Settings -> Configuration Variables option, and set the variable named dateTimeOffset with the timezone value.Note: For Brazil, use -3. If you have an intermediate timezone like Mumbai, India, which is +5:30, pass the value separated by a dot, like this 5.5. 2. In the block where you want to use the correct time, create a script, passing the variable config.dateTimeOffset as an input parameter and saving the return in currentTime. The script used should be: function run(offset) { offset = parseFloat(offset); let now = new Date(); let utc_timestamp = Date.UTC( now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds(), now.getUTCMilliseconds() ); return new Date(utc_timestamp + offset * 3600 * 1000);} Note: The return will be in the date and time format yyyy-MM-ddTHH:mm:ssZ With the currentTime variable saved, it can be used as desired in the flow. If you need to use the time at another point in the flow, the same script needs to be configured in the block that will be used to get the data from that specific moment. Example of application: Create a variable called inicioInteracao in the output actions of the start block, passing the value currentTime. Create a variable called fimInteracao in the input actions of the last block of the flow. Integrate blip with sheets, passing the variables contact.identity, inicioInteracao, and fimInteracao. With this, it is possible, in addition to verifying the start and end time of the interaction, to obtain the time the client spent in the bot flow. For more information, join the discussion on our community or watch the videos on our channel. 😃 Related articles How to Set Up Business Hours Using a Script Builder variables Setting up Session Expiration and Timeout Creating interactive messages in WhatsApp Setting up the flow for the holiday