Customer info from remote system

Is it possible to have the Customer sidebar be populated by info from a remote api call instead of from local data? So we could make a call to our CRM with the email address as the key to get various information about the customer and display it in the sidebar?

You could add a new sidebar like this:


class SidebarCustom extends App.Controller
  sidebarItem: =>
    @item = {
      name: 'Custom'
      badgeIcon: 'templates'
      sidebarHead: __('Custom')
      sidebarCallback: @showCustom

  shown: ->
    @showCustom(undefined, true)

  showCustom: (el, load = false) =>
    @elSidebar = el if el

    return if !load

    console.log('sidebar data', @ticket)

      id:    "Custom_#{}"
      type:  'GET'
      url:   "#{@apiPath}/tickets/#{}"
      processData: true
      success: (data, status, xhr) =>
        console.log('endpoint data ', data)
        @elSidebar.html('<p>Custom information for customer id ' + @ticket.customer_id + '</p>')

App.Config.set('310-Custom', SidebarCustom, 'TicketZoomSidebar')

You might get problems when you requesting remote urls because of the CSP I guess.

not sure how to edit it properly atm. You could also think about to add a new controller and proxy your data through that alternatively.

For packages there are some small tutorials here