cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2522
Views
0
Helpful
14
Replies

UCCE 11.5 - Outbound API - How to change the Import Rule?

Slavik Bialik
Level 7
Level 7

Hi guys,

Hope that anyone encountered this issue, as I'm guessing not much people are working with this API.

I created an outbound campaign using the API, and I tried to import records to it. 

I was able to do that, but I had an issue, when I'm trying to load records when Phone02 is empty, it won't let me import those records.

The output I'm getting is:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
    <apiError>
        <errorData>fileContent</errorData>
        <errorDetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bulkCsvErrorDetail">
            <column>5</column>
            <error>
                <errorData>Phone02</errorData>
                <errorMessage>The format of this field is incorrect. Valid characters are 0-9, #, and *.</errorMessage>
                <errorType>invalidInput.invalidChars</errorType>
            </error>
            <line>2</line>
        </errorDetail>
        <errorType>invalidInput.bulk.invalidFileContent</errorType>
    </apiError>
</apiErrors>

 

This is how I'm trying to import:

<import>
    <fileContent>
        <![CDATA[
        AccountNumber,FirstName,LastName,Phone01,Phone02,TimeZoneBias,DstObserved
        LwxbZcYdVQGpyYDUYu4WRK3QQVSe4,Name,LastName,12126186597,,,
        ]]> 
    </fileContent>
    <delimiter>,</delimiter>
</import>

 

Only when I'm inserting a value in Phone02 it will import the record via API.

Now I understand that when creating an outbound campaign using the API, it also generates automatically an import rule for it. And after viewing a table called Import_Rule_Clause, I see that there's only one record generated for this specific campaign and it is Phone01, so I'm guessing because it has no Phone02 in there that is stating 'NullEnabled' (field) = 'Y', so the API won't be able to bypass that. 

Of course I will not add manually a record for this campaign with Phone02 to the above table, as it'll may crash my system as it is not allowed.

 

Is there something I can do here?

 

Thanks!

  Slavik Bialik.

 

2 Accepted Solutions

Accepted Solutions

Hi,

Unfortunately I couldn't find any solution for Phone02... :(

I thought about leaving the API and create some basic API of mine that will load the records to some temporary database and from there it'll create CSV files according the import rules after manually creating the campaigns fully in the Configuration Manager. That's a shame that we cannot override this small thing in the API.

 

BTW, I had an idea but had to no time to test this out. Maybe you'll want to test this and tell us the results.

I thought maybe somehow using the Do Not Call API.

The general idea is if you want the Phone02 will be NULL that you'll place something like '1111111111' instead.

And then place this number '1111111111'  into the list that it'll consider as Do Not Call numbers.

That way I'm guessing that the campaign manager will check this list before it'll command some random free dialer port to dial this number, and that way no dialer ports will be used to call those Do Not Call numbers.

It is a workaround of course, but can be a cool one if it works :)

View solution in original post

Hi Slavik,

your workaround of using a Do Not Call List just worked like a charm!! Thank you so much for the suggestion! 

 

I created an DNC List, with a single numeber, and I imported it via standard Campaign Manager (not via API). Now I use that number in place of "null" number, and the dialer do not even attempt to compose it: so Phones with this number do not contribute to reaching the total numeber of dialling attempts.

 

Doing so, I can even decide in which position to put the real/valid number for a contact: for example I can put it as Phone05 and leave the other position empty: so the user of my middleware have not to know in advance which position to use.

 

Contact Phones filelled using a DNC List number have the following Call Result: "Number successfully contacted but reached the wrong person".: but, as I said, they do not increments the total call attempts, and are simply skipped.

 

 

View solution in original post

14 Replies 14

piyush aghera
Spotlight
Spotlight

What is your Query Rule Clause, does it say Phone02 should not be Null ?

I'm not sure about what you asked.
Because from what I understand I cannot configure the query rule, nor the import rule from the API itself. It is being auto created for the campaign when I'm using the API to create a new outbound campaign.

Thanks.

I haven't worked on outbound APIs, so would not comment on that, but dont you have access to Configuration Manager where you can review Query and Import rules ?

I wish it was that easy. But when creating an outbound campaign using the API, it is making those objects invisible to the Configuration Manager. 

Not only that, but they are stating that using Outbound API methods, like delete / update / etc, can be used only on campaigns created by the API and not by the configuration manager. I don't know why they did it, but this is STUPID.

Anyway, if I'm looking on the import rule itself in the database, I can see a field called 'APIGenerated' and it is set to 'Y'. So all the import rules that are set to 'Y' are invisible to the configuration manager (and the campaign and query rule).

At one of the presentations on this tool, we suggested that those items created by the API at least be visible in Configuration Manager, even if they were read only. This would allow maintenance personnel and anyone else to know to look in one place for the items. I don't know if it was added to any type of road map, unfortunately. I imagine it is the same scenario with PCCE and the single pane of glass (SPOG) where API is visble to API only and things created in the SPOG are only editable via SPOG?

edimarzio
Level 1
Level 1
Hi Slavik, I have exactly the same problem: I need to have phone02..10 to be nullable when importing records via API. The problem is that in the same import session I may have different record with different number of phones.

Have you found a solution to this problem?

Hi,

Unfortunately I couldn't find any solution for Phone02... :(

I thought about leaving the API and create some basic API of mine that will load the records to some temporary database and from there it'll create CSV files according the import rules after manually creating the campaigns fully in the Configuration Manager. That's a shame that we cannot override this small thing in the API.

 

BTW, I had an idea but had to no time to test this out. Maybe you'll want to test this and tell us the results.

I thought maybe somehow using the Do Not Call API.

The general idea is if you want the Phone02 will be NULL that you'll place something like '1111111111' instead.

And then place this number '1111111111'  into the list that it'll consider as Do Not Call numbers.

That way I'm guessing that the campaign manager will check this list before it'll command some random free dialer port to dial this number, and that way no dialer ports will be used to call those Do Not Call numbers.

It is a workaround of course, but can be a cool one if it works :)

Thank you so much for your suggestion!

 

I'm already in the situation where I have a middleware that interfaces the Outbound API: a kind of Outbound Manager which in turns exposes some rest apis that hides the ICM Outbound complexity. I could solve the problem here, working it in this middleware, but any solution I can imagine is not "clean"... 

 

Your suggestion of using the DNC API is fantastic!! The problem here is to choose a value for null phone numbers that is syntactically valid but is not sent to the Dialer to be composed: we tried to use a single-character-phone-number such as "#" or "*" but even these kind of numbers are sent to the dialer, and they contribute to the total number of call attempts for a single contact.  But DNC is exactly what I need! I'll try this in these days and I let you know if it works!

 

Still thank you for your suggestion!

 

 

Great to hear that it is working! I'll do the same when I'll have to deal with this again.
Thank you for sharing your findings. And.... sometimes, the workaround is the solution. ;)

Hi Slavik,

your workaround of using a Do Not Call List just worked like a charm!! Thank you so much for the suggestion! 

 

I created an DNC List, with a single numeber, and I imported it via standard Campaign Manager (not via API). Now I use that number in place of "null" number, and the dialer do not even attempt to compose it: so Phones with this number do not contribute to reaching the total numeber of dialling attempts.

 

Doing so, I can even decide in which position to put the real/valid number for a contact: for example I can put it as Phone05 and leave the other position empty: so the user of my middleware have not to know in advance which position to use.

 

Contact Phones filelled using a DNC List number have the following Call Result: "Number successfully contacted but reached the wrong person".: but, as I said, they do not increments the total call attempts, and are simply skipped.

 

 

ayankovs
Cisco Employee
Cisco Employee

Hi Slavik,

 

Did you try import without specifying empty fields in CDATA ?

Or there is any reason you keep the empty columns(hone02,TimeZoneBias,DstObserved) in your API call?

 

Try like this:

<import>
    <fileContent>
        <![CDATA[
        AccountNumber,FirstName,LastName,Phone01
        LwxbZcYdVQGpyYDUYu4WRK3QQVSe4,Name,LastName,12126186597
        ]]> 
    </fileContent>
    <delimiter>,</delimiter>
</import>

 

Regards,

Aleksey

Hi, 

in my case I would need an import rule with 9 phone numbers out of 10 (those from Phone02 to Phone10), declared as nullable: so i can decide at the import time if they have a value or some of them are null. 

 

Something like this:

 

<![CDATA[
FirstName,LastName,AccountNumber,Phone01,Phone02,Phone03,Phone04,Phone05,Phone06,Phone07,Phone08,Phone09,Phone10
Emanuele,di Marzio,770a25ed26a4cf08d9272c5e,3201234567,3359874563,,,,,,,,

Mario,Rossi,770b25ed26a4cf08d9232c5e,3201234562,,,,,,,,,

Walter,White,770b25ed26a4cf08d9232c5e,3201236567,3211236867,3211211167,,,,,,,
]]>

 

Unfortunately you cannot do that import from API, since there is not way to declare fileds nullable. This kind of import can obviously be done only from ICM Campaign Manager, because you can create an import rule with nullable fields.

 

Yeah, edimarzio, this is a major issue that we are limited in the amount of the phones numbers per record. It may be something that will probably eliminate the use of those Cisco APIs in some project I'll be part of. But I really hope not, because I don't want to find myself working on some self custom APIs and CSV files.

Hi ayankovs,
The reason it won't work unfortunately is because the API has some built-in import rule that it is automatically creating when creating a campaign using API. And if I won't pass all the CDATA columns like in my example the API will return some error. It took me some time to understand it.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: