Step 4: Test the guide, then add it to your inbound flow
Test the guide with the inbound flow
Test with a chat, a call, or both, for the channels your agents take. Either
test sends a contact through the stack's inbound flow, named in the stack's
InboundFlowName output, to the test queue, and the test agent
accepts it in the agent workspace. Neither test changes your own inbound
flow.
-
A test chat, from the Connect Customer admin website's test chat page, carries a test account's ID as a contact attribute, so the guide opens on that account.
-
A test call, to a test phone number that you assign to the stack's inbound flow, carries no account ID. The guide opens on Unknown caller and offers the caller's number as a search, which finds the test account by a contact's phone number.
To get the test agent ready
-
Open the agent workspace in a browser. Its URL is the instance's access URL, which the check in Check the instance prints, followed by
/agent/:-
For an access URL that ends in
my.connect.aws:https://.instance-name.my.connect.aws/agent/ -
For an access URL that ends in
awsapps.com/connect:https://.instance-name.awsapps.com/connect/agent/
Log in as the test agent you set up in Step 1, such as
rtdi-test-agent, and set your status to Available. -
For details, see Test voice, chat, and task experiences.
Add the guide to your inbound flow
In your own inbound flow, set the contact attributes that name the customer and set both agent UI events with Set event flow, as the stack's inbound flow does: the default flow for the agent UI and, with the wrap-up, the disconnect flow. The stack's inbound flow is a test flow: it never sets a record attribute. A test chat supplies one as a contact attribute, and a test call has none.
The guide opens whichever record the attributes name, so set them from a value your own system verified: your website's server for a chat, or an IVR step that checks the caller for a call. A caller ID can be spoofed, so a caller's number alone doesn't verify the caller. See Security considerations. For the attributes the guide reads, the order it reads them in, what the agent sees for each, and worked examples, see How the guide finds the record.
A contact with no usable value, or one that matches no account the integration user can see, shows Customer not found on a chat or Unknown caller on a call. The agent then finds the account with a search, or creates the customer. A search is the agent's choice, not a verification of the caller, so until your inbound flow sets a verified value, agents must verify each caller themselves.
-
In your inbound flow, before the contact is transferred to a queue, add a Set contact attributes block that sets, from your verified source, whichever of these attributes the flow knows:
-
accountId: a Salesforce account ID or an account number. -
caseId: a Salesforce case ID or a case number. -
contactEmail: a contact's email address.
The same block also sets these attributes, as the stack's inbound flow does:
-
customerContactIdto the contact's ID,$.ContactId. The guide passes it to the Find the record module, and the Customer not found screen reads it. -
customerChannelto the contact's channel,$.Channel. Without it, the guide treats every contact as a chat: it shows Customer not found instead of Unknown caller on a call, and gives the cases it creates the OriginWebinstead ofPhone. -
On a call,
customerPhoneto the caller's number,$.CustomerEndpoint.Address. The not-found screen offers it as the Search for the caller's number search; without it, that search doesn't appear. The stack's inbound flow sets it only when$.ChannelisVOICE.
-
-
Add a Set event flow block. For the event, choose Default flow for Agent UI, and choose the guide flow, the stack's flow whose name ends in
-account-360-guide. See Invoke a guide at the start of a contact. -
If you deploy with Wrap-up flow and form set to
Enabled, and you want to show the wrap-up when the contact ends, add a second Set event flow block that sets the disconnect flow for the agent UI to the wrap-up flow, the stack's flow whose name ends in-account-360-wrapup. Your instance might also show the default wrap-up guide from Connect Customer; see Enable smart default guides for after contact work. Check which wrap-up agents see before you go live. -
Check that the instance's concurrent active chats quota covers your busiest time. Each contact that runs the guide uses one active chat, and one more if a wrap-up guide opens when the contact ends, such as the stack's wrap-up flow or the default after contact work guide from Connect Customer. See Plan for scale.
-
Publish the flow.
-
Check the change with a test chat or a test call, as in Test the guide with the inbound flow, with these differences:
-
For a test chat, in Contact Flow, choose your own inbound flow, and leave Contact Attributes (optional) empty.
-
For a test call, call a test phone number whose Flow / IVR is your own inbound flow; see Attach a claimed or ported phone number to a flow in Connect Customer.
Your flow must route the contact to a queue the test agent serves, on that channel.
-
The change works when the guide opens with Customer not found on the test chat, or Unknown caller on the test call, because the test contact carries no verified value. If the guide doesn't open, check the Set event flow block for the Default flow for Agent UI, and that you published the flow. To see the guide open an account through your own flow, use a contact your verification step accepts, then test as in Test and roll out to agents.
How the guide finds the record
When a contact reaches the guide, the guide calls one flow module, Find the record, which reads the contact's attributes and returns the Salesforce record the contact is about. The stack's built-in module reads the following attributes, in this order, and the first that gives a record wins. Every lookup is an exact match, and each value is checked before any Salesforce call.
| Attribute | What it can hold, and how the module reads it | What the agent sees first |
|---|---|---|
|
A Salesforce account ID, or else an account number. When it
gives one account, the module also reads
|
One account: the account view. Two to five accounts with that account number: Which record is this?. |
|
A Salesforce case ID, or else a case number. With an
account from |
The case view, marked From this contact, with Back to the account. |
|
A contact's email address, read only when
|
One account: the account view. Two to five accounts: Which record is this?. |
None of them |
No attribute is set, or none matches. |
Customer not found on a chat, or Unknown caller on a call, with the searches. On a call, the screen offers the caller's number as a ready search. |
When a Salesforce lookup fails, the screen's heading is We couldn't look up this contact's record, with the warning This contact's record could not be looked up. Search for the customer. and Try again, which runs Find the record again.
The guide overwrites caseId and accountId on the customer's contact as the agent works. Reports and flows that read them after the contact see the last case open in the guide, or - for no case, and the last account the guide showed. The guide keeps the value your inbound flow set in caseId in its own attribute, arrivalCaseId, until it has shown that case.
Example: a signed-in customer starts a chat on your website
-
The customer signs in to your website and starts a chat.
-
Your website's server starts the chat with a
StartChatContactrequest whose attributes includeaccountIdfrom the customer's session, orcontactEmailwith the address they signed in with. The server sets the value, so the customer's browser never supplies it. See Pass contact attributes when a chat starts. -
Your inbound flow sets
customerContactIdandcustomerChannel, runs the Set event flow block for the guide, and the one for the wrap-up flow if you deployed it, and transfers the chat to a queue. -
The agent sees the account view, or Which record is this? when the email address is on contacts of several accounts.
Example: set accountId after your IVR verifies the caller
In this example, the caller enters an account number and a PIN, and an AWS Lambda function that you write checks them against your own system and returns the Salesforce account ID:
-
Your inbound flow collects the account number and the PIN with Store customer input blocks, as it might already do for self-service.
-
An AWS Lambda function block calls your function with both values. The function verifies them in your own system. If they match, it looks up the customer's Salesforce account ID, for example from the account number, and returns
{"accountId": "001xx000003DGb2AAG"}. If they don't match, it returns noaccountId. Add the function to your instance first; see Grant Connect Customer access to your AWS Lambda functions. -
A Set contact attributes block sets the user-defined attribute
accountIdto the function's result,$.External.accountId, along withcustomerContactId,customerChannelandcustomerPhone. -
The two Set event flow blocks in Add the guide to your inbound flow, then the transfer to the queue.
-
The agent sees the account view. When the function returns no
accountId, the agent sees Unknown caller with the searches.
Example: a known customer calls about a known case
-
Your IVR verifies the caller and sets
accountId, for example with an account number and a PIN. -
A Store customer input block collects the case number, or a bot collects it in a slot.
-
On the branch where your flow verified the caller and set
accountId, a Set contact attributes block setscaseIdto the number, such as$.StoredCustomerInputafter Store customer input. BecauseaccountIdis also set, the guide keeps the case only if it is on that account. On the branch where the caller isn't verified, leavecaseIdunset:caseIdon its own opens the case and its account, so set it only from a verified source. -
The agent sees the case view, marked From this contact. Back to the account opens the account view.
To choose the record your own way, for example from a bot conversation or by a
rule in your system, build your own Find the record module and name it in the
stack's Find the record module parameter
(FindRecordModuleArn). Your module gets the same seven inputs as the
built-in one, and can read accountId, arrivalCaseId and
contactEmail from the contact; see Extend the guide with flow modules.