feat(integration/omnihit): update config to allow ticket creation without assigned queue
parent
6497728899
commit
9705157bdd
|
@ -413,10 +413,17 @@ const webhook = async (req, res) => {
|
||||||
|
|
||||||
let { name, phone_number } = req.body.meta.sender
|
let { name, phone_number } = req.body.meta.sender
|
||||||
|
|
||||||
const ticketId = req.body?.id
|
const {id: ticketId, account_id: accountId} = req.body
|
||||||
|
|
||||||
// const accountId = req.body.account_id
|
//channel: 'Channel::FacebookPage'
|
||||||
const accountId = "15"
|
console.log("2 =============> ticketId id: ", ticketId, " | accountId account_id: ",accountId)
|
||||||
|
|
||||||
|
if (!phone_number) {
|
||||||
|
|
||||||
|
console.log("=============> Ignored process phone_number: ", phone_number, " | 'Channel::FacebookPage'")
|
||||||
|
|
||||||
|
return res.send()
|
||||||
|
}
|
||||||
|
|
||||||
let crmPhone = phone_number.replace('+', '')
|
let crmPhone = phone_number.replace('+', '')
|
||||||
|
|
||||||
|
@ -498,7 +505,7 @@ const webhook_crm = async (req, res) => {
|
||||||
console.log('==========> crm whoId: ', whoId)
|
console.log('==========> crm whoId: ', whoId)
|
||||||
console.log('==========> crm contact: ', contact)
|
console.log('==========> crm contact: ', contact)
|
||||||
|
|
||||||
if(!contact) return res.send()
|
if (!contact) return res.send()
|
||||||
|
|
||||||
const { phone } = contact
|
const { phone } = contact
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
},
|
},
|
||||||
"createConversation":{
|
"createConversation":{
|
||||||
"inbox_id": "2",
|
"inbox_id": "2",
|
||||||
"status":"pending",
|
"status":"pending"
|
||||||
"team_id": "1"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,7 +153,7 @@ async function lookupContactByPhone(rest, authentication, crmPhone, companyId, t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('---------> auxPhone: ', auxPhone, ' | auxContactId: ', auxContactId)
|
console.log('---------> auxPhone: ', auxPhone, ' | auxContactId: ', auxContactId, ' | auxAccountId: ', auxAccountId)
|
||||||
|
|
||||||
if (auxPhone) {
|
if (auxPhone) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue