Skip to content

Amazon Connect Flow - Update based on week of they year

0

Looking for ideas on updating Amazon Connect Flows.

We have a message that's played when calls come in. The message is currently being manually updated each week to include/exclude information about payroll. I'd like to automate this so that if the week number is even then play message one or if week number is odd play message 2.

I suspect this can be done with reference to Lambda? I'd have to learn to utilize Lambda to do it, but I suspect that I could use Lambda to. .. get the week number divide by 2 to return either a 1 or 0 - modulo result, then play the appropriate message.

Before I create this for myself, I'm doing the lazy bit of seeing if there's any previous reference anyone knows or reason why it won't work?

  • Please tag the answer as accepted answer if you feel it has provided the response to your query. Thanks a lot.

3 Answers
1
Accepted Answer

Absolutely! I understand your requirement for a Lambda function that can help in automating the “process of manually updating the message for each week“, to determine the week number and help to play the appropriate message.

As already answered above, there is a helpful resource provided by Amazon Connect called the "Sample Lambda integration flow"[1]. This flow serves as an example that demonstrates the integration of Lambda functions with Amazon Connect. It can serve as a valuable reference for your specific needs. The detailed instructions and an example Lambda code snippet in the official AWS documentation on Lambda functions within Amazon Connect. The documentation[2] provides step-by-step guidance and code sample that you can easily adapt and utilize within your environment.

[1] Sample Lambda integration - https://docs.aws.amazon.com/connect/latest/adminguide/sample-lambda-integration.html

[2] Invoke AWS Lambda functions - https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html.

AWS
SUPPORT ENGINEER
answered 3 years ago
1

You are right, you need a simple Lambda to do this that calculates a flag and return it as an attribute so you can use it as a branching decision to play the right prompt. If you are new to Lambda, there is a Sample Lambda integration flow in Amazon Connect.

You can refer to this page to have an example of a sample Lambda that you can easily copy-paste and use in your environment : https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html

AWS
EXPERT
answered 3 years ago
1

A super simple lambda will do this for you, in python:

date = datetime.date(2023, 7, 8) week = dt.isocalendar()[1]

david

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.