# 商机查询

请求方式: POST(HTTPS
请求地址: https://openapi.waiqin365.com/api/salesOpportunities/v1/querySalesOpportunitiesInfo/{ openid }/{ timestamp }/{ digest }/{ msg_id } 在线调试
请求示例:

{
	"create_time_start":"2024-04-01",
	"create_time_end":"2024-04-30",
	"modify_time_start":"2024-04-01",
	"modify_time_end":"2024-04-30",
	"page":"1",
	"rows":"1000"
	
	
}
说明: 本示例仅供参考,具体以参数说明为准。

参数说明:

参数 类型 必填 说明
create_time_start VARCHAR(32) 创建时间起始。格式:yyyy-MM-dd
create_time_end VARCHAR(32) 创建时间结束。格式:yyyy-MM-dd
modify_time_start VARCHAR(32) 修改时间起始。格式:yyyy-MM-dd
modify_time_end VARCHAR(32) 修改时间结束。格式:yyyy-MM-dd
page INT 页码,默认1
rows INT 分页大小,默认1000

响应示例:

{
    "return_code": "0", 
    "return_msg": null,
    "msg_id": null,
    "response_data": "<<DATA>>"
}

数据DATA示例:

[
     {
		  "id": "6789690485561771524",  
		  "creator_id": "4894496930669766018",  
		  "create_time": "2023-04-01 12:10:10",  
		  "modifyier_id": "4894496930669766018",  
		  "modify_time": "2023-04-01 12:10:10",  
		  "status": "1",  
		  "add_approval_status": "1",  
		  "approval_type": "addApproval",  
		  "market_id": "8130823261636150507",  
		  "approval_status": "1",  
		  "sales_oppo_code": "O2023070700000001",  
		  "saleslead_name": "张三的线索",  
		  "saleslead_id": "7626593043392023977",  
		  "stage_change_time": "2023-04-01 12:10:10",  
		  "stage_change_person_id": "8609187093134263268",  
		  "delete_reason": null,  
		  "follow_up_time": "2023-04-01 12:10:10",  
		  "follow_up_person_id": "8823777742865429558",  
		  "follow_up_person_name": "李四",  
		  "sales_oppo_remark": "备注",  
		  "sales_oppo_person_dept_id": "7171248398104726945",  
		  "sales_oppo_person_id": "9160716171813861618",  
		  "input_describe": "输单",  
          "input_reason_id":"7760023060297659528",
		  "input_reason_name":"输单原因1",
		  "input_stage_id": "7593846080108355879",  
		  "input_stage_name": "阶段1",  
		  "projected_amount": "10000.00",  
		  "sales_oppo_status_id": "8999546638097576083",  
		  "sales_oppo_status_name": "商机状态1",  
		  "sales_oppo_source_id": "5680133696404052338",  
		  "sales_oppo_source_name": "来源1",  
		  "sales_business_type_id": "8235725273858875067",  
		  "sales_business_type_name": "业务类型1",  
		  "oppo_type_id": "8769528160027926302",  
		  "oppo_type_name": "机会来源1",  
		  "esti_trans_date": "2024-06-30",  
		  "sales_oppo_price": "20000.00",  
		  "process_stage_id": "7811777636260296442",  
		  "process_stage_name": "阶段1",  
		  "sales_process_id": "5523540769500983960",  
		  "sales_process_name": "商机流程1",  
		  "cus_id": "5983322659186788925",  
		  "sales_oppo_name": "商机名称",  
		  "follow_up_content": "跟进了",  
		  "winning_rate": "75%" 
     }
]

参数说明:

参数 类型 说明
id INT8 主键
creator_id INT8 创建人
create_time TIMESTAMP(6) 创建时间
modifyier_id INT8 修改人
modify_time TIMESTAMP(6) 修改时间
status CHAR(1) 商机状态;0作废 1正常
add_approval_status VARCHAR(32) 新增审批状态,0:已通过 1:待审批 2:已打回
approval_type VARCHAR(32) 当前审批类型, addApproval:新增商机审批 editApproval:编辑商机审批 stageApproval:商机变更阶段审批
market_id INT8 市场活动id
approval_status VARCHAR(32) 商机审批状态,0:已通过 1:待审批 2:已打回
sales_oppo_code VARCHAR(32) 商机编码
saleslead_name VARCHAR(100) 线索名
saleslead_id INT8 线索id
stage_change_time TIMESTAMP(6) 阶段变更时间
stage_change_person_id INT8 阶段变更人
delete_reason VARCHAR(100) 作废原因
follow_up_time TIMESTAMP(6) 最后跟进时间
follow_up_person_id INT8 最后跟进人ID
follow_up_person_name VARCHAR(100) 最后跟进人姓名
sales_oppo_remark VARCHAR(4000) 备注
sales_oppo_person_dept_id INT8 负责人部门ID
sales_oppo_person_id INT8 负责人ID
input_describe VARCHAR(4000) 输单描述
input_reason_id INT8 输单原因ID
input_reason_name VARCHAR(4000) 输单原因
input_stage_id INT8 输单阶段ID
input_stage_name VARCHAR(100) 输单阶段名称
projected_amount NUMERIC(18,2) 预测金额
sales_oppo_status_id INT8 商机状态ID
sales_oppo_status_name VARCHAR(100) 商机状态
sales_oppo_source_id INT8 机会来源ID
sales_oppo_source_name VARCHAR(100) 机会来源
sales_business_type_id INT8 业务类型ID
sales_business_type_name VARCHAR(100) 业务类型
oppo_type_id INT8 机会类型ID
oppo_type_name VARCHAR(100) 机会类型
esti_trans_date TIMESTAMP(6) 预计成交日期
sales_oppo_price NUMERIC(18,2) 商机金额(元)
process_stage_id INT8 流程阶段ID
process_stage_name VARCHAR(100) 流程阶段名称
sales_process_id INT8 流程ID
sales_process_name VARCHAR(100) 流程名称
cus_id INT8 客户ID
sales_oppo_name VARCHAR(100) 商机名称
follow_up_content VARCHAR(4000) 最后跟进内容
winning_rate VARCHAR(100) 赢率%

# 商机商品查询

请求方式: POST(HTTPS
请求地址: https://openapi.waiqin365.com/api/salesOpportunities/v1/querySalesOpportunitiesGoods/{ openid }/{ timestamp }/{ digest }/{ msg_id } 在线调试
请求示例:

{
	"create_time_start":"2024-04-01",
	"create_time_end":"2024-04-30",
	"modify_time_start":"2024-04-01",
	"modify_time_end":"2024-04-30",
	"sales_oppo_code":"O2023070700000001",
	"sales_id":"6789690485561771524",
	"page":"1",
	"rows":"1000"
	
	
}
说明: 本示例仅供参考,具体以参数说明为准。

参数说明:

参数 类型 必填 说明
create_time_start VARCHAR(100) 创建时间起始。格式:yyyy-MM-dd
create_time_end VARCHAR(100) 创建时间结束。格式:yyyy-MM-dd
modify_time_start VARCHAR(100) 修改时间起始。格式:yyyy-MM-dd
modify_time_end VARCHAR(100) 修改时间结束。格式:yyyy-MM-dd
sales_oppo_code VARCHAR(100) 商机编码
sales_id VARCHAR(100) 商机id
page INT 页码,默认1
rows INT 分页大小,默认1000

响应示例:

{
    "return_code": "0", 
    "return_msg": null,
    "msg_id": null,
    "response_data": "<<DATA>>"
}

数据DATA示例:

[
     {
		"sales_id": "8504558858541727243",
		"sales_oppo_code": "O2023070700000001",
		"status": "1",    
        "discount": "0.9",    
        "price": "100.00",    
        "unit": "个",    
        "linkgoods_id": "5068610107298583626",    
        "linkgoods_name": "商品名称",    
        "expected_unit_price": "110.00",    
        "amount": "5",    
        "total_price": "500.00",    
        "expected_total_price": "550.00",    
        "discount_subtotal": "50.00"  
     }
]

参数说明:

参数 类型 说明
sales_id INT8 商机id
sales_oppo_code VARCHAR(32) 商机编码
status CHAR(1) 商机商品状态;0作废 1正常
discount VARCHAR(32) 折扣
price NUMERIC(18,2) 单价
unit VARCHAR(32) 单位
linkgoods_id INT8 商品id
linkgoods_name VARCHAR(200) 商品名称
expected_unit_price VARCHAR(32) 预期单价
amount VARCHAR(32) 数量
total_price VARCHAR(32) 总价
expected_total_price VARCHAR(32) 预期总价
discount_subtotal VARCHAR(32) 折扣小计

# 商机跟进查询

请求方式: POST(HTTPS
请求地址: https://openapi.waiqin365.com/api/salesOpportunities/v1/querySalesOpportunitiesRecord/{ openid }/{ timestamp }/{ digest }/{ msg_id } 在线调试
请求示例:

{
	"create_time_start":"2024-04-01",
	"create_time_end":"2024-04-30",
	"page":"1",
	"rows":"1000"
	
	
}
说明: 本示例仅供参考,具体以参数说明为准。

参数说明:

参数 类型 必填 说明
create_time_start VARCHAR(100) 创建时间起始。格式:yyyy-MM-dd
create_time_end VARCHAR(100) 创建时间结束。格式:yyyy-MM-dd
page INT 页码,默认1
rows INT 分页大小,默认1000

响应示例:

{
    "return_code": "0", 
    "return_msg": null,
    "msg_id": null,
    "response_data": "<<DATA>>"
}

数据DATA示例:

[
     {  
        "id": "5632276084273286301",
        "creator_id": "8851971499072799260",
        "create_time": "2023-04-01 12:00:00",
        "status": "1",
        "stage_id": "987654321098765432",
        "stage_name": "阶段1",
        "flow_id": "987654321098765433",
        "flow_name": "流程1",
        "sale_follow_adress": "江苏省南京市建邺区嘉陵江东街18号5栋1层北侧",
        "visit_implement_id": "987654321098765434",
        "biz_flow_path": "https://image-test.waiqin365.com/7619626022706826512/salesoppo/202302/202302161317956_d989ff2bb314469f90a8f36260c47a10.xlsx&fileName=20230214202415135537.xlsx",
        "result": "销售阶段:赢单 → 商务谈判",
        "sales_id": "7583819814123807104"
    }  
]

参数说明:

参数 类型 说明
id INT8 主键
creator_id INT8 创建人
create_time TIMESTAMP(6) 创建时间
status CHAR(1) 商机跟进记录状态;0作废 1正常
stage_id INT8 流程阶段id
stage_name VARCHAR(100) 流程阶段名称
flow_id INT8 流程执行id
flow_name VARCHAR(100) 流程执行名称
sale_follow_adress VARCHAR(100) 跟进地址
visit_implement_id INT8 拜访id
biz_flow_path VARCHAR(4000) 商机跟进图片
result VARCHAR(4000) 跟进内容
sales_id INT8 商机id