System Admin and Configuration

Get Involved. Join the Conversation.

Topic

    kate James
    Standard textsAnswered
    Topic posted June 6, 2019 by kate JamesRed Ribbon: 250+ Points 
    69 Views, 13 Comments
    Title:
    Standard texts
    Summary:
    Standard texts and Conditional Statements
    Content:

    Hi, 

    I have a new requirement to display the customer's preferred name if it is not empty, but if Null the first name should be displayed

    I am wondering if there is a way to check the preferred name in standard text?

    Currently we use a variable to get user name from the object

    Hi $contacts.name.first,

    What I want

    Hi if($contacts.c$preferredname is NULL)

    I think it might not be doable in Standard text but templates

    Kind regards,

    Kathy

    Version:
    19A

    Best Comment

    Sebastiaan Draaisma

    I found a small mistake in my code.

    I now created the same custom field as yours and made a small change to my original code and now it works as it should :-)

    Comment

     

    • Sebastiaan Draaisma

      Hi Kathy.

      No, this is not possible through a standard text. It may be doable in a message template through conditional sections but this would not be visible in the thread. If this text should be made visible in the message thread then an alternative could be the use of a javascript API as the message thread and alternative first name is available for read & write. The js API would be running in the background on the workspace in a browser component and can best be compared with an advanced workspace rule.

      http://documentation.custhelp.com/euf/assets/devdocs/unversioned/Connect_Desktop_Integration_JavaScript/Default.htm

       

       

      • kate James

        Thanks Sebastiaan,

        Is there a way to copy one custom field value into another custom field while creating a contact? i.e events or rules

        Would you suggest to use system attributes and see if I can achieve this?

        regards,

        Kathy

        • Sristy Arya

          Hi Kate,

           

          This is not possible with Workspace & Business Rule. This can be done with help of an Addin.

          Thanks

          Sristy

    • Sebastiaan Draaisma

      Yes this can be done with js API and CPM. Where a js API is like an advanced workspace rule, a CPM is like an advanced business rule.

      When working with a CPM, the copy will happen after the record get's updated where a javascript API will make the change when the record is being opened in the workspace. So, it's just a matter of preference/requirement which one you would take.

    • Sebastiaan Draaisma

      Let me know if you need assistance with the js API or CPM

      • kate James

        Hi Sebastiaan, 

        Thanks so much for the support !

        Can you please let me know how to achieve this using CPM? I am new to Oracle Service Cloud and struggling with this request.

        So far I've been looking this tutorial - http://cxdeveloper.com/article/cpms-101-introduction-custom-process-models

        regards,

        Kathy

         

    • Sebastiaan Draaisma

      Ah yes, if you are new to OSVC than you could definitely use some help when it comes to CPMs.

      If you could provide me with the field name that you want to copy (for ex. incidents.c$customfield) and the field you want to have this copied to, then I will be able to create a working CPM example for you.

      • kate James

        Just to give a little bit of background we have an integration bringing data from one system to OSVC.

        However, sometimes the preferred name is empty. The requirement is to copy the first name whenever the preferred name is blank.

        Copy FROM contacts.first_name TO custom field for preferred name :contacts.c$preferredname

        Thank you!

    • Sebastiaan Draaisma

      Totally doable. Thanks for the aditional info. I will get back to you when it's done. I will do it today when I have a spare moment :-)

    • Sebastiaan Draaisma

      This should do the trick. It's a basic example with no aditional test performed. You can test this in your test site. Send me a private message if you need detailed instructions on how to implement the CPM.

    • kate James

      Hi Sebastiaan,

      Please find the file attached.

      Thanks

       

       

    • Sebastiaan Draaisma

      I found a small mistake in my code.

      I now created the same custom field as yours and made a small change to my original code and now it works as it should :-)