Help Center

Field Form Codes

Pyrus provides various tools for automating processes — Pyrus API, Extensions, scripts, bots, subprocesses, linked forms, and more.

To fully integrate these tools into Pyrus, form and integration developers can access form fields to retrieve or set their values.

  • Extensions use form fields to exchange data between an external service and a Pyrus form.
  • Bots and scripts access form fields to read their values and perform specified actions based on them: sending messages, moving tasks to the next stage, closing or reopening them, etc. At the same time, one bot can work in multiple forms, accessing fields with the same unique identifier code.
  • In Pyrus forms, fields are used to exchange data between two forms, such as in subprocesses, or to transfer data from one form to another, as in linked forms.

In all of these cases, to correctly identify the required field, we recommend using the field code.

Pyrus Tip: In related forms, the field value from the main form is copied to the subform field if the codes in these fields match.

Code — a constant field identifier

There are three ways to identify a form field.

  • By field name — visible to users and can be changed by admins in the form template settings.

  • By ID — a unique numerical field identifier. The ID is not available for editing by admins and can only be changed when updating the platform.

  • By field code — a string identifier that users do not see, but can be changed by admins. It is important to note that the code is retained when renaming the field or changing the ID.

  • Field code in extensions. To publish an extension, the developer sets up a correspondence between information from an external system and Pyrus form fields in their personal account, allowing data exchange between the two services. To do this, codes and field types must be specified.

  • Field code in forms. Specifying field codes in the form field settings makes it more convenient to connect various extensions to the form.

For example, you install the Telegram extension in the Customer Request form, so that messages from customers in the messenger are converted into Pyrus tasks. You can specify the codes for the Subject and SenderName fields for the Subject and Sender Name fields, and then establish a correspondence between these fields and the data of the client who writes in Telegram.

Now, if you want to connect another messenger to this form, such as WhatsApp, Pyrus will automatically suggest setting the same correspondence between the information from WhatsApp messages and the form fields.

  • Field code in bots and scripts. Specifying the field code in the field settings ensures the correct operation of the bot, even if the field name or type has changed. At the same time, the bot can work immediately in several forms where there are fields with the same codes.

For example, a Contact field is filled in by the responsible person in two forms — Customer Request and Feedback Management, so the field in both forms has the same ResponsiblePerson code. You can create a bot that will generate a report on the workload of employees within the framework of both forms. To do this, you need to use one bot for both forms — it will continue to work even if the field is renamed or if the ResponsiblePerson code is transferred to another field in any of the forms.

Example of accessing a form field by code in Pyrus scripts:

form.onChange(['CallStartTime', 'CallEndTime'])
    .setValues(['CallDuration'], state => {
        const [start, end] = state.changes;
        if (!start || !end)
            return null;
        const duration = end.value - start.value;
        return duration;
    });

List of field codes for the Pyrus platform

Pyrus supports a number of the most commonly used field codes in forms. These codes are used in extensions.

Note: if you are using your own codes, we recommend creating them in CamelCase format.

Field CodeField NameAllowed Field TypeService DeskCRMRecruiting and HRDocument Flow
AttachmentsAttached FilesFiles✔️✔️✔️✔️
EdiDocumentsToSignDocuments to signFiles✔️
EdiContragentRuCounterparty for document flowOrganization✔️
EdiOrgDetailsRuOrganization details, on behalf of which the document will be sentReference to the catalog type EdiSendersRU✔️
EventDateDate and time of eventTerm✔️✔️
CallDurationCall duraionDate, time✔️✔️✔️
CallEndTimeCall end timeTime, phone✔️✔️✔️
CallStartTimeCall start timeTime, phone✔️✔️✔️
CallStatusCall statusText field✔️✔️✔️
PhoneNumberFromClient phone numberPhone✔️✔️✔️
PhoneNumberToClient phone numberPhone✔️✔️✔️
ResponsiblePersonResponsible personContact✔️✔️✔️
MessageMessageText field✔️
SubjectSubject of inquiryText field✔️
LeadNameDeal nameText field✔️
LeadStatusDeal statusSelection field✔️
PricePriceMoney field✔️✔️
PageUrlLink to the page where the message came fromText field✔️✔️
PostUrlLink to the post related to the messageText field✔️✔️
RatingEvaluation of serviceSelection field✔️
RatingCommentRatingCommentText field✔️
RatingDateDate of ratingDate field✔️
SenderNameName of senderText field✔️✔️✔️
SenderEmailAddress of senderEmail, text field✔️✔️✔️
SenderAccountUrlLink to sender profileText field✔️✔️
UserBrowserUserBrowserText field✔️

The list is constantly updated, so if you are developing form templates, bots, or extensions and have not found suitable field codes, submit a request to create a new code. Describe the scenarios in which you plan to use the code and specify:

  • the name, purpose, and field type;

  • the required code.

Was this article helpful?