Skip to content

Instantly share code, notes, and snippets.

@karn09
Created March 23, 2017 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karn09/f73a137aef284573d8c5f60d08028706 to your computer and use it in GitHub Desktop.
Save karn09/f73a137aef284573d8c5f60d08028706 to your computer and use it in GitHub Desktop.
{
"name": "kustomer.conversation.find-before-date",
"app": "kustomer",
"type": "internal_api",
"inputTemplate": {
"method": "POST",
"uri": "http://customer_search:8000/v1/customers/search?page=1&pageSize=1",
"orgId": "/#_env.orgId",
"data": {
"queryContext": "conversation",
"and": [{
"conversation_created_at": {
"lte": "/#date"
}
}, {
"customer_email": {
"equals": "/#customerEmail"
}
}],
"sort": {
"conversation_created_at": {
"order": "desc"
}
}
}
},
"outputTemplate": {
"modifiedBy": "/#body.data.0.relationships.modifiedBy.data.id",
"createdBy": "/#body.data.0.relationships.createdBy.data.id",
"custom": "/#body.data.0.attributes.custom",
"customer": "/#body.data.0.relationships.customer.data.id",
"assignedTeams": "/#body.data.0.attributes.assignedTeams",
"assignedUsers": "/#body.data.0.attributes.assignedUsers",
"lastMessageIn": "/#body.data.0.attributes.lastMessageIn",
"sentiment": "/#body.data.0.attributes.sentiment",
"suggestedTags": "/#body.data.0.attributes.suggestedTags",
"tags": "/#body.data.0.attributes.tags",
"modifiedAt": "/#body.data.0.attributes.modifiedAt",
"updatedAt": "/#body.data.0.attributes.updatedAt",
"createdAt": "/#body.data.0.attributes.createdAt",
"satisfaction": "/#body.data.0.attributes.satisfaction",
"noteCount": "/#body.data.0.attributes.noteCount",
"messageCount": "/#body.data.0.attributes.messageCount",
"snooze": "/#body.data.0.attributes.snooze",
"status": "/#body.data.0.attributes.status",
"channels": "/#body.data.0.attributes.channels",
"preview": "/#body.data.0.attributes.preview",
"name": "/#body.data.0.attributes.name",
"id": "/#body.data.0.id"
},
"inputSchema": {
"additionalProperties": false,
"required": [
"customerEmail", "date"
],
"properties": {
"customerEmail": {
"type": "string"
},
"date": {
"type": "string"
}
},
"type": "object"
},
"outputSchema": {
"definitions": {
"team": {
"type": "string"
}
},
"properties": {
"custom": {
"type": "object"
},
"modifiedBy": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"customer": {
"type": "string"
},
"assignedTeams": {
"items": {
"type": "string"
},
"type": "array"
},
"assignedUsers": {
"items": {
"type": "string"
},
"type": "array"
},
"lastMessageIn": {
"type": "object"
},
"sentiment": {
"type": "object"
},
"suggestedTags": {
"items": {
"type": "object"
},
"type": "array"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"modifiedAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"satisfaction": {
"type": "number"
},
"noteCount": {
"type": "number"
},
"messageCount": {
"type": "number"
},
"snooze": {
"type": "object"
},
"status": {
"type": "string"
},
"channels": {
"items": {
"type": "string"
},
"type": "array"
},
"preview": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
}
},
"type": "object"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment