App Builder - User Guide

  1. Home
  2. Docs
  3. App Builder – User Guide
  4. General
  5. Action

Action

This function is included in the settings section of almost widgets under the name “Action button” or “Choose action”. Ex as: Slideshow, Banners, Text, Button, Heading, Countdown, ect…

HTTP Request

Note

Use in App Builder version 3.8.6 or higher

Video:

Content API

  • Url: Required
  • Method: Required
  • Headers: Optional
  • Body: Optional
  • Messages: Optional

Url

Setting query parameters in url

Can use get dynamic data to setting query parameters

Method

Supported with 5 types method

Headers

Noted: If you want token of user when login, you must get data dynamic

Body

Frequently used when Method value is not “GET”

Content in Body

  • Type
  • Data
Type
  • none: Data body will be empty
  • form-data: Value Content-Type in Header have default is “multipart/form-data”
  • x-www-form-urlencoded: Value Content-Type in Header have default is “application/x-www-form-urlencoded”
Data
With data map
With data list

Messages

It will be setting if you want show message after run API

A message includes:

  • Conditional: Setting conditional OR & AND
  • Content message: With 2 type message is Success or Error to show text message of field Content message

Note

Will check each conditional in turn from the first message to show the message after Rest API was complete

Variables

Use in

  • Merge tag in Conditional
  • Content message field
Setting Merge tag in Conditional
Setting Content message field
{statusCode}

Will return is 200 or 401 or 403

Value is 200 when Rest API return success, other cases is error

{data} and {data.}
Result of rest API is call {data}

If you want get result, can call key {data}.

If you want get child value of result, can call key {data.}

Result data: “Text”, want show message “Category: Text” => Setting content message “Category: {data}”
Result data with map type: {“code”: “rest_no_route”,”message”: “No route.”}, want show message “No route.” in this data => Setting content message “{data.message}”

Get dynamic data in Rest API

Use in Params, Headers and Body of Rest API

Data global

It is data user or token when login account

Use “{}” to setting with keys:

  • {token}
  • {ID}
  • {user_login}
  • {user_nicename}
  • {user_email}
  • {display_name}
  • {first_name}
  • {last_name}
  • {user_url}
  • {avatar}
  • {loginType}
Ex: Setting Authorization in Headers with token of user login
Ex: Setting value email in Body with user_email of user login

Data form

Usually used in widget Form of App builder when there is data form.

Data form in widget Form with keys “you-name”, “your-email” and “your-subject”

Use “[]” to setting key

Examples

Logout account

Go to product list with title screen

Go to product list with category id

Go to product list with Tags filter

Noted: tag value can set multi tag ids

Go to product list with Brand filter

Was this article helpful to you? Yes No 4

How can we help?