Please enable JavaScript to view this site.

iService API Documentation

Navigation: iService API Forms > Customer Info

Creating a new email (api=createemail)

Scroll Prev Top Next More

Purpose

 

The createemail API is used to create a new Agent Email. Within the iService user interface, the agent email forms use the startagentemail endpoint to fetch the details needed to load the form. The createemail endpoint is then used to create the agent email interaction.

 

UI Reference: The API is called when the Create Agent Email button is clicked after filling in the details for the message.

 

URI: webapp-api-custinfo?api=createemail

 

Access Rights Required:  All agents

 

Request

 

Request Parameters

Name

Type

Description

details

Object

Object that contains all the details needed to create the agent email.

details[].inResponseToID

String

If the agent email is part of a case, the case ID (interaction root) is specified.

details[].subject

String

The subject line for the agent email.

details[].segmentID

String

The segment ID for the agent email.

details[].topicID

String

The topic ID for the agent email.

details[].addSubjectRefNum

boolean

Indicates whether a reference number will be added to the subject line.

details[].ContactID

Number

The ID of the contact for whom the agent email is created.

details[].destEmail

String

The email address selected for the agent email. Contacts may have more than one email address.

details[].bodyHtml

String

The HTML body for the agent email.

details[].notificationID

String

Not used in agent email.

details[].defaultMailboxID

String

The default mailbox used to send the email. May be overridden by mailbox ID if specified.

details[].mailboxID

String

ID of the mailbox used to send the email.

details[].action

Number

Not used in agent email

details[].properties

Array

Properties associated with the topic are submitted in a special format. See properties that may be edited.

details[].caseproperties

Array

Properties associated with the topic are submitted in a special format. See properties that may be edited.

 

 

 

Request Payload Example

{
    "details": {
        "inResponseToID": "",
        "subject": "This the subject of the message",
        "segmentID": "2",
        "topicID": "2",
        "addSubjectRefNum": true,
        "contactID": 466,
        "destEmail": "john.doe@example.com",
        "bodyHtml": "This is the body of a test email",
        "notificationID": "6",
        "defaultMailboxID": "1",
        "mailboxID": "1",
        "action": 1,
        "properties": [],
        "caseProperties": []
    }
}

 

 

Response

 

 

Response Parameters

Name

Type

Description

errors

Array

Error returned for the submission.

interactionID

String

The interaction ID of the agent created.

row

Array

An array of strings that describes the agent email created.

row[].id

String

Id of the interaction created.

row[].subject

String

Subject of the interaction created.

row[].type

String

Type of the interaction created. In this case it is Agent Email.

row[].date

String

Date of the interaction created.

 

 

Response Example

{
    "errors": [],
    "interactionID": "45402",
    "row": {
        "id": "45402",
        "subject": "[ref#: 45402-45402] This is a test email",
        "type": "Agent Email",
        "date": "2021-10-18T08:20:41.5630000Z"
    }
}

 

© 2008 - 2022 One-to-One Service.com, Inc. All rights reserved.