Legacy Dev Forum Posts

 View Only

Sign Up

Atritutos predictive engagement work flow

  • 1.  Atritutos predictive engagement work flow

    Posted 06-05-2025 19:11

    msalas1 | 2022-01-05 12:36:40 UTC | #1

    good morning The question is, what code should be used in the javascript fragment to be able to save custom attributes with predictive engagenment, to later be able to visualize them in AttributeLists or Attributes to obtain a session of the path in the architect workflow?

    since in tests carried out with a fragment like this, there is no data in AttributeLists or Attributes to obtain a session of the path in the architect workflow

    {

    "AttributeLists": [

    ],

    "Attributes": [

    ],

    this is the javascript snippet used

    /* fragmento / var apdtemporizador = setInterval(function() { if(document.readyState === "complete") { clearInterval(apdtemporizador); var apdscript = document.getElementsByTagName("script")[0]; var apdfragmentoPredictiveEngagement = document.createElement("script"); apdfragmentoPredictiveEngagement.text = "(function(a,t,c,l,o,u,d){a['genesysJourneySdk']=o;a[o]=a[o]||function(){(a[o].q=a[o].q||[]).push(arguments)},a[o].l=1new Date();u=t.createElement(c),d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;u.charset='utf-8';d.parentNode.insertBefore(u,d)})(window,document,'script','https://apps.mypurecloud.com/journey/sdk/js/web/v1/ac.js','ac');ac('init','79a2397c-74b7-4268-90bd-b0d6721b08b2',{region:'use1'});if(document.URL=='https://seguros.sura.cl/'){ac('destroy');alert('Información de seguimiento eliminada')}else{ac('pageview',{location:location.href,title:document.title+' ('+location.href+')'})};ac('forms:track','form',{captureFormDataOnSubmit:true,captureFormDataOnAbandon:true})"; apdscript.parentNode.insertBefore(apdfragmentoPredictiveEngagement, apdscript); }}, 100); /fragmento/ /* Prueba obtener informacion de input de formulario con timer*/ document.onclick=apdevaluarClick; function apdevaluarClick(evento){ /* Script para elementos de formulario rut, dv, email y telefono */ if (location.pathname == '/movilidad/seguroxkm') { if(evento.target.id=="rut" && evento.target.tagName=="INPUT"){ ac("identify" , "mgomez@e-contact.cl" , {givenName:"Mauricio Gomez" , email:"mgomez@e-contact.cl" , cellPhone:"987654321"}); ac("record","usuarioidentificado") }}};


    system | 2022-02-05 12:37:03 UTC | #2

    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: 13125