如何使用 python 在 Salesforce 中创建个案

How to create a case in a Salesforce using python

请帮忙,我正在尝试使用外部实时代理聊天在 Salesforce 帐户中创建案例。 就像电子邮件到案例或 whats app 到案例一样,聊天机器人在 Salesforce 中的外部工作方式如何?

使用标准 REST API 端点 URI

First done authentication

from simple_salesforce import Salesforce
sf = Salesforce(
username='user name of salesforce account', 
password='password', 
security_token='token')

URI : /services/data/v41.0/sobjects/Case

Operation : POST Body : JSON

Sample post parameter list

data ={
    "Subject" : "Radio is repaired",
    "Priority" : "high",
    "Description":"Radio has damaged because of handling."
}

x = sf.Case.create(data)

It create a case in Salesforce case object using REST API