IO-2921 Chatter Final mods and Cron Trigger
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -6,6 +6,15 @@
|
|||||||
headers:
|
headers:
|
||||||
- name: x-imex-auth
|
- name: x-imex-auth
|
||||||
value_from_env: DATAPUMP_AUTH
|
value_from_env: DATAPUMP_AUTH
|
||||||
|
- name: Chatter Data Pump
|
||||||
|
webhook: '{{HASURA_API_URL}}/data/chatter'
|
||||||
|
schedule: 45 5 * * *
|
||||||
|
include_in_metadata: true
|
||||||
|
payload: {}
|
||||||
|
headers:
|
||||||
|
- name: x-imex-auth
|
||||||
|
value_from_env: DATAPUMP_AUTH
|
||||||
|
comment: ""
|
||||||
- name: Claimscorp Data Pump
|
- name: Claimscorp Data Pump
|
||||||
webhook: '{{HASURA_API_URL}}/data/cc'
|
webhook: '{{HASURA_API_URL}}/data/cc'
|
||||||
schedule: 30 6 * * *
|
schedule: 30 6 * * *
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ async function processBatch(shopsToProcess, start, end, allChatterObjects, allEr
|
|||||||
lastname: j.ownr_co_nm ? j.ownr_co_nm : j.ownr_ln,
|
lastname: j.ownr_co_nm ? j.ownr_co_nm : j.ownr_ln,
|
||||||
transaction_id: j.ro_number,
|
transaction_id: j.ro_number,
|
||||||
email: j.ownr_ea,
|
email: j.ownr_ea,
|
||||||
phone_number: j.ownr_ph1
|
phone_number: j.ownr_ph1,
|
||||||
|
transaction_time: (j.actual_delivery && moment(j.actual_delivery).tz(bodyshop.timezone).format("YYYYMMDD-HHmm")) || ""
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
allChatterObjects.push(...chatterObject);
|
allChatterObjects.push(...chatterObject);
|
||||||
|
|||||||
@@ -840,6 +840,7 @@ exports.CHATTER_QUERY = `query CHATTER_EXPORT($start: timestamptz, $bodyshopid:
|
|||||||
timezone
|
timezone
|
||||||
}
|
}
|
||||||
jobs(where: {_and: [{converted: {_eq: true}}, {actual_delivery: {_gt: $start}}, {actual_delivery: {_lte: $end}}, {shopid: {_eq: $bodyshopid}}, {_or: [{ownr_ph1: {_is_null: false}}, {ownr_ea: {_is_null: false}}]}]}) {
|
jobs(where: {_and: [{converted: {_eq: true}}, {actual_delivery: {_gt: $start}}, {actual_delivery: {_lte: $end}}, {shopid: {_eq: $bodyshopid}}, {_or: [{ownr_ph1: {_is_null: false}}, {ownr_ea: {_is_null: false}}]}]}) {
|
||||||
|
actual_delivery
|
||||||
id
|
id
|
||||||
created_at
|
created_at
|
||||||
ro_number
|
ro_number
|
||||||
|
|||||||
Reference in New Issue
Block a user