Get string value from object
Function: Get string value from object
This action allows you to easily extract a specific piece of text (a "string value") from a larger collection of information, often referred to as an "object." You simply tell the platform which type of object you're working with and which specific detail you want to retrieve. The extracted text is then saved into a new variable, ready for you to use in other parts of your application.
Input,
- Object: This is the main collection of data you want to work with. Think of it as a record, like a customer profile, a product listing, or an order detail. You select the specific object you want to get information from.
- Data format: This defines the structure or type of the 'Object' you've selected. For example, if your object is a customer's record, the data format would be 'Customer'. This helps the platform understand what kind of information (attributes) is available within that object.
- Data format attribute: This is the specific field or property within the 'Object' whose text value you want to extract. For instance, if your object is a 'Customer' record, you might choose 'Email Address', 'First Name', or 'Phone Number' as the attribute.
Output,
- Data name: This is the name you give to the new variable that will store the extracted text value. By default, it will be named
FOUND_DATA_VALUE
, but it's a good practice to rename it to something more descriptive, likeCustomerEmail
orProductName
, to make your application easier to understand.
Execution Flow,
Real-Life Examples,
-
Example 1: Getting a Customer's Email Address for a Welcome Email
- Inputs:
- Object: The specific
Customer Record
for a newly registered user. - Data format:
Customer
- Data format attribute:
Email Address
- Data name:
NewCustomerEmail
- Object: The specific
- Result: The email address (e.g., "[email protected]") is extracted from the customer's record and stored in a variable called
NewCustomerEmail
. This variable can then be used in an action to send a personalized welcome email.
- Inputs:
-
Example 2: Retrieving a Product's Short Description for a Catalog Display
- Inputs:
- Object: A
Product Item
record (e.g., for "Wireless Headphones"). - Data format:
Product
- Data format attribute:
Short Description
- Data name:
ProductSummary
- Object: A
- Result: The text "Premium sound, comfortable fit, 24-hour battery life" is extracted from the "Wireless Headphones" product record and saved into a variable named
ProductSummary
. This summary can then be displayed on a product listing page or in a search result.
- Inputs:
-
Example 3: Accessing an Order's Current Status for a User Notification
- Inputs:
- Object: An
Order Detail
record (e.g., for "Order #54321"). - Data format:
Order
- Data format attribute:
Status
- Data name:
CurrentOrderStatus
- Object: An
- Result: The text "Shipped" is extracted from "Order #54321" and stored in a variable called
CurrentOrderStatus
. This variable can be used to send an SMS notification to the customer about their order's shipping status.
- Inputs: