-1

因此,我尝试根据我在上一个联系流中设置的联系属性值(由检查联系属性时钟检查)执行 Lambda 函数。我的问题是,联系人属性是联系流本地的,还是可以从下一个联系流中引用?现在它对我不起作用,当我检查联系人属性值时,它永远不会与应该设置的值匹配(我在之前的联系流中设置后检查了这个)。

还从检查值的 Lambda 函数中获取此值(existingCase 是联系人属性的名称):

'existingCase':KeyError Traceback(最近一次调用最后一次):文件“/var/task/lambda_function.py”,第 11 行,在 lambda_handler print("Is it existing case" + event["Details"]["ContactData"] ["Attributes"]["existingCase"]) KeyError: 'existingCase'

谢谢!

4

2 回答 2

1

联系人属性特定于呼叫/联系人。在一个联系人关注中设置的属性不能被另一个联系人流访问。同样,在呼叫/联系结束后,属性不再可用于联系流(即使它是同一个呼叫方)。

如果您需要属性可供来自同一客户端点的后续联系人使用,则需要调用 lambda 函数并将属性存储在外部数据存储中,例如 DynamoDB,使用客户的电话号码(或特定于客户/来电者)作为关键。在您的联系流开始时,您可以调用另一个 lambda 函数,该函数使用客户端点(客户的电话号码)搜索 dynamo,并使用 dynamo 中的数据恢复上一个联系人的属性。这有效地将联系人属性范围限定为客户,而不是联系人。

注意:这只是说明属性范围的示例,不应在生产场景中使用,因为许多呼叫者可能被视为具有相同的端点(电话号码)。

于 2018-12-31T20:51:53.290 回答
0

It is possible to transfer Contact attributes from one contact flow to another contact flow using a user-defined type. Set the contact attributes using two below methods:

  1. Use Text: Set key and value, and in the next contact flow use contact attributes of type User Defined with the key defined in the previous flow.
  2. Use Attributes: Set Key and value along with type as User Defined. In the next contact-flow use contact attributes of type User Defined with the key defined in previous flow.
于 2019-04-23T09:46:42.790 回答