如何使用AWS Lambda和Amazon Connect从Salesforce获取帐户字段?

发布于 2025-02-02 14:20:50 字数 867 浏览 4 评论 0 原文

我正在关注在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"

I am following this to fetch the fields records from salesforce and its working fine with Contact as sf_fields returns the contact fields e.g. Name, Email with lambda test.

{
    "Details": {
        "Parameters": {
            "sf_operation" : "phoneLookup",
            "sf_phone" : "[ENTER PHONE NUMBER HERE]",
            "sf_fields" : "Id, Name, Email"
        }
    }
}

but it is not working with Account, i want to get the Account fields. How to replace Account with Contact to get fields value of Account.

When i tried to get the fields of Accounts it returns this error:

"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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅哥哥的热头脑 2025-02-09 14:20:50

Salesforce电话查找

通过设置调用此操作
sf_operation到Phonelookup。在这种情况下,lambda函数使用
Salesforce对象搜索语言(SOLS)构建基于文本的
搜索查询。对于Phonelookup,以下参数为
必需:SF_PHONE SF_FIELDS

find {123}的内容(ID,名称,名称,电话,电子邮件)。看起来在此功能中,没有“房间”可以指定您需要从帐户中的结果。如果他们有匹配的电话,您可能会得到一些帐户,但仅此而已。

而是在该文档页面上尝试“ Salesforce搜索”或“ Salesforce查询一个”?有一些示例可以提取案例和任务,足以让您开始。

https://amazon-connect.github.io/amazon-connect-salesforce-cti/docs/lightning/salesforce-lambdas/01-contact-flow-salesforce-lambdas says

Salesforce Phone Lookup

This operation is invoked by setting
sf_operation to phoneLookup. In this case, the Lambda function uses
Salesforce Object Search Language (SOLS) to construct text-based
search queries. For phoneLookup, the following parameters are
required: sf_phone sf_fields

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文