<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by anonymous on Medium]]></title>
        <description><![CDATA[Stories by anonymous on Medium]]></description>
        <link>https://medium.com/@anonymoususer123?source=rss-b14290ea3fe5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2VKL-3ODm41u7kpPXOhnXA.jpeg</url>
            <title>Stories by anonymous on Medium</title>
            <link>https://medium.com/@anonymoususer123?source=rss-b14290ea3fe5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:40:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anonymoususer123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Update AWS RootUser Email Address for Service Cloud Voice with Amazon Connect]]></title>
            <link>https://medium.com/@anonymoususer123/update-aws-rootuser-email-address-for-service-cloud-voice-with-amazon-connect-02b71172c47a?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/02b71172c47a</guid>
            <category><![CDATA[service-cloud-voice]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-connect-services]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sat, 05 Jul 2025 06:53:37 GMT</pubDate>
            <atom:updated>2025-07-05T06:53:37.983Z</atom:updated>
            <content:encoded><![CDATA[<p>There are times when the users with the rootuser email access are no longer part of the project.It can be a timetaking process to have the email updated by reaching out to Salesforce and then they updating the RootUser Email address from their backend tools.</p><p>Thanks to the new Connect REST API request from salesforce that helps in updating the root user email of a specific AWS account related to a Salesforce Org by ourself.</p><p>Let’s see how this works.</p><p>Every Org where there is Service Cloud Voice with Amazon Connect enabled will have a dedicated AWS account created from Salesforce’s Master AWS Account. We can check for the AWS Account ID and the rootemail associate to the AWS account of a Salesforce Org by querying for the Sobject : ConversationVendorInfo.</p><pre>SELECT DeveloperName, AwsAccountKey, AwsRootEmail FROM ConversationVendorInfo</pre><p>The Developer Name will be like : SERVICE_CLOUD_VOICE<br>Field AwsRootEmail will have the Email address that is no longer accessible.Now let’s go through the steps to be followed to have the RootUserEmail updated.</p><h4>Steps to be followed while using WorkBench. <br>API Version : 64.0 and above</h4><p>Step 1:</p><p>Initiating the Connect API Request to update the Root Email.</p><pre>Request Type : POST<br><br>Header : /services/data/v64.0/connect/voice/root-email-address-update/start<br><br>Body : <br>{<br> &quot;emailAddress&quot;:&quot;&lt;Email address which is accessible&gt;&quot;<br>}<br><br><br><br>Success Response : <br>message: AWS root user email address change successfully initiated.<br>Check the newemail address for a message from AWS containing a <br>verification code and steps on how to complete the address change.</pre><p>Step 2:</p><p>There will be a verification code shared to the new Email address. Make a note of the code as it will be used in the next Step.</p><p>Step 3:</p><p>Confrming the Root User Email update.</p><pre>Request Type : POST<br><br>Header : /services/data/v64.0/connect/voice/root-email-address-update/accept<br><br>Body : <br>{<br> &quot;emailAddress&quot;:&quot;&lt;Email address which is accessible&gt;&quot;,&quot;otp&quot;:&quot;&lt;Verification Code&gt;&quot;<br>}<br><br>Success Response :<br>message: AWS root user email address successfully changed.</pre><p>Query for the ConversationVendorInfo and observe that the AwsRootEmail field also now gets updated.</p><p>Happy Developing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02b71172c47a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Cloud Voice — Unified Routing]]></title>
            <link>https://medium.com/@anonymoususer123/unified-routing-in-service-cloud-voice-ad0cb454cc82?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad0cb454cc82</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[service-cloud-voice]]></category>
            <category><![CDATA[amazon-connect]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sun, 25 May 2025 12:54:53 GMT</pubDate>
            <atom:updated>2025-05-25T12:56:02.837Z</atom:updated>
            <content:encoded><![CDATA[<p>Finally Salesforce for Service Cloud Voice with Amazon Connect &amp; Service Cloud Voice for Partner Telephony with Amazon Connect is now using Omni as the only Routing Engine bypassing the Amazon Routing Engine and the 20 seccond Push Time Out (Hard Limit from Amazon)</p><p>Thanks to the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContactRoutingData.html#API_UpdateContactRoutingData_RequestSyntax"><strong>UpdateContactRoutingData</strong></a><strong> </strong>API from Amazon Connect that makes the Unified Routing achievable.</p><p>Let’s dive into knowing this UpdateContactRoutingData API and understand how it is helpful.</p><blockquote>The API’s request body can accept the below fields/parameters.<br><a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContactRoutingData.html#API_UpdateContactRoutingData_RequestSyntax">QueuePriority</a> , <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContactRoutingData.html#API_UpdateContactRoutingData_RequestSyntax">QueueTimeAdjustmentSeconds</a> &amp; <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContactRoutingData.html#API_UpdateContactRoutingData_RequestSyntax">RoutingCriteria</a></blockquote><blockquote>NOTE : In order to route a contact, it must first be placed into a queue; in order to offer the contact in an Agent’s Contact Control Panel (CCP) , the agent must have that queue in their routing profile and be in an available state for accepting the call.</blockquote><p>The RoutingCriteria field plays the key role. Using the RoutingCriteria field , the Agent ARN is passed from Omni and it instructs the Amazon Routing Engine to route a Contact to the requested agent. In short, this is the heart of Unified Routing.</p><h3>A Quick Travel to the Past……………</h3><p>Before Unified routing for Service Cloud Voice , the Omni Routing Engine was used by invoking an Omni flow from the Amazon Contact flow (using <a href="https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_lambda_invoketelephonyintegration.htm">InvokeTelephonyIntegration API Lambda Function</a> ) and find a desirable queue in Salesforce. Due to the Queues mapped between Salesforce &amp; Amazon , the Queue ARN is passed to the Contact Flow and by using the Set Working Queue and Tranfer To Queue blocks in the Contact Flow, the cotact will be moved to the Amazon Queue. BUT finally the routing decisions to an agent will be made on the Amazon Side only by the Amazon Routing Engine.</p><p>A peak into the understanding of how the actions take place in non unified routing</p><blockquote>Refering the Sample flows :</blockquote><blockquote>Sample SCV Inbound Flow<br>Sample SCV Omni-Channel Subflow — Basic routing with Case Creation.<br>Sample SCV Callback Subflow<br>Sample SCV Transcription Subflow with Contact Lens</blockquote><blockquote>A short explaination of what happens with the above flows:</blockquote><blockquote>&gt; End user calls the contact center number via their mobile<br>&gt; The contact flow attached to the contact number starts i.e.“Sample SCV Inbound Flow”<br>&gt; The contact flow makes a request to create a voice call record in Salesforce via the “InvokeTelephonyIntegrationApiFunction Lambda Function”<br>&gt; The Salesforce passes the created voice call record id to the lambda block as a success response and the next blocks on the contact flow gets executed<br>&gt; Set a Queue as the Working Queue and transer to a subflow “Sample SCV Omni-Channel Subflow — Omni Routing With Case Creation”<br>&gt; Invoke The Omni Flow via the InvokeTelephonyIntegrationApiFunction Lambda Function <br>&gt; There will be response from the Omni Flow to the Lambda Block and save the results<br>&gt; The working queue is set as the result from the Omni flow and the subflow “Sample SCV Callback Subflow” is started<br>&gt; Checks are made on the Queue Stats if the agents are present , the subflow “Sample SCV Transcription Subflow With Contact Lens” starts<br>&gt; The Transcription and Recording behaviour are set<br>&gt; The contact is transfered to the last Set Working Queue<br>&gt; Later the Default Customer Queue Flow starts<br>&gt; The Available agent who is also part of the Queue that the contact is waiting is determined as the desired agent to pick the call.<br>&gt; The call is routed to the Agent’s CCP on Amazon level.<br>&gt; Due to the integration beteween Salesforce and Amazon CCP via a connector on the Omni , when there is a contact assigend on the Agent’s Amazon CCP certain events run and create the AgentWork.<br>&gt; If the call is not accepted via the Omni in the 20 second timelimit since the contact was routed to the Agent’s CCP , the Workitem will be missed and the contact will be missed on Amazon Agent’s CCP level too.<br>&gt; After the agent work is accepted on Salesforce , an event is listented via the connector and it communicates to CCP to accept the call on CCP level .<br>&gt; Once the call accept is success on the AWS CCP level too , the Default Agent Whisper flow starts.<br>&gt; On the Customer end , the Default Customer Whisper Flow starts.<br>&gt; After both the whisper flows complete on Agent and Customer side , the call will be connected.</blockquote><p>Here the final decision of routing to an agent was decided on the Amazon Level and we have the hard 20-second time limit for the call to be accepted once the contact is routed to an Agent on CCP level. Also there is dependency on the network latency to pass the events related to the call is accepted on Omni and the same to be accepted on Amazon CCP. In a race condition situations like the Call was routed to an Agent’s CCP and 15 seconds passed for the agent to accept the call on the Omni,though the Voice Call was accepted on Omni; in the last moments the request of accept will be passed to Amazon and by the time the contact is being accepted on CCP , it can be missed on Amazon and routed to another Agent. The to and fro communications can run into race conditions with including latency in the network and there can be many problems. <br>Hence Unified Routing can be a better solution by having only One Routing Engine.</p><h3>Let’s get back to the Unified Routing…..</h3><p>As we now have UpdateContactRoutingData API, we now can completely rely only on the Omni Routing engine. The approach here is that we now use the Omni Routing Engine to find a required agent based on <br>Queue — Least Active or Most Available Omni Routing<br>Direct-to-Agent Routing<br>Skill Based Routing</p><blockquote><em>One of the approach for Unified routing :</em></blockquote><blockquote>Create the voice call record from the Contact Flow.<br>Set a global queue as the working queue.<br>Set the routing criteria.<br>Invoking the Omni Flow from the Contact Flow using <a href="https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_lambda_invoketelephonyintegration.htm">InvokeTelephonyIntegration API Lambda Function</a><br>which helps in creating PSR record which indeed creates AgentWork to route the workitem to an Agent.<br>The rest is handled from the Omni side only.</blockquote><h3>A dive into How Things Works for Unified Routing.</h3><blockquote>1. We set a routing criteria</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*R1xhm3bH36XVFaN5kYw8kg.png" /></figure><blockquote>2. Move the contact to a global queue that would be part of the routing profile of all the agents that are part of the contact center</blockquote><blockquote>3. Now we invoke an Omni flow from the contact flow. The Omni creates a PSR record which then creates an agentwork (Agent receives the workitem in their Omni window)</blockquote><blockquote>4. The salesforce services on the event of the Voice Call agentwork accepted by an Agent will make an API request to Amazon to have the contact routed to the Agent ARN who accepted the call in omni</blockquote><blockquote>5. The contact waiting in the Amazon Queue gets its routing criteria updated due to the API request made and as the User on AWS too was part of the Global Queue ,the contact will now be routed to the Agent’s CCP on Amazon . As auto accept will be enabled on AWS side for the Agent’s User , the call will be connected between Salesforce and the End User.</blockquote><blockquote>This is the main cause to have auto-accept enabled on the User’s of Amazon.</blockquote><p>There will be multiple configuration approaches available for a Contact Center to meet specific business requirements. However, a thorough understanding of the Salesforce as well as Amazon Connect platform’s functionality is essential for implementing an effective solution.</p><p>Hope the information is helpful.</p><p>Happy developing……….!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad0cb454cc82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use existing AWS Connect Users for Service Cloud Voice with Partner Telephony(Amazon Connect)]]></title>
            <link>https://medium.com/@anonymoususer123/use-existing-aws-connect-users-for-service-cloud-voice-with-partner-telephony-amazon-connect-22bd69f3682c?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/22bd69f3682c</guid>
            <category><![CDATA[byot]]></category>
            <category><![CDATA[amazon-connect]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[service-cloud-voice]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sun, 08 Dec 2024 09:41:41 GMT</pubDate>
            <atom:updated>2024-12-08T09:41:41.157Z</atom:updated>
            <content:encoded><![CDATA[<p>There can be an use case where the business wants to use the existing AWS connect instance with Salesforce. In such situations, there can be a requirement to use the existing AWS users only as the voice users on AWS connect instance. So let&#39;s explore how this can be made possible.</p><p>Firstly lets understand the actual design of how things work and then we can implement a custom solution to meet the requirement.</p><p><strong>&gt;&gt; Design of User Creation:</strong></p><p>By default when a User is added to a contact center from the Salesforce Contact Center Page, the salesforce automation will create a user on AWS side with the user name like : Salesforce User Record Alias + Salesforce User Record ID + Salesforce Org ID.</p><p>Example :</p><p>If the Salesforce User’s details is <br>First Name : anonymous<br>Last Name : user<br>Alias : auser<br>Salesforce User Id (15 digit Salesforce ID of the User): 005Hs00000EBxxx</p><p>SalesforceOrgID : 00DHs000003Uxxx</p><p>The AWS user’s Login UserName would be like : auser@005Hs00000EBxxx@00DHs000003Uxxx</p><p>Now , this user name will have a corresponding ARN value on AWS. This is an important field value that will be used later on the CallCenterRouting Map object .(Will discuss more on this over the next paragraphs)</p><p><strong>&gt;&gt; User Authentication :<br></strong>Now for the user authentication , we rely on the Connect App created by the Salesforce for the Contact Center. The naming convention of the relevant connected app in this scenario would be like : “ContactCenterInternalName_Connected_App”.</p><p>In this connected app , there is a section in the View mode called as</p><p>There we find custom attributes like the bleow image.</p><p>$User.Alias &amp; ‘@’ &amp; $User.Id &amp; ‘@’ &amp; $Organization.Id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKEqzufu6cJ1hpuCFZaUYQ.png" /><figcaption>Connected App in View Mode</figcaption></figure><p>Now this is the next important place where we need to make some changes to meet the custom requirement.</p><p><strong>The Custom Approach : </strong><br>Now as there is a requirement to use the existing users’ on AWS Connect Instance as is , we firstly create User records in Salesforce Org and then add those users to the Contact Center from the Contact Center Page.You may ignore the Users created on AWS connect instance due to the process of the adding the SF user to the contact center.Now navigate to the AWS Connect Instance and get the ARN values of the old user records and update the corresponding ARN values to the ExternalID on the CallCenterRoutingMap Salesforce Object.</p><p>For Example : For updating the ARN value of the user anonymous user on SF (005Hs00000EBxxx) , we can run the below SOQL query.</p><blockquote>SELECT Id, DeveloperName, MasterLabel, ReferenceRecordId, ExternalId FROM CallCenterRoutingMap where ReferenceRecordId = ‘005Hs00000EBxxx’</blockquote><p>Now create a new field on the User record and have that field populated with the AWS LoginUserName. Navigate to the Connected App’s attributes section and update the attributes format so that will search for the user correctly on AWS.</p><p>Update to be made : RoleSessionName — — $ User.CustomField__c</p><p>So now while authenticating the user (SSO authentication / when user clicks on the TelephonyProvider Settings link) the User.CustomField__c information is used to search for the username on the AWS connect side to authenticate the Salesforce User.</p><p>This above steps are a manual overhead that needs to be done inorder to utilize the old Loginusernames only.<br>Also NOTE : The Connect Instance’s authentication type should be SAML 2.0</p><p>Complete testing needs to be done before implementing the same for a live business to check that all the business requirements meet accordingly. Also the above is not a Salesforce Supported process but is a workaround solution that can be adapted by understanding how the product/feature works.</p><p>Hope this information helps you think of new custom solutions!!<br>Happy Learning……….!!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22bd69f3682c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bulk Upload Phone Numbers Mappings to Contact Center in Salesforce]]></title>
            <link>https://medium.com/@anonymoususer123/bulk-upload-phone-numbers-mappings-to-contact-center-in-salesforce-86be1ebcf276?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/86be1ebcf276</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[aws-connect]]></category>
            <category><![CDATA[service-cloud-voice]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Fri, 18 Oct 2024 06:52:06 GMT</pubDate>
            <atom:updated>2024-10-18T06:52:06.561Z</atom:updated>
            <content:encoded><![CDATA[<p>There could be a requirement to have 100’s of phone numbers claimed and they need to be mapped to Omni Queue or Omni Flow. Adding them manually could be troublesome.</p><p>There is a small workaround to have the AWS number mapped in a better manner.But this would again require the manual assignment of the Omni Queue or the Omni-Flow to the created contact center channels in Salesforce.</p><p>Step 1 : <br>Bulk create Messaging Channels first in the Salesforce Org using Workbench.</p><p>Make sure the below-required data is inserted : <br>DeveloperName<br>MasterLabel<br>MessageType<br>MessagingPlatformKey</p><p>Make sure that the<br> Developer Name == MasterLabel== Contact Center Channel Name</p><blockquote>NOTE : MessageType should be “ Voice “</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*Y7hy-3dT16Hkf_c7fL_FFg.png" /><figcaption>Image 1.1 : Single Insert</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*eUmtjtCF23eMip14HN2Q_A.png" /><figcaption>IMPORTANT : The Message Type Should be “Voice”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*d4L6Ckfl1MdRYbwAjCqkSw.png" /><figcaption>Image 1.2 : Post Messaging Channel Insert</figcaption></figure><p>Step 2:</p><p>Retrieve the Contact Center Metadata</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*DThcN2CtZVsspx-43PbvhA.png" /></figure><p>Update the Metadata with the new Contact Center Channel metadata something like below. If confused, have one contact center channel mapped and get the metadata and then it would be easy to figure out where to add the other channel’s metadata.</p><blockquote>Note : Make sure that while deploying the Contact Center Metada , there should not be any Contact Center Channels mapped. Clear the existing informaiton from the contact center page from Salesforce UI and only deploy the metadata back to the Org.</blockquote><p>Sample Metadata format for the contact center channel :</p><pre>&lt;contactCenterChannels&gt;<br>&lt;channel&gt;AMZChannelTest1&lt;/channel&gt;<br>&lt;contactCenter xsi:nil=&quot;true&quot;/&gt;<br>&lt;/contactCenterChannels&gt;</pre><p>After correct updates to the meatadata , Zip the files back and deploy the metadata back to the Org.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*XVSqlZ8DZGVYNhKZSnl0Gg.png" /></figure><p>Step 3:</p><p>After the metadata is successfully deployed to the Org , we observe that there is the desired contact center channel mapped and displayed. We have to still map the Omni Flow/ Omni queue further as required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*-xj5FeErCroASqOKrpVRjQ.png" /></figure><p>Though there is a manual work, this above steps overcomes the problems with the filtering from multiple channels and adding them !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86be1ebcf276" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Messaging for In-App and Web API]]></title>
            <link>https://medium.com/@anonymoususer123/messaging-for-in-app-and-web-api-beta-7f93f40b7480?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f93f40b7480</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[salesforce-messaging]]></category>
            <category><![CDATA[rest-api-miaw]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 08:09:28 GMT</pubDate>
            <atom:updated>2025-06-16T15:40:03.329Z</atom:updated>
            <content:encoded><![CDATA[<p>Finally, the Asynchronous Chat (Chat 2.0) is now available via API. Let&#39;s look at a simple setup of how to use the MIAW API and how better it is compared to the legacy chat.</p><p>Let’s Go…..</p><p>As the Messaging for In-App and Web is asynchronous, we need not bother about the long-polling that was used to maintain the connection between the Chat End User and Salesforce Agent for Leagacy Chat using REST API. Here in MIAW we just rely on sending the messages and show the messages sent from the agent to the end user by utilizing the Server Sent Events connection.</p><p>In MIAW, we do not rely on the <em>Two-Way Communication </em>utilized in legacy chat (using web socket communication), but rather depend on <em>One-Sided communication </em>via SSE. We use the Server-Sent Events to display the messages to the end users that were sent from the Agent. Also at the Agent end (inside Salesforce), the messages are displayed based on the Server Sent Events the agent subscribed to (Done by Salesforce code). As this sometimes causes issues in delayed messages due to bad network on the agent end, a refresh button is introduced on the Enhanced Conversations Component layout to reconnect the connection and listen to the Server-Sent Events.</p><p>Let&#39;s continue our journey of the setup part for MIAW REST API .</p><blockquote>Available Salesforce Documentation:</blockquote><blockquote><a href="https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference?meta=Summary">Messaging for In-App And Web API Endpoint Reference</a></blockquote><blockquote><a href="https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events.html">Server-Sent Events</a></blockquote><p><em>We will talk about how to use the endpoints using the Postman Tool to establish an unauthenticated user connection and start a messaging session from the web in a Salesforce Sandbox Org.</em></p><h3>Prerequisites:</h3><p>Prepare your Environment by configuring a Messaging for In-App and Web embedded deployment for a custom client implementation.<br>Follow <a href="https://help.salesforce.com/s/articleView?id=sf.miaw_deployment_custom.htm&amp;type=5">this</a> article to set up a Custom Client Deployment for MIAW.<br>After the above, use the Deployment API name as “esDeveloperName” in the API calls.</p><blockquote>SCRT URL formats for Production and Sandboxes&#39; :</blockquote><blockquote>Prod : <a href="https://sathkuri-221107-332-demo--demotest.sandbox.my.salesforce-scrt.com/iamessage/api/v2/authorization/unauthenticated/access-token">https://{DomainName}.my.salesforce-scrt.com</a><br>Sandbox : Domain : <a href="https://sathkuri-221107-332-demo--demotest.sandbox.my.salesforce-scrt.com/iamessage/api/v2/authorization/unauthenticated/access-token">https://{DomainName}.sandbox.my.salesforce-scrt.com</a></blockquote><h4>Step 1:</h4><p><strong>generateAccessTokenForUnauthenticatedUser</strong></p><p>POST request <br><a href="https://{scrt-url}/iamessage/api/v2/authorization/authenticated/access-toke">https://</a><a href="https://{scrt-url}/iamessage/api/v2/conversation/%7BconversationId%7D/message">{scrt-url}</a><a href="https://{scrt-url}/iamessage/api/v2/authorization/authenticated/access-toke">/</a>iamessage/api/v2/authorization/unauthenticated/access-token</p><p>Body :</p><pre>{<br>&quot;orgId&quot;: &quot;00D1s0000000xxx&quot;,<br>&quot;esDeveloperName&quot;: &quot;MIAWRESTAPI&quot;,<br>&quot;capabilitiesVersion&quot;: &quot;1&quot;,<br>&quot;platform&quot;: &quot;Web&quot;<br>}<br>}</pre><p>Response :</p><pre>{<br>    &quot;accessToken&quot;: &quot;eyJraWQiOiIwN2Q0YWIwNWE1NGNiMTRjMmZmMzJjZDJlODEwNTY2YTdlMzY2Yjg4YjhlZGE0M2JkOWZkZWFkMTNhNzExOTcyIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJ2Mi9pYW1lc3NhZ2UvVsdfVVRIL05BL3VpZDo4YjU4MzMxMy1jY2E3LTRhMGMtYTRiZi00MjIxNjg4YTUxNDQiLCJjbGllbnRJZCI6InYxL01JQVdSRVNUQVBJLzEyZjUzMTFiLTM4NTItNDdiZS04NzZkLWM2YzU1MjBiYzc4ZCIsImNoYW5uZWxBZGRJZCI6IjQxOGY5NmZjLTlkNDItNGFkZC1iZTI0LTFmOTUzYmZmN2IyNiIsImlzcyI6ImlhbWVzc2FnZSIsImRldmljZUlkIjoic3FQSXpqdEp1WWZqQVo5dlRYQVVxYVVZc0JxU0lzME01OVZ5NkQ5UGRoZEFpUWlabDUrV29ZWTZYMUc4QjNrMGdBRVJMTEZ0WFJjeDMzNVFlRlIrMnc9PSIsImNhcGFiaWxpdGllc1ZlcnNpb24iOiIyNDgiLCJvcmdJZCI6IjAwRDFzMDAwMDAwME5pMyIsImRldmljZUluZm8iOiJ7fSIsInBsYXRmb3JtIjoiV2ViIiwiand0SWQiOiI0eHZkYXFNRjdibUJOLXNhcVo5ZnZGIiwiY2xpZW50U2Vzc2lvbklkIjoiZTU0OTAwZjktZjU1My00OGFhLWJhYTMtODliODNlM2RiZWJjIiwiYXVkIjoiVVNFUiIsImV2dEtleSI6InNjcnQucHJvZC5ldmVudHJvdXRlcl9fYXdzLmF3cy1wcm9kOS1hcG5vcnRoZWFzdDEudWVuZ2FnZTEuYWpuYWxvY2FsMV9fcHVibGljLmV2ZW50cy5zY3J0MDE6ODciLCJhcGlWZXJzaW9uIjoidjIiLCJzY29wZSI6InB1YmxpYyIsImp3a3NfdXJpIjoiaHR0cHM6Ly9zY3J0MDEudWVuZ2FnZTEuc2ZkYy1tY2hobzAuc3ZjLnNmZGNmYy5uZXQvaWFtZXNzYWdlL3YxLy53ZWxsLWtub3duL2p3a3MuanNvbj9rZXlJZD0wN2Q0YWIwNWE1NGNiMTRjMmZmMzJjZDJlODEwNTY2YTdlMzY2Yjg4YjhlZGE0M2JkOWZkZWFkMTNhNzExOTcyIiwiZXNEZXBsb3ltZW50VHlwZSI6IkFQSSIsImV4cCI6MTcyMDA5MDU2MSwiaWF0IjoxNzIwMDY4OTYxfQ.HBUDXKvDAeUII2IIni2HGI5PTet149TcStCUTA_qQfPe5H4SahlXECvLomiVfHlgaob1NJRuHkADvxKDy82jupA6VCgYpnWXf5zCaMhd96SPPd99xT2VbOItyBBEdmL-PGwjAXZcZZ-AmKuV5HFXY3X0EGEQp_u8hyaXZQSok-ZddYPXQFYjBThFOcf_14jk5ik8ICdUw_ZJeiHqnWUzchWRRwk90JuIFsS7I30NnO5VPbqKCgfWjPGgbmiaRnvXSFpRfTgVJr-8m3RYlwDoMfy8Kz9gK2AAR2lNnRG1tKiRxXHwfkemLwwlaFuyyiU5_um_d_HhxndpcTlNtK2mqA&quot;,<br>    &quot;lastEventId&quot;: &quot;41171734&quot;,<br>    &quot;context&quot;: {<br>        &quot;configuration&quot;: {<br>            &quot;embeddedServiceConfig&quot;: {<br>                &quot;name&quot;: &quot;MIAWRESTAPI&quot;,<br>                &quot;deploymentType&quot;: &quot;API&quot;,<br>                &quot;embeddedServiceMessagingChannel&quot;: {<br>                    &quot;channelAddressIdentifier&quot;: &quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,<br>                    &quot;authMode&quot;: &quot;UnAuth&quot;<br>                },<br>                &quot;forms&quot;: [],<br>                &quot;attachments&quot;: {<br>                    &quot;endUserToAgent&quot;: true,<br>                    &quot;maxFileSize&quot;: 5242880<br>                },<br>                &quot;choiceListConfig&quot;: {<br>                    &quot;choiceList&quot;: []<br>                },<br>                &quot;transcript&quot;: {<br>                    &quot;allowTranscriptDownload&quot;: false<br>                }<br>            },<br>            &quot;timestamp&quot;: 1720068961127<br>        },<br>        &quot;deviceId&quot;: &quot;sqPIzjtJuYfjAZ9vTXAUqaUYsBqSIs0M59Vy6D9PdhdAiQiZl5+WoYY6X1G8B3k0gAERLLFtXRcx335QeFR+2w==&quot;<br>    }<br>}</pre><p>Copy the accesstoken from the above response and this will be used for the further API calls for the security purpose.</p><p>This accesstoken value will be used as the Bearer Token Auth Type.</p><h4>Step 2:</h4><p><strong>createConversation</strong></p><p>POST request:<br>https://{scrt-url}/iamessage/api/v2/conversation</p><p>Authorization : Bearer Token Auth Type — access token from step 1</p><p>Body:</p><p>Should create a unique conversation ID on the client side and can be any value that follows the below-mentioned Pattern.</p><pre>{<br>  &quot;conversationId&quot;: &quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,<br>  &quot;esDeveloperName&quot;: &quot;MIAWRESTAPI&quot;<br>}</pre><blockquote>Generate a unique conversationId as MIAW format is a Long conversation and it will have multiple sessions until the conversation is ended by opting out or customer ends the conversation. So make sure that you do not use the same conversation ID for another user as that will cause you to show wrong data/sensitive information.<br>Pattern:<br>^[0–9a-f]{8}-[0–9a-f]{4}-4[0–9a-f]{3}-[89ab][0–9a-f]{3}-[0–9a-f]{12}$</blockquote><p>Response:</p><p>If the conversation got created successfully , then you would receive a 201 Created response. If received something else, then get that resolved by following the response body received. (It would be either using wrong authtype or expired token or wrong conversationId)</p><h4>Step 3:</h4><p><strong>Subscribe to SSE</strong></p><p>Get request : <br>https://{scrt-url}/eventrouter/v1/sse</p><p>Authorization : Bearer Token Auth Type — access token from step 1</p><p>Header : <br>X-Org-Id : 00D1s0000000xxx (Org ID used as in Step -1)<br>Also make sure the header : Accept: has proper media type input like text/event-stream. <br>( Suggestion to use the Header Accept : */* )</p><p>Once the request is sent out, you get a 200 response where there is an open one-way connection between the Salesforce Conversation Server and the end user. There will be events that will appear in realtime as soon as the Bot/agent has input a message, the routing-related information, estimated Wait Time related responses are also found on the SSE events and many more. ( Please implement and go through the lifecycle of a messaging session to better understand the events in detail.)</p><p>The Response would be something like below :</p><pre>event:ping<br>data:0<br><br>event:ping<br>data:1<br><br>id:44267399.0<br>event:CONVERSATION_ROUTING_RESULT<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Automated Process&quot;,&quot;identifier&quot;:&quot;4b075f66-6f9c-47b1-a8fa-45a87fd58f51&quot;,&quot;entryType&quot;:&quot;RoutingResult&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;RoutingResult\&quot;,\&quot;id\&quot;:\&quot;4b075f66-6f9c-47b1-a8fa-45a87fd58f51\&quot;,\&quot;recordId\&quot;:\&quot;0MwIm0000008OQn\&quot;,\&quot;errorMessages\&quot;:[],\&quot;pendingServiceRoutingId\&quot;:\&quot;0JRIm0000008fZW\&quot;,\&quot;routingType\&quot;:\&quot;Initial\&quot;,\&quot;estimatedWaitTime\&quot;:{\&quot;estimatedWaitTimeInSeconds\&quot;:-1,\&quot;isEWTRequested\&quot;:true},\&quot;failureReason\&quot;:\&quot;\&quot;,\&quot;failureType\&quot;:\&quot;None\&quot;,\&quot;isExternallyRouted\&quot;:false,\&quot;routingConfigurationDetails\&quot;:{\&quot;routingConfigurationType\&quot;:\&quot;QueueRoutingType\&quot;,\&quot;queueId\&quot;:\&quot;00G1s000002e4Px\&quot;}}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;System&quot;,&quot;appType&quot;:&quot;conversation&quot;,&quot;subject&quot;:&quot;0055h000007QpO6&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;&quot;,&quot;transcriptedTimestamp&quot;:1721798464689,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798464650,&quot;clientDuration&quot;:0}}<br><br>event:ping<br>data:2<br><br>event:ping<br>data:3<br><br>id:44267555.0<br>event:CONVERSATION_MESSAGE<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Guest&quot;,&quot;identifier&quot;:&quot;57904eb6-5352-4c5e-adf6-5f100572cfc1&quot;,&quot;entryType&quot;:&quot;Message&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;Message\&quot;,\&quot;id\&quot;:\&quot;57904eb6-5352-4c5e-adf6-5f100572cfc1\&quot;,\&quot;abstractMessage\&quot;:{\&quot;messageType\&quot;:\&quot;StaticContentMessage\&quot;,\&quot;inReplyToMessageId\&quot;:\&quot;\&quot;,\&quot;id\&quot;:\&quot;57904eb6-5352-4c5e-adf6-5f100572cfc1\&quot;,\&quot;references\&quot;:null,\&quot;staticContent\&quot;:{\&quot;formatType\&quot;:\&quot;Text\&quot;,\&quot;text\&quot;:\&quot;Thou Shall See the world\&quot;}},\&quot;messageReason\&quot;:null}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;EndUser&quot;,&quot;appType&quot;:&quot;iamessage&quot;,&quot;subject&quot;:&quot;v2/iamessage/UNAUTH/NA/uid:92973466-7be6-4ae7-9d78-e724040de3b9&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;Default&quot;,&quot;transcriptedTimestamp&quot;:1721798501890,&quot;relatedRecords&quot;:[&quot;0MwIm0000008OQn&quot;,&quot;0GOIm0000000001OAA&quot;],&quot;clientTimestamp&quot;:1721798500450,&quot;clientDuration&quot;:0}}<br><br>event:ping<br>data:4<br><br>event:ping<br>data:5<br><br>id:44267645.0<br>event:CONVERSATION_ROUTING_WORK_RESULT<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Automated Process&quot;,&quot;identifier&quot;:&quot;9bedcf58-2018-4a60-aca6-3b4ac1e45b72&quot;,&quot;entryType&quot;:&quot;RoutingWorkResult&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;RoutingWorkResult\&quot;,\&quot;id\&quot;:\&quot;9bedcf58-2018-4a60-aca6-3b4ac1e45b72\&quot;,\&quot;queueId\&quot;:\&quot;00G1s000002e4Px\&quot;,\&quot;errorMessages\&quot;:[],\&quot;workTargetId\&quot;:\&quot;0MwIm0000008OQn\&quot;,\&quot;agentSessionId\&quot;:\&quot;4yJDdCgKVz20gGPbNHklKF\&quot;,\&quot;workType\&quot;:\&quot;Assigned\&quot;,\&quot;botId\&quot;:\&quot;\&quot;,\&quot;agentGroupIds\&quot;:[],\&quot;workId\&quot;:\&quot;0BzIm0000008OeC\&quot;}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;System&quot;,&quot;appType&quot;:&quot;conversation&quot;,&quot;subject&quot;:&quot;0055h000007QpO6&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;&quot;,&quot;transcriptedTimestamp&quot;:1721798535987,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798535975,&quot;clientDuration&quot;:0}}<br><br>id:44267667.0<br>event:CONVERSATION_PARTICIPANT_CHANGED<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Automated Process&quot;,&quot;identifier&quot;:&quot;df6a8bd6-5f95-4605-a59a-4ff3ed3772a7&quot;,&quot;entryType&quot;:&quot;ParticipantChanged&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;ParticipantChanged\&quot;,\&quot;id\&quot;:\&quot;df6a8bd6-5f95-4605-a59a-4ff3ed3772a7\&quot;,\&quot;entries\&quot;:[{\&quot;operation\&quot;:\&quot;add\&quot;,\&quot;menuMetadata\&quot;:null,\&quot;participant\&quot;:{\&quot;role\&quot;:\&quot;Agent\&quot;,\&quot;appType\&quot;:\&quot;agent\&quot;,\&quot;subject\&quot;:\&quot;0055h000007Gp30\&quot;,\&quot;clientIdentifier\&quot;:\&quot;\&quot;},\&quot;displayName\&quot;:\&quot;Sai Srujan A\&quot;}]}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;System&quot;,&quot;appType&quot;:&quot;conversation&quot;,&quot;subject&quot;:&quot;0055h000007QpO6&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;&quot;,&quot;transcriptedTimestamp&quot;:1721798542240,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798542240,&quot;clientDuration&quot;:0}}<br><br>id:44267671.0<br>event:CONVERSATION_ROUTING_WORK_RESULT<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Automated Process&quot;,&quot;identifier&quot;:&quot;4d2bf102-6281-430f-a60f-2567cf2d0085&quot;,&quot;entryType&quot;:&quot;RoutingWorkResult&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;RoutingWorkResult\&quot;,\&quot;id\&quot;:\&quot;4d2bf102-6281-430f-a60f-2567cf2d0085\&quot;,\&quot;queueId\&quot;:\&quot;00G1s000002e4Px\&quot;,\&quot;errorMessages\&quot;:[],\&quot;workTargetId\&quot;:\&quot;0MwIm0000008OQn\&quot;,\&quot;agentSessionId\&quot;:\&quot;4yJDdCgKVz20gGPbNHklKF\&quot;,\&quot;workType\&quot;:\&quot;Accepted\&quot;,\&quot;botId\&quot;:\&quot;\&quot;,\&quot;agentGroupIds\&quot;:[],\&quot;workId\&quot;:\&quot;0BzIm0000008OeC\&quot;}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;System&quot;,&quot;appType&quot;:&quot;conversation&quot;,&quot;subject&quot;:&quot;0055h000007QpO6&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;&quot;,&quot;transcriptedTimestamp&quot;:1721798543729,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798543717,&quot;clientDuration&quot;:0}}<br><br>event:ping<br>data:6<br><br>id:44267689.0<br>event:CONVERSATION_TYPING_STARTED_INDICATOR<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Sai Srujan A&quot;,&quot;identifier&quot;:&quot;76f285ed-d5aa-4110-87fa-50b532fe7f6c&quot;,&quot;entryType&quot;:&quot;TypingStartedIndicator&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;TypingStartedIndicator\&quot;,\&quot;id\&quot;:\&quot;76f285ed-d5aa-4110-87fa-50b532fe7f6c\&quot;,\&quot;timestamp\&quot;:1721798550476}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;Agent&quot;,&quot;appType&quot;:&quot;agent&quot;,&quot;subject&quot;:&quot;0055h000007Gp30&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;Default&quot;,&quot;transcriptedTimestamp&quot;:1721798550495,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798550476,&quot;clientDuration&quot;:0}}<br><br>id:44267697.0<br>event:CONVERSATION_MESSAGE<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Sai Srujan A&quot;,&quot;identifier&quot;:&quot;aef5149e-c84f-4e26-8e30-fd6ae242c3bc&quot;,&quot;entryType&quot;:&quot;Message&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;Message\&quot;,\&quot;id\&quot;:\&quot;aef5149e-c84f-4e26-8e30-fd6ae242c3bc\&quot;,\&quot;abstractMessage\&quot;:{\&quot;messageType\&quot;:\&quot;StaticContentMessage\&quot;,\&quot;inReplyToMessageId\&quot;:null,\&quot;id\&quot;:\&quot;aef5149e-c84f-4e26-8e30-fd6ae242c3bc\&quot;,\&quot;references\&quot;:[],\&quot;staticContent\&quot;:{\&quot;formatType\&quot;:\&quot;Text\&quot;,\&quot;text\&quot;:\&quot;Thou Shall See the world\&quot;}},\&quot;messageReason\&quot;:null}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;Agent&quot;,&quot;appType&quot;:&quot;agent&quot;,&quot;subject&quot;:&quot;0055h000007Gp30&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;Default&quot;,&quot;transcriptedTimestamp&quot;:1721798551242,&quot;relatedRecords&quot;:[&quot;0MwIm0000008OQn&quot;,&quot;0GOIm0000000001OAA&quot;],&quot;clientTimestamp&quot;:1721798550841,&quot;clientDuration&quot;:0}}<br><br>id:44267699.0<br>event:CONVERSATION_TYPING_STOPPED_INDICATOR<br>data:{&quot;channelPlatformKey&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;channelType&quot;:&quot;embedded_messaging&quot;,&quot;channelAddressIdentifier&quot;:&quot;418f96fc-9d42-4add-be24-1f953bff7b26&quot;,&quot;conversationId&quot;:&quot;5461185f-abc6-4435-b1e1-3b3aaxxxxxxx&quot;,&quot;conversationEntry&quot;:{&quot;senderDisplayName&quot;:&quot;Sai Srujan A&quot;,&quot;identifier&quot;:&quot;4f5c9d5a-3a34-42cc-9ee2-340e4b41b9d7&quot;,&quot;entryType&quot;:&quot;TypingStoppedIndicator&quot;,&quot;entryPayload&quot;:&quot;{\&quot;entryType\&quot;:\&quot;TypingStoppedIndicator\&quot;,\&quot;id\&quot;:\&quot;4f5c9d5a-3a34-42cc-9ee2-340e4b41b9d7\&quot;,\&quot;timestamp\&quot;:1721798551602}&quot;,&quot;sender&quot;:{&quot;role&quot;:&quot;Agent&quot;,&quot;appType&quot;:&quot;agent&quot;,&quot;subject&quot;:&quot;0055h000007Gp30&quot;,&quot;clientIdentifier&quot;:&quot;&quot;},&quot;visibilityStrategy&quot;:&quot;Default&quot;,&quot;transcriptedTimestamp&quot;:1721798551620,&quot;relatedRecords&quot;:[],&quot;clientTimestamp&quot;:1721798551602,&quot;clientDuration&quot;:0}}</pre><p>So the end client needs to listen to these SSE events and handle the functionality to display the Bot/Agent messages to the end user.</p><h4>Step 4 :</h4><p><strong>sendMessage</strong></p><p>POST request : <br><a href="https://{scrt-url}/iamessage/api/v2/conversation/%7BconversationId%7D/message">https://{scrt-url}/iamessage/api/v2/conversation/{conversationId}/message</a></p><p>Authorization : Bearer Token Auth Type — access token from step 1</p><p>Body :</p><pre>{<br>  &quot;message&quot;: {<br>    &quot;inReplyToMessageId&quot;: &quot;&quot;,<br>    &quot;id&quot;: &quot;57904eb6-5352-4c5e-adf6-5f100572xxxx&quot;,<br>    &quot;messageType&quot;: &quot;StaticContentMessage&quot;,<br>    &quot;staticContent&quot;: {<br>      &quot;formatType&quot;: &quot;Text&quot;,<br>      &quot;text&quot;: &quot;Hi test api&quot;<br>    }<br>  },<br>  &quot;esDeveloperName&quot;: &quot;MIAWRESTAPI&quot;,<br>  &quot;isNewMessagingSession&quot;: true,<br>  &quot;routingAttributes&quot;: {},<br>  &quot;language&quot;: &quot;en&quot;<br>}</pre><p>Have a uniqueId for the messageId. <br>Pattern:<br>^[0–9a-f]{8}-[0–9a-f]{4}-4[0–9a-f]{4}-[89ab][0–9a-f]{4}-[0–9a-f]{12}$</p><p>Also make sure that you use isNewMessagingSession”: true for only when you send the first message to inform that there are pre-chat data in the routingAttributes.Rest all scenarios it should be false.</p><p>Once a message is sent to the Salesforce Agent /Bot , we receive a 200 response if the payload is correct.</p><p>This above are the simple set of events to be used to understand the general working of MIAW using REST API for Web Unauth end user.</p><p>Hope this Helps!!!!!!!!!!!!!!</p><p>Will be creating more stories for MIAW Web authenticated users and many more!!</p><p>Share your feedback if you would feel that there needs some more information added.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f93f40b7480" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get the Estimated Wait Time Results in MIAW REST API]]></title>
            <link>https://medium.com/@anonymoususer123/get-the-estimated-waittime-results-in-miaw-rest-api-54a94e9c4b7c?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/54a94e9c4b7c</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[salesforce-messaging]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sun, 21 Jul 2024 12:12:01 GMT</pubDate>
            <atom:updated>2024-07-21T12:16:57.025Z</atom:updated>
            <content:encoded><![CDATA[<p>The available endpoints for MIAW REST API are only for starting a conversation, sending messages to the Salesforce Agent, and getting the messages from the Agent. Still, we do not have an API endpoint for determining the Estimated Wait Time results, No. of available Agents &amp; No. of Queued Items.</p><p><strong>Problem Statement :</strong></p><blockquote>Determine the details : <br>Estimated Wait Time<br>No. of Available Agents<br>No. of Queue Items</blockquote><p><strong><em>IDEA : </em></strong><br>Setup an Omni Flow on the Messaging Channel for routing and in the Omni flow , we will configure the “ Check Availability for Routing “ flow component and save the values of the component results on to the Messaging Session’s custom fields.</p><p>Now we can use the REST API calls to query the required values with the Conversation ID used to initiate the messaging session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*P1C-MeqihqFWb9QNrFEZvw.png" /><figcaption>Sample Omni Channel Flow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Rt-9jUttTDAYgKQYLeMCw.png" /><figcaption>Check Agent Availability for Routing Component</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vbMSckHaYI1vglT0NP5Ncg.png" /><figcaption>Update the Check agent availability for routing results to the messaging session.</figcaption></figure><p>GET REQUEST:</p><pre>https://{DomainName}.my.salesforce.com/services/data/v61.0/query?q=SELECT ewt__c,agentsavailable__c,queued__c from MessagingSession where SessionKey=&#39;366285eb-fc94-4e65-8681-631505ec****&#39; -H &quot;Authorization: Bearer token&quot;</pre><p>From the JSON response body, we can make use of the values as required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5DxFuodE1_RXBtWCB0kQQ.png" /><figcaption>If the Estimated Wait Time is -1, that means there weren’t sufficient work items to calculate the waiting time.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54a94e9c4b7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Download Voice Call Recording for a Voice Call Record from Salesforce?]]></title>
            <link>https://medium.com/@anonymoususer123/how-to-download-voice-call-recording-for-a-voice-call-record-from-salesforce-db4b744fb54c?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/db4b744fb54c</guid>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[amazon-connect]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[service-cloud-voice]]></category>
            <category><![CDATA[salesforce-customization]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Tue, 05 Mar 2024 06:18:41 GMT</pubDate>
            <atom:updated>2024-03-05T06:18:41.855Z</atom:updated>
            <content:encoded><![CDATA[<p>There could be situations where you would want your Agents/Users to download the Voice Call recording from the Salesforce Voice Call Record Page directly instead of them moving to the the Amazon Connect Service, then finding the contact via the contact search and then trying to download the respective contact’s recording.</p><p>Here is an idea on how to download the voice call recording directly without opening the Amazon Connect Instance only if the recording is present for that contact.</p><p><strong>To the IDEA :<br> </strong><br>When we check the network logs captured while the voice call recording is displayed on the Call Audio Player component on the respective Salesforce Voice Call record page, there is one interesting packet with the POST request like —</p><pre>https://[org domain name].lightning.force.com/aura?r=[request no]&amp;ui-conversation-components-aura-controllers.MediaPlayer.getMediaPlayerData=1}<br><br>Example : <br>https://voicedemo.lightning.force.com/aura?r=34&amp;ui-conversation-components-aura-controllers.MediaPlayer.getMediaPlayerData=1</pre><p>This above request holds a response that is of interest here.<br>It is the “mediaSrc” value of the response that holds the URL link to the Voice Call Recording in the Contact Center’s respective S3 bucket.</p><pre><strong>URL format </strong>: &quot;https://[connect instance access URL]/get-recording?format=wav&amp;callLegId=[AWS-ContactID/SF-VendorCallKey]&quot;<br><br><strong><em>Example</em></strong> : &quot;https://ContactCenter00DHs000003xxxx.my.connect.aws/get-recording?format=wav&amp;callLegId=830c174b-a77c-44ad-a93e-e845ffcf3aba&quot;<br><br><strong>connect instance Access URL format </strong>- https://ContactCenterName+OrgID.my.connect.aws</pre><p>So if the agent can view the Call recording on the Call Audio Player component, then that means the agent/user has the necessary permissions to access the recording. Then we can use the above URL format to download the Call Recording directly from the Salesforce End.</p><p><strong>The Simple approach to the solution :<br> </strong><br>Create a custom formula field of type text with the formula like</p><p>“https://ContactCenter00DHs000003xxxx.my.connect.aws/get-recording?format=wav&amp;callLegId=&quot;&amp;VendorCallKey</p><p>When the agent clicks on the above link, while they are able to see the voice call recording on the Call Audio Player , then they will be able to download the Voice Call Recording onto their System.</p><blockquote>Based on the business setup i.e; If there are many contact centers then adjust your logic to meet the final requirement where the URL should be of the format https://[ContactCenterName+15DigitOrgID].my.connect.aws/get-recording?format=wav&amp;callLegId=[VendorCallKey]</blockquote><p>Happy implementing ……………</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db4b744fb54c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Want to find out the list of countries that are whitelisted to place calls from your Salesforce…]]></title>
            <link>https://medium.com/@anonymoususer123/want-to-find-out-the-list-of-countries-that-are-whitelisted-to-place-calls-from-your-salesforce-6ab46cc5112a?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ab46cc5112a</guid>
            <category><![CDATA[amazon-connect]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[service-cloud-voice]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sat, 24 Feb 2024 08:58:01 GMT</pubDate>
            <atom:updated>2024-02-24T08:58:01.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>Want to find out the list of countries that are whitelisted to place calls from your Salesforce Service Cloud Voice with Amazon Connect Contact Center?</h3><p>Service Cloud Voice with Amazon Connect is a Voice feature that is designed and built with the Amazon Connect Service as the core while the Salesforce Services are used as the UI/UX. Slide here to know more about <a href="https://help.salesforce.com/s/articleView?id=sf.voice_about.htm&amp;type=5">Service Cloud Voice</a></p><p>Let&#39;s jump to the part where we have the Service Cloud Voice with Amazon Connect Contact Center setup and we are now looking for information on how to extract the list of countries that are whitelisted for your specific Contact Center (Amazon Connect Instance) to make outbound calls.</p><p>Follow the below Simple Steps :</p><blockquote>1. Open the Omni widget on your console for the user that is part of your Contact Center that we are looking to find the allow-listed countries to place outbound calls.<br>2. Go online to receive a voice call or to place an outbound voice call.<br>3. Just perform a simple action of navigating to the Omni Channel Settings and in the Debugging section click “Download Agent Debug Information” (We are basically downloading so-called CCP logs)<br>4. Now open the downloaded file to read the logs using the Amazon tool <a href="https://tools.connect.aws/ccp-log-parser/"><em>CCP log parser</em></a><em><br></em>5. In the logs we are interested in the log line like : <strong><em>ccp TRACE ✔ AWSClient: ← &#39;getDialableCountryCodes&#39; succeeded<br></em></strong>5.1. To better find it, in the CCP logs, on the Snapshot column click the available status state snapshot and that highlights the logs for that snapshot. From there it is easy to find out the above log line.<br>6. Click on the logline and that opens up more details where you can find the list of country codes.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*Bhbzrt1hL1uC48IGoHBhnA.png" /><figcaption>Navigating to the “Download Agent Debug Information”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JbJ1RZYPx87pm0m7u1z1tQ.png" /><figcaption>Navigating to the desired ccp log line : <strong><em>ccp TRACE ✔ AWSClient: ← ‘getDialableCountryCodes’ succeeded</em></strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qXo66vBgLwAcQ5APOAp8Zw.png" /><figcaption>The List of allow-listed Countries for placing Outbound Calls from the desired Contact Center</figcaption></figure><p>There you go with the list of countries that you can place the outbound calls to.</p><p>Want to add more countries to the list of Whitelisted Countries for outbound calls from your Contact Center while you are using Service Cloud voice with Amazon Connect?<br>Reach out to Salesforce Support with the below information via a Support Case and they will get it done for you!!</p><p>Information to be shared :</p><blockquote>AWS Account ID:</blockquote><blockquote>Amazon Connect Instance ARN:<br>[Sample ARN: arn:aws:connect:us-east-1:000000000:instance/aaaa-bbbb-ccccc-dddd-aaabbbcccdd]</blockquote><blockquote>Countries or country Prefixes that you are requesting to whitelist for outbound dialing:</blockquote><p><strong>NOTE </strong>: For a list of country codes, see the <a href="https://countrycode.org/">Country Code website</a>.</p><p><strong>Important </strong>: As the underlying services are from Amazon Web Services (AWS), it is crucial to understand that there are some limitations . AWS can’t activate all calling destinations because there are a few destinations that are high-cost and high-risk for fraudulent activity. For a list of available outbound call destination countries, see <a href="https://aws.amazon.com/connect/pricing/">Amazon Connect pricing</a>.</p><p>Hope this was helpful !!!!!!!!!!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ab46cc5112a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Messaging for In-App and Web User Verification setup in Salesforce]]></title>
            <link>https://medium.com/@anonymoususer123/messaging-for-in-app-and-web-user-verification-setup-in-salesforce-5789bd8731a4?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5789bd8731a4</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[salesforce-messaging]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-messaging-app]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 18:06:56 GMT</pubDate>
            <atom:updated>2024-09-19T10:56:51.985Z</atom:updated>
            <content:encoded><![CDATA[<p>Find below a brief intro on how you can set up the Messaging for In-App and Web User Verification.</p><h4>Prerequisites:</h4><p>Have an MIAW channel, the embedded service deployment, and an agent to accept the session already set up in the Org.<br>OpenSSL software on your device.</p><p>Let&#39;s begin the journey…..</p><p>___________________________The Begining __________________________</p><h4>Stage 1</h4><p>Create a certificate and extract the public key and private keys.</p><p>Steps to create the certificate:</p><ol><li>Open the command prompt and run the below query to create a certificate and a private key</li></ol><pre>openssl req -x509 -newkey rsa:2048 -nodes -keyout PrivateKeyFile.key -out PublicCertFile.crt -sha256 -days 365</pre><p>Enter the details as prompted and remember the values entered as they will be used in the next stages.</p><p>2. After creating the certificate make sure to check if the certificate has been validated. If not validate it.</p><p>3. Now extract the public key for the above created certificate by executing the below code.</p><pre>openssl rsa -in PrivateKeyFile.key -pubout -out PublicKeyFile.key</pre><p>4. Now generate a modulus of the public key which we will be using in the next stages. Use the below query to generate the modulus of the public key which we created previously.</p><pre>openssl rsa -pubin -in PublicKeyFile.key -text -noout</pre><p>The output of step 4 would be in Hexadecimal format.</p><h4>Stage 2</h4><p>We now need to convert the generated modulus value in the previous stage to Base64 format.</p><p>You may use <a href="https://base64.guru/converter/encode/hex">https://base64.guru/converter/encode/hex</a> to convert the value from Hex format to Base64 format.</p><p>After conversion, make sure to replace</p><p>‘<strong>/ ’ with ‘ _’ and ‘+’ with ‘ — ’</strong></p><h4>Stage 3</h4><p>The format of the JWK (JSON Web Key) should be as below</p><pre>{<br>    &quot;kid&quot;: &quot;{A unique value that identifies the end user}&quot;,<br>    &quot;alg&quot;: &quot;RS256&quot;,<br>    &quot;use&quot;: &quot;sig&quot;,<br>    &quot;kty&quot;: &quot;RSA&quot;,<br>    &quot;x5c&quot;: [<br>        &quot;{Paste the public certificate value here}&quot;<br>    ],<br>    &quot;y&quot;: &quot;y&quot;,<br>    &quot;n&quot;: &quot;{modulus of the public key in Base64 format}&quot;,<br>    &quot;e&quot;: &quot;AQAB&quot;,<br>    &quot;crv&quot;: &quot;crv&quot;,<br>    &quot;d&quot;: &quot;d&quot;,<br>    &quot;k&quot;: &quot;k&quot;<br>}</pre><p>Save the above as .json file.</p><h4>Stage 4</h4><p>Now we need to create aJWT (JSON Web Token)</p><p>You may use <a href="https://dinochiesa.github.io/jwt/">https://dinochiesa.github.io/jwt/</a> to create the token.</p><p>Use the algorithm RS256</p><p>Format of header to be followed :</p><pre>{<br>  &quot;alg&quot;: &quot;RS256&quot;,<br>  &quot;typ&quot;: &quot;JWT&quot;,<br>  &quot;kid&quot;: &quot;{the value same as in the JWK created in previous stage}&quot;<br>}</pre><p>Format of decoded Payload to be followed :</p><pre>{<br>  &quot;sub&quot;: &quot;{A unique value to identify the User}&quot;,<br>  &quot;iss&quot;: &quot;{issuer as entered in while creating the certificate in Stage 1}&quot;,<br>  &quot;exp&quot;: {expiration date of the token in Timestamp format}<br>}</pre><p>You may use <a href="https://www.epochconverter.com/">https://www.epochconverter.com/</a> to convert the 24-hour human readable time format to machine-understandable format(Timestamp)</p><p>Now pass the Private key and the Public key values and generate the JWT.</p><p>After passing click the left arrow button that you see on the page</p><p>The page looks something as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tL7_Xk9IMieM9HKJK5d-GA.png" /></figure><p>Copy the JWT data created and save it to be used in the next stages.</p><p>Remember the values that were passed in the Header and Payload fields.</p><blockquote>NOTE : The KID and the sub can be same if there is a JWK created for each end user.</blockquote><blockquote>But if the business wants to create only one JWK in the Salesforce Org , then one needs to change the sub value on the JWT everytime for each end user as the sub value decides the End User.</blockquote><h4>Stage 5</h4><p>Now we need to log in into the Salesforce Org and navigate to <br>Setup &gt; Messaging for In-App and Web User Verification page.</p><p>Steps to be followed:</p><ol><li>Add the JWK(JSON Web Key)that we created in Stage 3.</li><li>Create a JSON Web Keyset that can be used in the messaging channel to verify the user.<br><strong><em>Note</em></strong><em>: Issuer of JSON Web Keyset in Salesforce setup should match with iss of JWT as in the stage 4</em></li><li>Now navigate to the MIAW messaging channel where we need to add this above created JSON Web Keyset.</li></ol><pre>Steps:<br><br>&gt; Navigate to Messaging Settings<br><br>&gt; Select the MIAW channel <br><br>&gt; We find at the bottom of the page &quot;User Verification Configuration&quot;<br><br>&gt; Add the key set and save the changes</pre><p>There is more to do. Let&#39;s keep going!!</p><h4>Stage 6</h4><p>Follow the <a href="https://developer.salesforce.com/docs/service/messaging-web/guide/user-verification.html">article</a> to setup the Messaging for Web service on the Client side/ Customer to use.</p><p>Let us use a Visual force page in our example to understand better.</p><p>The page looks something like below with minimal requirements implemented.</p><pre>&lt;apex:page &gt;<br>   &lt;script type=&#39;text/javascript&#39;&gt;<br>    function initEmbeddedMessaging() {<br>    try {<br>        <br>        embeddedservice_bootstrap.settings.language = &#39;en_US&#39;; // For example, enter &#39;en&#39; or &#39;en-US&#39;<br><br>        window.addEventListener(&quot;onEmbeddedMessagingReady&quot;, () =&gt; <br>        {<br>            console.log(&quot;Received the onEmbeddedMessagingReady event…&quot;);<br><br>            // Send token to Salesforce<br>    <br>            embeddedservice_bootstrap.userVerificationAPI.setIdentityToken<br>            ({<br>            identityTokenType : &quot;JWT&quot;, <br><br>            //identityToken :&quot;{The JWT token key value that we created in Stage 4}&quot;<br>            identityToken :&quot;eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMTIxMiJ9.eyJzdWIiOiJzYXRoa3VyaUBzYWxlc2ZvcmNlLmNvbSIsImlzcyI6IlNGIiwiZXhwIjoxNzI4MzcyOTcwfQ.It4y3_D76IMi2Dh6OAjlcvwLd8MUykSrXYlIm5sz75VYd4-572IW9gFnQ8ntSMuDAca5b0VaLs6-U-lmeh6dAXkfHSBeqZpNoVTm7zFrsT2ZThLdERG1VGmbhDwXrgszbgg590MjvMQeMFLjd_vrVyzB-PfxcL55sBCrUCBf3_a7Of2NL2DCkH_ph8UPSf1j6SMNsb4dMu8CUVrQIIPmb__dsyQ-FpVTo9AYqssF444T1utFXTZQgx-ZV3FWy_yXqAwr1KIktX-20SauYyMQbmztC-X0oRxkflHNbaslc73KJGOjlRx3czELRr8CV2dYK7ljtd-cPlLAFFlON60EIQ&quot;<br>            });<br>        });<br><br>        embeddedservice_bootstrap.init(<br>                &#39;00D1s0000000***&#39;,<br>                &#39;MIAW&#39;,<br>                &#39;https://*********.sandbox.my.site.com/ESWMIAW16966********&#39;,<br>                {<br>                    scrt2URL: &#39;https://*********.sandbox.my.salesforce-scrt.com&#39;<br>                }<br>            );<br>        } <br>    catch (err) {<br>            console.error(&#39;Error loading Embedded Messaging: &#39;, err);<br>        }<br>    };<br>   &lt;/script&gt;<br>   &lt;script type=&#39;text/javascript&#39; src=&#39;https://*********.sandbox.my.site.com/ESWMIAW16966********/assets/js/bootstrap.min.js&#39; onload=&#39;initEmbeddedMessaging()&#39;&gt;&lt;/script&gt;<br>&lt;/apex:page&gt;</pre><p>Now save the Visual Force Page and Preview it.</p><p>Click on the chat button and initiate a chat.<br>The Agent on the Salesforce Console receives the Workitem.<br>We can see a Messaging user with the platform key like below is created</p><pre>v2/iamessage/AUTH/auth1/uid:anonymoususer123@gmail.com</pre><p>It is anonymoususer123@gmail.com because we passed that value in <br>Stage 4 &gt; decoded Payload &gt; “sub”</p><p>End the chat session and again initiate a new session from the same page The messaging sessions created will always have the Messaging User with the platform key : v2/iamessage/AUTH/auth1/uid:anonymoususer123@gmail.com</p><p>____________________________ The End _____________________________</p><p>In reality, the creation of the JWT should be handled dynamically with respect to the Users’ kid value (A unique identity) and should be set on the page where the chat button is displayed.</p><p>The above is just to briefly understand how the Messaging for In-App and Web User Verification in Salesforce.</p><p>Hope this helps !!</p><p>Feel free to share your responses if this helped you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5789bd8731a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Worried that your chat-endpoint changes in your Org after Hyperforce Migration will break your chat…]]></title>
            <link>https://medium.com/@anonymoususer123/worried-that-your-chat-endpoint-changes-in-your-org-after-hyperforce-migration-will-break-your-chat-80ef622e22f3?source=rss-b14290ea3fe5------2</link>
            <guid isPermaLink="false">https://medium.com/p/80ef622e22f3</guid>
            <category><![CDATA[salesforce-chatbot]]></category>
            <category><![CDATA[salesforce-service-cloud]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[hyperforce]]></category>
            <category><![CDATA[salesforce-hyperforce]]></category>
            <dc:creator><![CDATA[anonymous]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 10:03:37 GMT</pubDate>
            <atom:updated>2023-10-21T10:22:08.744Z</atom:updated>
            <content:encoded><![CDATA[<h3>Worried that your chat-endpoint changes in your Org after Hyperforce Migration will break your chat business?</h3><p>Do not worry. Salesforce got you covered. You can sit cool and run your business.</p><p>If you are using the standard code that includes the chat-endpoint URL from Salesforce in your business implementations, then do not worry. The Salesforce internal code handles the endpoint redirects for a grace amount of one week. But make sure to have the appropriate changes ASAP!!!</p><p>If you hardcode the chat endpoint URL value in your implementations then you need to handle it on your own. Salesforce is not responsible for it. There is a simple trick. It just needs a few implementation changes.</p><p>Salesforce has an API call that helps to fetch the chat-endpoint URL . This can be used to find the correct chat-endpoint URL for your Org and for your deployment.</p><p>All you need to know is your Org ID — 15 digits, Deployment ID — 18 digits.</p><p>Here you go with a list of test chat-endpoint URLs in case you would like to test the behavior in Sandbox<br><em>&gt;&gt; Endpoint URL’s to test with (Sandbox only): <br>https://la3-c1cs-chi.salesforceliveagent.com/<br>https://la4-c1cs-phx.salesforceliveagent.com/<br>https://la1-c1cs-lon.salesforceliveagent.com/<br>https://la1-c1cs-ord.salesforceliveagent.com/</em></p><p>Make a CHAT REST API call to the Org following the <a href="https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_Availability.htm"><em>doc</em></a><em> .</em></p><h3>Below is an example of how the API call looks like in the Postman tool.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EE_NrGa4lhuljq5ZT0kA-w.png" /></figure><figure><img alt="The response body has the New URL, which is the current chat-endpoint URL that needs to be used for making the chat connection to the Org and Business." src="https://cdn-images-1.medium.com/max/1024/1*2z9fDKwMM1akFsEbyRIRoA.png" /></figure><p>The response body has the New URL, which is the current chat-endpoint URL that needs to be used for making the chat connection to the Org and Business.</p><p>Capture the New URL response and now make the API calls to the new endpoint URL.</p><p>Hope this short article saves your day!!!</p><p>For more information on Hyperforce Migrations check the <a href="https://help.salesforce.com/s/articleView?id=000388902&amp;language=en_US&amp;type=1">article</a>.</p><p>More doubts? Raise a case with <a href="https://help.salesforce.com/s/articleView?id=sf.workcom_contact_support.htm&amp;type=5">Salesforce Support</a> or <a href="https://help.salesforce.com/s/articleView?id=000384365&amp;type=1">Contact</a> them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80ef622e22f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>