Customer Status is undefined

Asked
Active3 hr before
Viewed126 times

4 Answers

undefinedcustomerstatus
90%

After triggering a broadcast you can retrieve the status of that broadcast using a GET of the trigger_id resource,,Returns broadcast metrics by series (using the period and step in the request) and totals over the life of the broadcast

Example_snippet/controller/utility/_undefined.js/ <script type="text/javascript". . .
<script type="text/javascript">
    var _cio = _cio || [];
    (function() {
        var a,b,c;a=function(f){return function(){_cio.push([f].
        concat(Array.prototype.slice.call(arguments,0)))}};b=["load","identify",
        "sidentify","track","page"];for(c=0;c<b.length;c++){_cio[b[c]]=a(b[c])};
        var t = document.createElement('script'),
            s = document.getElementsByTagName('script')[0];
        t.async = true;
        t.id    = 'cio-tracker';
        t.setAttribute('data-site-id', 'YOUR_SITE_ID');
        t.setAttribute('data-use-array-params', 'true');
        t.src = 'https://assets.customer.io/assets/track.js';
        s.parentNode.insertBefore(t, s);
    })();
</script>
load more v
88%

Pull requests ,My api is sending back status code 209 to denote a successful patch request, But when i check request

Example_snippet/controller/utility/_customer.js/ if (response.status === 20. . .
    if (response.status === 209) {
       this.snackbar.open('Updated :)', 'X', {
          duration: 5000
       });
    } else {
       this.snackbar.open('Unknown Error', 'X', {
          duration: 5000
       });
    }
    },
72%

The stack trace leads to the New Relic snippet, The code is obfuscated and the stack trace is not very precise but it appears to be related to some event handler bound to XHR events

Example_snippet/controller/utility/_customer.js/ TypeError: t.params is undefin. . .
TypeError: t.params is undefined
load more v
65%

If I debug the code then in endDate I can see the value but in CustomerStatus I am getting Undefined and as a result, nothing is being displayed on HTML, The logic is if the customer has end date then the customer is In-Active or else the customer is Active What am I doing wrong?,Because line of code this

Example_snippet/controller/utility/_customer.js/ this.endDate = this.sampleData. . .
this.endDate = this.sampleData != null ? this.sampleData.customerStartDate : null;