Skip to main content

Localized product descriptions

On this page we walk you step by step through creating a Workforce Flow that:

  • Generates product descriptions from a name, product features and product images
  • Translates these descriptions into multiple languages
  • Outputs the results to a CSV file

Localized product description flow overview Localized product description flow overview

Step 1- Create the form trigger
Link copied!

  • Create a new content flow and give it a label and description.

  • From the Action Library open the Manual triggers and drag a Form trigger to your flow.

Add the form trigger action used to start the flow

  • Click the Configure Input Form button and add the following fields:

    • A single line text field: Product name

    • A multi line text field: Product features

    • An image list field: Product images

Configure the form action with fields for the product name, features and images

Step 2- Add the Product description action
Link copied!

Use a content generation type action to generate a product description from the product name, features and images.

  • Drag the Product description action to your flow and connect it with the output of the form trigger.

  • Choose the model and optionally the brand voice, audience and locale to tune the output to your brand.

  • Enter a source locale. For example: en-GB.

Add the product description action

  • Set the Product name, Product features and Product images to the corresponding outputs of the Form Trigger.

Configure the product description action to use the product name, features and images from the form trigger

Step 3- Add the translation agent
Link copied!

Once the product description is generated, you need translate it into the languages you choose.

  • Open the Agents section and drag the Translation Agent to your flow. Connect it to the output of the Product description action.

  • Set the Text to translate to the output of the Product description.

  • Enter the Source Locale that you used to generate the product description in the previous step. In this example it's en-GB.

  • In Target Locales add all the locales that you want to translate the text into.

Add the translation agent and the locales that you want to generate the product description into

The Translation Agent

The output text will include the text in the source locale together with the translated text for each of the target locales.

Step 4- Output the result as a CSV file
Link copied!

In this example we'll output the product descriptions in each locale to a CSV file.

  • Open the Output section and drag the CSV Output action to your flow.

  • Connect the CSV Output to the Translation agent.

  • The Data field should be automatically populated, but if not then add Translated Text -> Entries from the output of the Translation agent.

The CSV file will contain the output of the translation agent

Try it out
Link copied!

The flow is now ready to run.

  • Click Run at the top of the window and enter the product details to use to create the product description.

Add the locales into which you want to translate the generated product description

The product description is generated and translated into your chosen languages. The generated text is then output to a CSV file. You can open the CSV file by clicking its icon.

The generated text is saved to a CSV file

Tip- Customize the CSV file
Link copied!

By default in this example, the text will be output using columns named "locale" and "value". You can change the labels for these columns in the CSV file.

To customize the CSV output, select the CSV Output action and choose "Configure Columns". Map the column names to the labels you want. In the example shown below, the column named "value" will now use a label of "Translated text".

Mapping the column names to more friendly labels in the CSV file