Salesforce Lightning Aura Components

Salesforce

How to get Agent configured and assigned Omni-Channel Capacity using Salesforce Omni toolkit API?

getAgentWorkload() from Omni toolkit can be used to get Agent configured and assigned Omni-Channel Capacity. Sample Code: <aura:component implements="flexipage:availableForAllPageTypes" access="global" > <lightning:omniToolkitAPI aura:id="omniToolkit" /> <lightning:card> <lightning:button label="Get workload" onclick="{! c.getAgentWorkload }" ....

Salesforce

Viewing a Record using Lightning Data Service force:recordData

Component:<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >    <aura:attribute name="record" type="Object" description="The record object" />    <aura:attribute name="recordError" type="String" description="An error message bound to force:recordData" />    <lightning:card>        <force:recordData aura:id="recordLoader"                          recordId="{!v.recordId}"                          fields="Subject, Description"                          targetFields="{!v.record}"                          targetError="{!v.recordError}"                          recordUpdated="{!c.handleRecordUpdated}"                          ....

Salesforce

How to set Omni-Channel Status from Button using Lightning Component in Salesforce?

Sample Code:Aura component: <aura:component implements="flexipage:availableForAllPageTypes" access="global" >    <lightning:omniToolkitAPI aura:id="omniToolkitId" />    <lightning:card>        <lightning:button                           label="All Channels"                           onclick="{!c.setOmniChannelStatus}"                           variant="brand"                          aura:id="All">        </lightning:button>        <lightning:button                           label="Break"                           onclick="{!c.setOmniChannelStatus}"                           variant="brand"                          aura:id="Break">        </lightning:button>    ....