所以我最近开始使用Zoho平台,所以我对它非常陌生,我被分配了以下任务:
在zoho creator上建立一个具有各种不同字段(名称,公司名称,帐单地址和一些额外的自定义字段)的客户表单。将表单中的数据集成到zoho图书平台。
基本上,用户提交表单,并在提交时在zoho图书上创建一个新记录。
我的问题是,当表单提交时,zoho books上没有新客户。
有人能帮帮我吗?
谢谢
发布于 2021-05-19 17:17:25
cpList = List();
firstName = input.Contact_Name.first_name;
lastName = input.Contact_Name.last_name;
contactName = firstName + " " + lastName;
contactMap = Map();
contactMap.put("contact_name",contactName);
contactMap.put("company_name",input.Company_Name);
contactMap.put("website",input.Website);
billingMap = Map();
billingMap.put("zip",input.Billing_Address.postal_Code);
billingMap.put("country",input.Billing_Address.country);
billingMap.put("address",input.Billing_Address.address_line_1);
billingMap.put("street2",input.Billing_Address.address_line_2);
billingMap.put("city",input.Billing_Address.district_city);
billingMap.put("state",input.Billing_Address.state_province);
contactP = Map();
contactP.put("first_name",firstName);
contactP.put("last_name",lastName);
contactP.put("designation",input.Designation);
contactP.put("department",input.Department);
contactP.put("contact_salutation","Mr/Mrs");
contactP.put("mobile",input.Mobile_Phone);
contactP.put("phone",input.Phone_Number);
contactP.put("email",input.Email);
contactP.put("is_primary_contact",true);
contactMap.put("billing_address",billingMap);
cpList.add(contactP);
contactMap.put("contact_persons",cpList);
params = Map();
params.put("JSONString",contactMap);
createContact = invokeurl
[
url :"https://books.zoho.eu/api/v3/contacts?organization_id="
type :POST
parameters:params
connection:"books"
];这就是我能够让它工作的方式。
发布于 2021-05-18 04:41:10
可能需要在标头中包含“book”的身份验证令牌。查看API文档,查看是否有关于创建和使用books.zoho令牌的信息。
此外,通过将detailed:true添加到invokeurl调用中,您可以查看来自invokeurl的响应中的任何信息或错误消息。下面是一些示例代码:
response = invokeurl
[
url : "https://books.zoho.eu/api/v3/contacts?orgainization_id=20077348839
type :POST
parameters:datamap
connection:"books_contact_auth"
detailed:true
];
// To see all headers and content
info response;https://stackoverflow.com/questions/67571771
复制相似问题