[Extension] Handling environment variables with Resources using the Resource Manager extension August 25, 2023 15:16 Updated Introduction Features Installation and configuration User guide Usage examples How does each field type work? Importing and exporting resources and items Extras Support The Resource Manager was created to make it easier for Blip users to create custom resources within the platform. Create, manage, and standardize resources in Blip without manually editing JSON files. Optimize development time by integrating dynamic data into Builder with just a few clicks. Keywords: Resource Manager, Resources, Environment variables, JSON, Automation, Import, Export, Content Management, Blip Extensions. IntroductionDespite the great advantage and possibility of having resources within the Blip platform to organize, standardize, and create content that can be easily used in Builder, developing JSON can often be tedious, technical, time-consuming, and tiring, depending on its size. But have you ever thought that, with simple and basic actions, you could create a resource to use when building your smart contact without having to manually edit the JSON, making better use of the tool while saving time and energy?That is where the Resource Manager comes in. You can now rely on it to save time, increase agility, and stay organized. In addition, it allows you to easily import, export, and manage your resources. You can view an example of how to use the extension in the videos below: Resource Manager Extension - Blip - Presentation Resource Manager Extension - Blip - Single-Type Resources Resource Manager Extension - Blip - Collection-Type Resource Resource Manager Extension - Blip - Import and Export FeaturesThe Resource Manager extension was developed to facilitate, support, and organize the creation of resource content on the Blip platform. It allows you to create different types of content without having to worry about JSON, since the manager does this for you with just a few clicks.The following features are available: Registration of custom single resources: Registration of collections of custom resources; Ability to register resources of different types, such as: text, selection, text list, object list, on/off, and files; Importing resources and items through a JSON file; Listing registered resources; Listing the items in each resource; Importing new items into a resource; Exporting items and/or the structure of registered resources. Installation and configurationTo use the Resource Manager extension, access the contract where you want to install it, go to Blip Store, open the extensions tab, and search for Resource Manager. Once you find it, you must activate and install it. After it is activated and installed, the extension will be ready for use. User guideUsers with administrator permissions can perform all extension functions, including registering custom resources of different types and importing and exporting resources, items, and structures.Once the Resource Manager extension has been installed and activated, users with administrator permissions can use it immediately when they access it and will see the following screen:On the extension's home screen, all registered resources are displayed in a list. From this screen, you can perform various actions, such as registering a resource, copying its primary keys, editing or deleting it, or accessing each resource's data. You can also import new resources or use one of them as a reference when registering a new one through export. It is important to be careful when editing data and, especially, when deleting items. These actions are permanent. But don't worry—we will cover all of them in this tutorial.Also, watch this extension presentation video to learn a little more about it before continuing with the user guide: Resource Manager Extension - Blip - Presentation Usage examplesIn this section, you will see how to register a new resource customized to your needs. After it is created, it will be displayed in the resource list, and you can access it to manage its items, with the option to register new items as well.Registering resourcesStep 1) On the Resource Manager extension's main screen, click “Register Resource,” as shown below:After doing so, you will see a modal where you can register your resource, as in the example below:Now that the modal is displayed, it is important to fill it out according to your intended purpose.Step 2) Enter your resource name in the “Name” field. This will only be used so that you can view it in an organized way.Step 3) In the “Key” field, enter the name of the key you want to use in your resource. The input entered in this field will be used by the server to retrieve the content value.Step 4) After filling out the two previous fields, you must choose the type of resource to be created. It can be a collection (a collection of resources) or a single resource, as shown in the image:The way to register both types is very similar, but to avoid any questions, you can learn more about these two types in the following videos:Collection-Type Resource: Resource Manager Extension - Blip - Collection-Type ResourceSingle-Type Resource: Resource Manager Extension - Blip - Single-Type ResourcesStep 5) Next, you can add the desired fields to your resource, such as “Title,” “Key,” and “Type.” The “Title” field is only used for the name, the “Key” field is used by the server to retrieve the content value, and in the “Type” field you can choose the desired field type: text, selection, text list, object list, on/off, or file. As follows:Step 6) "To retrieve the information registered in the resources, simply use Blip's standard resource variable call format!Example:{{resource.keyOfYourRegisteredResource}}Note: How the variable is handled depends on the format created. Objects, strings, etc. are handled differently in Blip Builders/Studios." How does each field type work?All field types differ in some ways, but they have one characteristic in common: they can all be used.Text-Type FieldWhen you choose to register a resource with a text-type field, you can enter the desired text in the resource and later use this text in the smart contact by simply calling the key of the registered resource through the appropriate variable responsible for resource management in Blip. This type inserts text into the JSON.Selection-Type FieldWhen registering a resource with a selection-type field, you can enter the desired options in the resource. When registering the resource item, you can select one of the options provided during creation. This type inserts text into the JSON.Text List-Type FieldWhen registering a resource with a text list-type field, after registering it, simply click “Access data,” as instructed for all resources that require selection and later additions. Then click the edit button. A modal will open where you can add the elements to your list. Remember that this resource type inserts an array of texts into the JSON. If you need to add another element to the list, simply click Add:When you are finished, simply click the “Done” button, and your text list will be saved.After that, you will be able to view your list:Object List-Type FieldIf you want to register a resource with an object list-type field, you will insert an array of objects into the JSON. Once you select the type, the modal will expand and also display the object fields for you to fill out, as shown in the image:To fill out this information, simply follow what was presented previously and understand the field types. If you want to add another object, simply click “New field” inside the box associated with it, as shown below:On/Off-Type FieldThe On/Off field is a Boolean-type field, whose values can be true or false, active or inactive. If you choose to use it, you will insert a Boolean value into the JSON and can use it in several ways, such as defining whether you want to conduct a customer satisfaction survey at the end of the service.After entering the appropriate information and completing the registration, click “Access data” on the desired resource. You will then be able to enable or disable the field, resulting in true (enabled) and false (disabled), as in the example below:File-Type FieldIt is no secret that uploading a file to a drive and then editing it so that it can be used in Blip can be somewhat complicated. But now your problems are over! When you choose to register a resource with a file-type field, you can add the desired file and, once it is registered, use the link directly from Blip.After registering the file-type field, simply click “Access data” for your resource and click the pencil icon to edit it.A modal will then appear. Click the following button to add your file:Once you upload your file, you will have a link to it:Then simply click “Done.” The file will be registered, and the link can now be used.That's it! Now that you know the resource types, simply fill it out correctly to move on to the next step.Step 6) Now that the resource data has been filled out, simply review the information. If everything is correct, click “Done,” and your resource will be registered.Your resource will then be available in the viewing list. Registering itemsStep 1) To register items in your resource, click “Access data” on the desired resource, as shown in the image:Step 2) Then simply select the “Register Item” button:After clicking “Register Item,” you will see a registration modal containing the fields for the resource type you previously created.Step 3) Fill out the modal fields according to the desired item and click “Done,” as shown in the image below:You will then be able to view the registered item in its corresponding resource:Importing and exporting resources and itemsBy following this process, you can import resources and items through a JSON file, which may have been created by you or exported from our extension. To assist you, see the following tutorial: Resource Manager Extension - Blip - Import and ExportEven after watching the video, if you still have questions, simply follow these steps:Importing resourcesStep 1) On the main screen, click the “Import” button, as shown in the following image:Step 2) When you click “Import,” an import modal will appear, as shown in the image:You can add your JSON in either of the two ways shown: drag it into the modal or click the suggested link and select the desired JSON.Step 3) Once you add the desired JSON, you will have two options, “Cancel” and “Done.” If you want to stop the process, simply click “Cancel,” as shown in the image:If you do not want to cancel and want to continue with the import, simply click “Done,” as shown below:If your JSON is in the correct format, it will be imported successfully, and you will be able to view it:Importing itemsYou can use import files to import new items into the resource. They will then be processed and immediately added to your item list.Step 1) To import items into your resource, click “Access data” on the desired resource, as shown in the image:Step 2) Then simply select the “Import Items” button:After clicking “Import Items,” you will see an import modal. Simply drag your JSON into it or click the displayed link to add it.Step 3) Add your JSON to the modal, as shown below:If you selected the wrong file, simply click the trash can next to it to remove it. However, if your JSON is in the correct format, simply click “Done,” and your items will be added to your resource. See the following example:Exporting resourcesIn this section, you will learn how to export data from a resource so that you can use it elsewhere or import it into another resource at any time. You can export only the items, only the resource structure, or both. When you export, a JSON file will be created and a download will start automatically.Step 1) To export items from your resource, click “Access data” on the desired resource, as shown in the image:Step 2) Then simply select the “Export” button:Step 3) After clicking Export, you must choose what you want to export. Select the desired option: “Items and Structure,” “Structure only,” or “Items only,” as shown in the modal below:After that, you will be able to view the file in your downloads. ExtrasIn addition to what you have already seen in the tutorial, below are some basic examples of buttons that are also used.To delete a resource:To copy a resource's keys:To edit a resource:To visit the documentation: SupportIf you have questions or encounter any problems with the extension, contact us by email at blippartner@sharkdev.com.br or by phone at +55 (35) 99148-3887 Need more help? Explore our content at Blip Academy or Blip Community, watch tutorials on our YouTube channel or get your questions answered through our support channel 😃 Related articles Resources Module in Blip Creating interactive messages in WhatsApp How to reset users through Beholder? How to save human service history via Blip Integration with Google Drive Audience file configuration - Bulk notification sending