Skip Navigation

[Resolved] Import over thousands of relationship

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#630587

Dear Christian Cox,

Now I can run the types-3.0-b1 to create the many-to-many relationship. I have around 400 items and total more than 200 features for the different item, I guess I have to create several tens thousand of the relationship between the item and feature, may I know whether there is an easy way for me to import the relationship rather than map them one by one?

Best regards,

Kelvin.

#630622

Hi, if the content was created in Types using the old many-to-many post relationship system, the beta plugin provides an automatic process that will convert everything to the new relationship system. Create a backup of your old data first, then install the beta plugin and run the update process.

If the content was not created in Types, then there is no automatic process available yet. The Post Relationships API currently provides methods for inspecting and querying existing relationships, but not creating relationships: https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

#630625

Dear Christian Cox,

Thanks for your prompted reply. I strong suggest Toolset to consider the relationship import function as usually we have the Excel format to keep all data and we can write code to generate any format of data like CSV, JSON, etc. Building the relationship is heavy workload if there is no import function. UI is a convenient way for a user who builds the relationship from zero but not for an advanced user.

Is it possible to have the php function call then I can write code to call it for importing the data and build the relationship?

Best regards,

Kelvin.

#630674

Is it possible to have the php function call then I can write code to call it for importing the data and build the relationship?
No, because there is no function to call yet. Once this part of the API is ready, then we can evaluate how it can be implemented to import these relationships from existing data sources. I agree, it's absolutely important for importing content from other systems.