如何使用AWS Lambda和Amazon Connect从Salesforce获取帐户字段?
我正在关注此在SF_Fields返回联系字段,例如,通过LAMBDA测试来返回Contact Fields,从Salesforce获取字段记录及其与联系人的正常工作。
{
"Details": {
"Parameters": {
"sf_operation" : "phoneLookup",
"sf_phone" : "[ENTER PHONE NUMBER HERE]",
"sf_fields" : "Id, Name, Email"
}
}
}
但是它无法使用帐户,我想获取帐户字段。如何用联系人替换帐户以获取帐户的字段价值。
当我尝试获取帐户字段时,它会返回此错误:
"errorMessage": "INVALID_FIELD: No such column 'City_CB__c' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.",
"errorType": "Exception"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
说
find {123}的内容(ID,名称,名称,电话,电子邮件)。看起来在此功能中,没有“房间”可以指定您需要从帐户中的结果。如果他们有匹配的电话,您可能会得到一些帐户,但仅此而已。
而是在该文档页面上尝试“ Salesforce搜索”或“ Salesforce查询一个”?有一些示例可以提取案例和任务,足以让您开始。
https://amazon-connect.github.io/amazon-connect-salesforce-cti/docs/lightning/salesforce-lambdas/01-contact-flow-salesforce-lambdas says
SOSL is a full-text search, similar to the search box you see at top of the page in Salesforce. You'd need to put a debug log in Salesforce to see what exactly happens but I suspect it runs something similar to
FIND {123} IN PHONE FIELDS RETURNING Contact (Id, Name, Phone, Email)
. Looks like in this function there's no "room" to specify you want results from Account. You may get some Accounts if they have matching phones but that's about it.Instead experiment with "salesforce search" or "salesforce query one" on that documentation page? There are examples that fetch Cases and Task, should be enough to get you started.