Legacy Dev Forum Posts

 View Only

Sign Up

How can obtain only one field of Chat.Guest.customFields

  • 1.  How can obtain only one field of Chat.Guest.customFields

    Posted 06-05-2025 19:10

    Gladys | 2019-10-17 15:08:28 UTC | #1

    chat.guest.customField bring this information

    context. firstName, valor1] [context. lastName, valor2] [context. phoneType, valor3] .. We need save only the "valor3", is it possible?![chat_info|690x387


    tim.smith | 2019-10-17 14:24:48 UTC | #2

    I'm not sure what you mean. Where/how are you trying to access the fields? What do you mean by "save" it?


    Gladys | 2019-10-17 14:47:04 UTC | #3

    Hi Tim I need recover only one field (in this case I need the email address) of the customer field, for save it on a variable to use for assemble a URL for open the contact sheet on the script. The url for example ateran@gmail.com">https://192.168.2.34/view.php?id=ateran@gmail.com


    tim.smith | 2019-10-17 15:09:02 UTC | #4

    If you're trying to access participant attributes (i.e. the data set when creating the chat), you can add a script variable of the same name and set it as an input property to access the participant attribute.


    BartOShea | 2019-10-29 15:10:17 UTC | #5

    Hi Gladys,

    I was trying to achieve something similar. I was able to access my email field by using Chat.Guest.customFields[0].value. Just change position 0 to the position you require.

    Hope that helps. Bart


    anon39326996 | 2019-10-29 18:34:38 UTC | #6

    Within architect, can also always use Get Participant Data action to retrieve the value of a custom field. That's what works across all media types.

    The syntax Chat.Guest.customFields[0].value is specific to chat, but doesn't need to be used at all. Keep in mind that the position of the email field may change, so if you are leveraging the short hand notation, you would need to loop through the custom fields to find the right key first rather than guessing at the position. That's why I personally think it's easier to just use the Get Participant Data action.


    Gladys | 2019-10-31 21:14:51 UTC | #7

    thanks BartOShea I going to test with this manner.


    system | 2019-12-01 21:14:54 UTC | #8

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 6269