Handling remote system response

Having received a remote system's response, you can perform the following actions:

  1. Pass the page link to the operator
    For instance, to open a created or edited contractor card in the CRM.
  2. Modify the values of the visitor's additional fields
    For instance, record the obtained identifier for further use.
  3. Write an additional operator field
    The data that is attached to an operator. For instance, authorization keys.

Response analysis

You can use the data that the remote system returned for forming a link to the page and for writing values in additional visitor fields. To that end, use the [:REQUEST:] structure (An opening bracket with colon, followed by the expression containing the request to the response elements, a colon and a closing bracket). The request syntax differs depending on format.

In the Response type dropdown menu of the Response block select the format returned by the remote system. Netrox SC is capable of working with three response formats:

  1. JSON format data
  2. XML format data
  3. Simple text

JSON response analysis

The / (forward slash) is used for switching between elements. Depending on the structure, either a key line or an element's numeric index in the value set are used (with zero as reference point).

For instance, we get the following structure in the response:

    "things" : [
            "id"      : 1,
            "color"   : "red"
            "id"      : 2,
            "color"   : "green"
            "id"      : 3,
            "color"   : "blue"

In order to obtain access to the value of the "color" property of the second element in the "things" list, the following expression will be required: [:/things/1/color:]. "green" will be the result.

XML response analysis

In working with XML, the XPath request language is used (more on XPath in Wikipedia.

If the response contains the following structure:

    <thing id="1" color="red" />
        <text>Some Example Text</text>

In order to get the value of the "color" attribute of the "thing" element, we will need: [:/things/thing/@color:] (The result: red)

In order to obtain the content of the "text" element of the "superthing" element: [:/things/superthing/text:] (The result: Some Example Text)

Text response analysis

If the "Text" response type is selected, only one expression is available for use: [:text:], which will provide the entire contents of the response body.

Page link

In the Response block check the Open URL box and in the ensuing entry field type in the address of the page whose link the operator should see.

Modifying the additional information field values

Visitor fields

In order to assign a value to one or several visitor fields, check the Set visitor field value box. The list of fields to set values to will appear. Visitor fields available for writing.

To add a field, press "+ Field" above the table to the right. In the appearing line select the field for setting the value in the dropdown list and specify the value formation template.

To delete an element, move the mouse cursor to the corresponding line and press the appearing "Delete" button.

Operator fields

To set a value for an additional operator field, check the Set operator field value box. 10 additional fields attached to the site are available for data storage.

All rights reserved. Copyright © 2020 Netrox SC
Host CMS