github.com/Foodji/aws-lambda-go@v1.20.2/events/connect.go (about) 1 // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 3 package events 4 5 // ConnectEvent contains the data structure for a Connect event. 6 type ConnectEvent struct { 7 Details ConnectDetails `json:"Details"` 8 Name string `json:"Name"` // The name of the event. 9 } 10 11 // ConnectDetails holds the details of a Connect event 12 type ConnectDetails struct { 13 ContactData ConnectContactData `json:"ContactData"` 14 15 // The parameters that have been set in the Connect instance at the time of the Lambda invocation. 16 Parameters map[string]string `json:"Parameters"` 17 } 18 19 // ConnectContactData holds all of the contact information for the user that invoked the Connect event. 20 type ConnectContactData struct { 21 // The custom attributes from Connect that the Lambda function was invoked with. 22 Attributes map[string]string `json:"Attributes"` 23 Channel string `json:"Channel"` 24 ContactID string `json:"ContactId"` 25 CustomerEndpoint ConnectEndpoint `json:"CustomerEndpoint"` 26 InitialContactID string `json:"InitialContactId"` 27 28 // Either: INBOUND/OUTBOUND/TRANSFER/CALLBACK 29 InitiationMethod string `json:"InitiationMethod"` 30 PreviousContactID string `json:"PreviousContactId"` 31 Queue ConnectQueue `json:"Queue"` 32 SystemEndpoint ConnectEndpoint `json:"SystemEndpoint"` 33 InstanceARN string `json:"InstanceARN"` 34 } 35 36 // ConnectEndpoint represents routing information. 37 type ConnectEndpoint struct { 38 Address string `json:"Address"` 39 Type string `json:"Type"` 40 } 41 42 // ConnectQueue represents a queue object. 43 type ConnectQueue struct { 44 Name string `json:"Name"` 45 ARN string `json:"ARN"` 46 } 47 48 // ConnectResponse is the structure that Connect expects to get back from Lambda. 49 // These return values can be used in Connect to perform further routing decisions. 50 type ConnectResponse map[string]string