Concatenating Text Variables

  • Updated

NEW For more powerful tools consider the new Zingtree CX Actions: Transformation Functions and Script Node instead.

Zingtree has built a handy webhook you can use to combine several text (string) variables into a single variable. You just need to add a new Webhook and install it into the node where you want the operation to take place. Here's how to set it up:

Step 1: From the Apps & Integrations menu, choose My Apps:

This page lists all of the Apps you have presently installed. You can edit, duplicate, or delete any of them from the list. In the Uses column, you can easily see how many trees an individual App is being used. Click on the number in the Uses column to see which trees are using that App.

Adding a new App

Click the Install App button. You'll then see this screen:

  1. Give the Webhook a name (like "string catenator"), and enter this for the webhook URL:
    https://zingtree.com/apps/webhook/lib/stringcat.php

 The end result looks like this:

 

Step 2: Call the webhook from your tree

Here's an example of creating a variable named url by catenating a variable called domain with some text:

  1. Open your tree, and edit the node where you want the operation to take place.
  2. Under the Apps / Webhooks section, click Add App / Webhook.
  3. Pick the Webhook you added previously (String Catenator, for example).
  4. In the Message Data area, enter something like this:
    &result=url&string1=#domain#&string2=/faq.php
    - The result= part names the new variable (url).
    - The string1=, string2= are other variables or text used to make the final variable.
    - #domain# inserts the value of a variable named domain.

  5. Save the changes to the node.

    Your edits should look something like this:

mceclip1.png

 

Now just use #‌url# anywhere you want to show the new variable.

Note: You can include up to 5 strings to make one catenated string. The string parameters may need to be URL Encoded.

Was this article helpful?

1 out of 2 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Ticket

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community