Genesys Cloud (formerly PureCloud)

Discussion Thread View
  • 1.  Data Action Code

    Posted 11-19-2020 12:43
    Hello everyone,

    We have an integration done with our Salesforce instance to create new cases for inbound chats. For this, we have created data actions. However, we are having issues in some instance where the cases fail to be created. I think it is due to the fact that we fields that would not need to have an input all the time. The Login field is the one that will define if the plan related field will be filled.
    Also, if the Login is passed, it does not mean that the plan related fields would have input because customers can have a login without active or past plan (if tat makes sense). The data actions is written as follow:

    "Origin": "$!{input.Origin}",
    "Case_Origin_Reporting__c": "$!{input.Origin}",
    "Language__c": "$!{input.Language}",
    "Language_Code__c": "$!{input.LanguageCode}",
    #if("$!{input.Login}" != "")
    "Login__c": "$!{input.Login}",
    "RecordTypeId" : "$!{input.RecordTypeId}",
    "Status": "$!{input.Status}",
    "InteractionGUID__c": "$!{input.ConversationId}",
    "Account_Service_ID__c": "$!{input.SSTKUserId}",
    "WA_Page_Site__c": "$!{input.PageSite}",
    "WA_Page_Type__c": "$!{input.PageType}",
    "WA_Page_URL__c": "$!{input.PageUrl}",
    "WA_Page_Language__c": "$!{input.PageLanguage}",
    #if("$!{input.SSTKUserId}" != "")
    "WA_Sstk_User_ID__c": "$!{SSTKUserId}",
    "WA_Most_Recent_Plan_Product_Category__c": "$!{input.PlanProductCategory}",
    "WA_Most_Recent_Plan_Auto_Renewal__c": "$!{input.PlanAutoRenewal}",
    "WA_Most_Recent_Plan_Expiration_Date__c": "$!{input.PlanExpirationDate}",
    "Description": "$$!{input.Description})",
    "InteractionURL__c": "$!{input.ConversationId}",
    "Subject": "Shutterstock Chat"

    Would anybody have any insights on how to write the correct code for the data action?

    Thank you,


    Louis D.